View Full Version : MC levels
rsquare
August 1st, 2007, 11:32 AM
Good day I feel like this is a stupid question but it's always bothered to not know this.
I have my main timeline where all of the different pages are, in this timeline I created a movie clips and inside that movie clip I have a couple of buttons. How do I get those buttons to use the gotoandplay function on the main timeline and not in the MC that i placed them in?.
thank you
Gianfranco
GrndMasterFlash
August 1st, 2007, 11:52 AM
lets say your MC is called my_mc
and your BUTT is called my_butt
so
function mouseclick(event:MouseEvent):void {
//ya actions ga ear
}
my_mc.my_butt.addEventListener(MouseEvent.MOUSE_DO WN, mouseclick);
dig?:thumb2:
rsquare
August 1st, 2007, 12:00 PM
Thank you! so where would I place the gotoandplay function?
GrndMasterFlash
August 1st, 2007, 12:54 PM
Thank you! so where would I place the gotoandplay function?
start is a frame name, stages is the scene name
function click(event:MouseEvent):void {
gotoAndStop("start","stages");
}
rsquare
August 1st, 2007, 01:51 PM
thank you :hugegrin:
rsquare
August 1st, 2007, 02:15 PM
I'm really sorry about this but i am a bit confused.
The main Scene is called Scene1
the MC where the button is, is called menu_general
So should I place the code on the button inside the MC and write
function click(event:MouseEvent):void {
gotoAndStop("100","Scene1");
}
or should the code be on a frame?
thank you again for the great help
GrndMasterFlash
August 1st, 2007, 04:14 PM
I'm really sorry about this but i am a bit confused.
The main Scene is called Scene1
the MC where the button is, is called menu_general
So should I place the code on the button inside the MC and write
function click(event:MouseEvent):void {
gotoAndStop("100","Scene1");
}
or should the code be on a frame?
thank you again for the great help
i wa do et like dis
//place this on your main time line
function click(event:MouseEvent):void {
gotoAndStop("100","Scene1");
}
//displaces da code on da button for ya
menu_general.youbutton.addEventListener(MouseEvent .MOUSE_DOWN, click);
:thumb2:
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.