You can put it on the instance. Not sure what mandingo meant. What
action, exactly are you putting on the button? By the sound of your error
message, you must be putting your gotoAndPlay() (or whatever) in there
without wrapping it in an on() handler.
[quoted text, click to view] > AFAIK the "on Release" handler should be created automatically when I
assign
> an action to a button no? This seems to have been the case in a previous
movie
> I made. Why isn't it doing it now?
You have to type the handler yourself, but it's easy. on() is the
handler, and it accepts a number of events ("release" being on of them), so
....
on(release) {
// your code here
}
Keep in mind, this on() business only works when the script is attached
to the instance. I personally prefer the name-your-instance approach also
in mandingo's post. If you give your button (or movie clip) instance a
name, then you can "call it" by name and tell it what to do from the main
timeline -- that is, from a frame script. To me, it's nicer that way,
because you don't have to go hunting for your code later, as it's all there
in (possibly) frame 1.
David
stiller ( at ) quip ( dot ) net
[quoted text, click to view] "TC5" <webforumsuser@macromedia.com> wrote in message
news:camuhn$d9h$1@forums.macromedia.com...
> If you can't put the code on the instance where can you put it? You can't
put the action on the button itself.