Skip to main content
June 22, 2007
Answered

One event, two actions?

  • June 22, 2007
  • 4 replies
  • 309 views
Should be simple, but can not find the way to write 2 actions triggered by 1 event.
I have:

band_btn.onRelease = function () {
loadMovie("clip_a.swf", "_root.clip_on_stage");
}

and need also this button to do this as well:

band_btn.onRelease = function () {
gotoAndPlay(1);
}

I tried and both work separately, not together.
Thank you for sharing.

Chris.
This topic has been closed for replies.
Correct answer kglad
:

4 replies

kglad
Community Expert
Community Expert
June 23, 2007
you're welcome.
June 23, 2007
Thank you both for replying.
kglad, I knew it was something simple.
Works as hoped.
Chris.
kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
June 22, 2007
:

Inspiring
June 22, 2007
use the MovieClipLoader class and target the Initialization event for the movie clip you load. Then you just have to call the loader with the name of your swf. Once the movie loads, the init event should fire and make the loaded movie play... I am assuming from the above code that is what you want to happen. Correct me if I'm wrong.