bgreenhouse
Technical User
Hi Everyone
In Flash MX I'm trying to target a frame by it's label on the root from a loaded movieclip. Now I know you can just go _root.gotandPlay("framelabel"
, but what I want to do is to be able to dynamically change the name of frame label. Let me explain - I've got a movie with four "series" (let's call them a, b, c, and d), where each "series" is 3 frames on the timeline (so a starts at 1, b at 4, c at 7, etc). Each "series" is divided into three sections of one frame each. Each of those three frames is labelled "seriesname1", 2 or 3 (so in a it would be a1, a2, a3, in b it would be b1, b2, b3, etc.). I hope you're all still with me.
Now, each series loads the same movie onto the stage in the second frame, and after that movie has played, I want a button in it to go back to the first frame on the root timeline (in series a I want it to go back to a1, in b I want it to go back to b1, etc). Again, I know I can just put in _root.gotoandPlay("a1"
or _currentframe - 1, but what I want to do is figure out what "series" I'm in and do it dynamically, something like (although this is invalid actionscript I think you'll get what I mean):
I hope that makes sense. What I'm missing is that I don't know how to retrieve the frame label (I don't think that framelabel is a property of a frame).
Can anyone help?
Thanks
Ben
In Flash MX I'm trying to target a frame by it's label on the root from a loaded movieclip. Now I know you can just go _root.gotandPlay("framelabel"
Now, each series loads the same movie onto the stage in the second frame, and after that movie has played, I want a button in it to go back to the first frame on the root timeline (in series a I want it to go back to a1, in b I want it to go back to b1, etc). Again, I know I can just put in _root.gotoandPlay("a1"
Code:
var scenename = _root._currentframe.framelabel;
//get the name of the series
seriesname = scenename.substr(0,1);
//where I want to go
var newscenename = seriesname+"1";
//go there
_root.gotoandPlay(newscenename);
I hope that makes sense. What I'm missing is that I don't know how to retrieve the frame label (I don't think that framelabel is a property of a frame).
Can anyone help?
Thanks
Ben