Hi Guys,
I have attached I file that I’ve been battling with for a bit. It’s a pretty simple file. As the file loads there is a basic animation eventually turning into a menu. The onRelease event for the “Click Here” button animates “_off” the current selection menu (select_mc movie clip) before animating “_on” the new movie clip (called ‘owner_mc’).
My goal is simply to have the onRelease event for the “Click here.” button within the ‘owner_mc’ to animate “_off” the ‘owner_mc’ before animating “_on” the ‘select_mc’.
[COLOR=blue]Keep in mind the “_on” and “_off” are labels within the movie clips that have already been created.[/COLOR]
[COLOR=red]‘owner_mc’ resides within Frame 16 on the ‘Home Owner’ layer on the main timeline.[/COLOR]
The attached file works to a point.
[LIST=1]
[]The initial menu (select_mc) is loaded fine.
[]The onRelease event for the “Click Here” button (located within ‘select_mc’) animates “_off” the ‘select_mc’ before animating “_on” the ‘owner_mc’.
[*]The onRelease event for the “Click here.” button (located within [COLOR=blue]‘owner_mc[/COLOR]’) animates “_off” the ‘owner_mc’ but WILL NOT animate [COLOR=red][COLOR=black]"[/COLOR]_on[/COLOR]" the ‘[COLOR=red]select_mc[/COLOR]’.[/LIST]***********
You will see from the code below that I’m using ‘onEnterFrame’ to control the “_off” and “_on” animations.
owner_back_mc.onRelease = function (){
gotoAndPlay("_off");
owner_mc.onEnterFrame = function (){
if (owner_mc._currentframe == 15){
_root.select_mc.gotoAndPlay("_on"); // select_mc refers to the 'selection menu'
delete (owner_mc.onEnterFrame);
}
}
}
I’m not sure where exactly on the main timeline (frame-wise) “_root” takes me - to Frame 1 or the last frame that was accessed?
This could really play a factor because ‘select_mc’ does not come into play on the main timeline until the initial animation plays through and stops … on Frame [COLOR=red]16[/COLOR]. My guess is it is a scope/targeting issue of some sort … but I’m not sure where.
One thing that really interests me is if a ‘stop’ action is placed in Frame 1 of ‘select_mc’ movie clip … the call below (on Frame 16, ‘Actions’ layer of the main timeline - that is part of the initial animation) never takes place:
select_mc.gotoAndPlay("_start");
That makes no sense to me … a label is used. It should simply move to the frame labeled ‘_start’ and play. Between this and the fact that ‘select_mc’ is sitting on the main timeline and the code above (_root.select_mc.gotoAndPlay("_on") doesn’t work - leads to believe there are issues within the ‘select_mc’ movie clip. Some code likely either needs to be added or moved to the Actions layer within ‘select_mc’.
I’ve attached a ‘scaled-down’ version of my real FLA file. It’s not zipped or anything. It will truly only take a moment for anyone out there willing to lend a hand to take a look. Anyone that is willing to do so - I would very much appreciate. It’s likely something simple that I’m overlooking.
If by chance, a solution is found - will you please describe what steps should be taken to fix it rather than simply uploading the revised file? Reason being, as stated previously … this is a ‘scaled-down’ version and I will need to apply necessary changes to my real FLA file.
Thanks in advance for anyone willing to lend a hand.
[COLOR=red]DO NOT USE THE FILE ATTACHED TO THIS POST … (Almost.fla)[/COLOR]
[COLOR=red][/COLOR]
[COLOR=red]USE THE FILE IN THE NEXT POST … (Almost-rev.fla)[/COLOR]