if current frame == 1 dosomething ... else (currentFrame ==2) do something else. Not working.
Im having a little bit of trouble trying to make a button give me different results based on what frame the main timeline is on.
I am trying to get a button to go to a different link based on what frame the main timeline is on. If I am on frame 5 It will trace back "4" .. that is fine but other frames trace back the frame number and also 4.
frame 2 click of button traces back 1 and 4
frame 3 click of button traces back 2 and 4
frame 4 click of button traces back 3 and 4
frame 5 click of button traces back 4
thanks for your advice.
function buttonClicked(e:Event):void
{
if(currentFrame == 2)
{
trace("Clicked 1");
}
else if(currentFrame == 3)
{
trace("Clicked 2");
}
else if(currentFrame == 4)
{
trace("Clicked 3");
}
else (currentFrame == 5)
{
trace("Clicked 4");
}
}
