sub-menus I've got a product list, that menu is all in a Movieclip
to navigate around the various submenu's.
Within the movieclip I have product buttons that should go to
a Product Specs page, in Scene2 (''Products'') each frame is a
different product spec page.
On my button within the movieclip in Scene1(''Main Menu'') I
have the code:
on(press){
gotoAndStop(''Products'', 1);
}
But it just seems to load frame1 of the movieclip, so I tried
prefacing the goto with _root. and this. but when I did that the
button wouldn't load anything at all.
Any help?Navigating to New Scene from Within a...
No body has any ideas? Even a push in the right direction
would be greatly appreciated, I'm kind of at a stand-still on this
project until I can get this to work properly.Navigating to New Scene from Within a...
try _parent. also, is your scene actually named Products,
because that's what its looking for
Yea the scene is named ''Products'', but I just read this in
the Flash Help:
In the final example, the global gotoAndStop() function is
used to move the playhead to Frame 1 of Scene 2. If no scene is
specified, the playhead goes to the specified frame in the current
scene. You can use the scene parameter only on the root timeline,
not within timelines for movie clips or other objects in the
document.
So is there a work-around for this? Or am I going to have to
re-design the layout/workflow/directories/everything i dont want to
do?
I feel like the fact that you can't use scene commands within
a movieclip or object is pretty weak...
well if that's what it says, i'd believe it. try google, but
i'm putting my money on having to re-design.
try _root.gotoAndStop(''Products'', 1);
In the example I see in flash, they aren't assigning button
scripts like you are, they are assigning them on the main timeline.
So, instead of putting the button behavior directly in a
Button script, try setting it on the main timeline like the example
from my version of Help.
From help...
Example
In the following example, a document has two scenes: sceneOne
and sceneTwo. Scene one contains a frame label on Frame 10 called
newFrame, and two buttons, myBtn_btn and myOtherBtn_btn. This
ActionScript is placed on Frame 1, Scene 1 of the main Timeline:
stop();
myBtn_btn.onRelease = function(){
gotoAndStop(''newFrame'');
};
myOtherBtn_btn.onRelease = function(){
gotoAndStop(''sceneTwo'', 1);
};
Can I use the InstanceName.onRelease = etc, because I tried
just replacing myBtn_btn with my button's name, and it didn't work.
Or do I have to assign the button to a variable or function
or something else?
I actually think that no matter where I declare its action,
it'll still happen within the MovieClip, because thats where the
Button resides.
I guess I'll re-design until some Devs fix the
scene/actionscript problems. I was reading on other boards about
other people that can't get scenes to work entirely right with
actionscript.
Oh well, It'll still work, just be a lot less
organized.
No comments:
Post a Comment