Groups | Blog | Home
all groups > flash (macromedia) > november 2003 >

flash (macromedia) : Multiple buttons on stage: some work some don't



et10yl
11/26/2003 11:25:38 PM
Hiya,

I have several buttons on the stage (one scene only). 1 of them (the skip intro button) works, the rest of them don't. All the buttons use the same code, all placed in a layer called Actions:

this.InstanceName.onRelease = function() {
gotoAndStop("frameLabel");
}


I have found that if I place the action directly on the button itself, instead of using actionscripting in an actions layer, the button will work. But then, it seems that I'd have to put the code on each keyframe that holds the button.

Code I put on individual button:
on(release){
gotoAndStop("frameLabel");
}

Any thoughts?

Thanks!
noushie



urami_
11/27/2003 11:48:18 AM

[quoted text, click to view]


Well , you must insert multiple NEW or BLANK frames prior to assigning the action.
If you give button an action on(release){ and than add frames , each frame will have copy of the button
with action. If you add action after you added frames , each frame consider that button to be a new
instance and does not automatically populate the actions.
The point of it is to allow you recycle your buttons and use multiple functions , saving size and
work time :)
Now , in regard to timeline based button events , the button must be present while the frame with event is entered.
Otherwise flash won't carry on the actions in memory , if you enter frame and few frames later , after some
blank or new frames , try to use that button , it no longer has that action .

Regards

urami_*



<lsym>

There's no place like 127.0.0.1

AddThis Social Bookmark Button