
Welcome Guest
|
#4
|
||||
|
||||
|
nested button scene change
Quote:
To get this to work, you need a function on the timeline that gives the button its code. Just make sure you have given your container movieclip, and the button instance names, and type them in. This code goes on the main timeline, and you're all set to go. Actionscript:
containerMC.Scene_Change_BTN.onRelease = function (){
gotoAndPlay("Scene 2", 1);
};You can use these Assignment Functions (that is my made up name for these. I dont know their real name) to assign code to any object in your scene as long as it has an instance name. While I myself do not use this method often, some people use it exclusivly. It can be very helpful if you don't like hunting through several nested layers to change code, or if you have a bunch of similar buttons/movieclips that all require the same code (simply use a for loop) doing this also lets you centralize your code, so you don't have to remember what code is on what button. it's all in the same place.
__________________
Play me in QUADRADIUS It's like checkers with powerups, the perfect "bored at work" game. Challenge Gusto |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| super simple question needs answer urgently! | littlefoible | Newbies |
2 | 12-09-2008 03:02 PM |
| Simple Question - Primitive tools | moriwenne | Flash CS3 / Flash 9 |
2 | 11-29-2008 04:46 AM |
| simple as3 question. | fhickler | Newbies |
2 | 02-25-2008 04:39 PM |
| Simple newbie display object hiarchy question | cdb0324 | Flash CS3 / Flash 9 |
2 | 09-28-2007 06:46 PM |
| Simple shape question | Ash | Newbies |
4 | 03-18-2004 07:37 PM |






