all groups > flash (macromedia) > november 2004 >
You're in the

flash (macromedia)

group:

retrieve frame label?


retrieve frame label? Anais
11/23/2004 10:33:07 PM
flash (macromedia):
Re: retrieve frame label? Anais
11/23/2004 11:10:25 PM
Re: retrieve frame label? Jeckyl
11/24/2004 9:54:43 AM
You cannot directly determine the frame label for a frame.

There is a very tricky and cpu intensive way trick that lets you see what
frame a given label is on (which is not what you are after anyway) that
involves making a duplicate of the clip your in, and then doing a
gotoAndStop to the frame, looking at the _currentframe, and then removing
the movie clip before the script in that frame has time to execute. Very
ugly code that relies heavily on the current way FlashPlayer handles script
in removed clips. Avoid that at all costs.

And that won't help your, because you want the opposite .. the frame label
for the frame you are on.

I suggest that you do something like this for each frame

currentlabel = "whatever";

and put script like that on each frame, setting the value of 'currentlabel'
to be whatever the current label is.

For most purposes that will do what you want. But its not foolproof and
won't work in some situations (ie you could get wrong _currentframe and
currentlabel not matching correctly).

AddThis Social Bookmark Button