Search  

AS3 HELP

HomeForumsHelp NeededAS3 help
Default-profile signalr32
11 posts
Bought between 10 and 49 items

hey you guys okay so this is what i got.

I got Scene 1. In scene one is a movie clip called aboutus with code in line one that says:

//--—Set Button Mode---\\ this.buttonMode = true; this.mouseChildren = false; //--—\Set Button Mode---\\

//--—Add Event Listeners----—-\\ this.addEventListener(MouseEvent.MOUSE_OVER, btnOverListener); this.addEventListener(MouseEvent.MOUSE_OUT, btnOutListener); this.addEventListener(MouseEvent.MOUSE_DOWN, btnDownListener); //--—\Add Button Listeners----—-\\

//--—Button Listeners----—-\\ function btnOverListener(e:MouseEvent):void{ aboutus_btn.gotoAndPlay(“btnOver”;); }

function btnOutListener(e:MouseEvent):void{ aboutus_btn.gotoAndPlay(“btnOut”;); }

function btnDownListener(e:MouseEvent):void{ .root.gotoAndPlay(150); } /////////////////////////////////////////////////////////////////////////////

Problem is this..

function btnDownListener(e:MouseEvent):void{ .root.gotoAndPlay(150); }

Does not go back to the main movie scene and start to play at 150. What is the AS3 line of code to put within a movie clip to play frame 150 from Scene 1..

THANK YOU

Posted about 1 month ago
19189 Palehosefan
30 posts
Referred at least one person Sold between 1 000 and 5 000 dollars Bought between 1 and 9 items

You have a dot in front of root that shouldn’t be there, “function btnDownListener(e:MouseEvent):void{ .root.gotoAndPlay(150); }”

Just as an aside, you might want to just scrap the code inside a movieclip. Just copy and paste the code into your main timeline and adjust the “this” code. AS3 doesn’t like code inside objects very much.

Posted about 1 month ago
3113 geoken
533 posts
Author was featured Sold between 1 000 and 5 000 dollars Bought between 1 and 9 items

You should use parent instead of root.

Posted about 1 month ago