4_ever
06-14-2003, 02:36 AM
I have several Frame Labels in the timeline and "Next" button.
Frame 1 has a keyframe with label "start".
Frame 21 has a keyframe with label "mike".
Frame 63 has a keyframe with label "problem".
Generally speaking I'm trying to retrieve the label of the current frame the playhead was on when the button was released.
The code bellow retrieves the frame number the play head was on when the button was released. And then depending on frame number it assigns the label to the variable called "next", so that the playhead could go to that frame label and play the movie from that point.
on (release)
{
var next;
var frame= _currentframe;
if (frame<21)
{
next = "mike";
}
if (frame<128 && frame>21)
{
next = "problem";
}
gotoAndPlay(next);
}
But using frame numbers is not a very good idea because if I add or delete some frames, the functionality of the button won't work any more.
What I really want to know if there is some way to get the frame label using actionscript.
Any suggestions are fully appreciated;)
Frame 1 has a keyframe with label "start".
Frame 21 has a keyframe with label "mike".
Frame 63 has a keyframe with label "problem".
Generally speaking I'm trying to retrieve the label of the current frame the playhead was on when the button was released.
The code bellow retrieves the frame number the play head was on when the button was released. And then depending on frame number it assigns the label to the variable called "next", so that the playhead could go to that frame label and play the movie from that point.
on (release)
{
var next;
var frame= _currentframe;
if (frame<21)
{
next = "mike";
}
if (frame<128 && frame>21)
{
next = "problem";
}
gotoAndPlay(next);
}
But using frame numbers is not a very good idea because if I add or delete some frames, the functionality of the button won't work any more.
What I really want to know if there is some way to get the frame label using actionscript.
Any suggestions are fully appreciated;)