I crea开发者_JS百科ted simple web site .That includes on main scene 3 layer. one Buttons,Actions and Pages.In buttons layer I created new 5 button and connected them as a movie clip.In button movie clip I added new layer for actions.All of them works normal.But when I press button I want to move my Pages layer to next one or one of frame.But gotoAndStop(3); does not work.Because it is in button movie clip.How can I reach scene? scene.gotoAndPlay(2) does not work.
@Meko flash.display.Stage doesn't have a gotoAndStop method[1], you will have to cast it to a MovieClip to make it do that.
MovieClip(this.root).gotoAndStop("Menu");
This will only work if your root is a MovieClip.
[1]http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/display/Stage.html
if I understand what you mean... you can use parent.gotoAndStop(3); ('parent' will be the one containing 'this'.. so in your case parent will be root of display list)
or you can generally use stage.gotoAndStop(3); (stage is always the root of display list)
精彩评论