Friday, 25 September 2009

action script code for making a thumbnail scroll bar in flash

_root.onEnterFrame = function() // this enables when we run the program
{

if(_root._xmouse<301) // the x axis using the mouse
{
myVar=false; // create your var
}

if(_root._ymouse>350) //if your mouse is higher then 350 pixels
{
myVar=true; // then your var is positive
}

if(_root._xmouse< 55 and myVar == false) //if your mouse is less the 55 //pixels
{
imgbar_mc.prevFrame(); //then your instance name will play the next
imgbar_mc.prevFrame(); // then your instance name will play the prev frame
}



if(_root._xmouse> 80 and myVar == true)
{
imgbar_mc.nextFrame();
imgbar_mc.nextFrame();
}

}
//have fun!

No comments: