Skip to main content
iccolor
Inspiring
November 3, 2017
Answered

Animate CC AS3 - script problem laoding movie clips to stage

  • November 3, 2017
  • 2 replies
  • 276 views
  1. I have 96 buttons that load 96 different movie clips. When user clicks each button (not simple button) it's corresponding movie clip loads from library to stage and plays. if another movie clip is already playing,  it is removed so the other one can load and play. 
This topic has been closed for replies.
Correct answer kglad

you need an object in your library with class name = Saf_Jan01_25.

if you think you do, and clicking that button has no effect, embed a screenshot showing that object's symbol properties panel:

2 replies

iccolor
iccolorAuthor
Inspiring
November 3, 2017

I'm hoping you can help me with my dilemma. I have 96 buttons that when one is clicked it load its corresponding movie clip from the library to stage and plays. If another movie clip is already playing,  it is removed and the other one can load and play.  The AS3 script below but there seems to be something wrong because no movie loads when button is clicked and also I'm not sure how to write the code to remove a movie if one is playing prior to a button click.  Any help would be greatly appreciated.  Thank you

btn_SAFER_25_1Jan.buttonMode = true;

btn_SAFER_25_1Jan.addEventListener(MouseEvent.CLICK, fl_MouseOverHandler2);

function fl_MouseOverHandler2 (e:MouseEvent):void {

var saf_Jan01_25:Saf_Jan01_25 = new Saf_Jan01_25();

this.addChild(saf_Jan01_25); saf_Jan01_25.x = 394;//sets the x position

saf_Jan01_25.y = 344;//sets the y position }

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
November 3, 2017

you need an object in your library with class name = Saf_Jan01_25.

if you think you do, and clicking that button has no effect, embed a screenshot showing that object's symbol properties panel:

kglad
Community Expert
Community Expert
November 3, 2017

do you have a question?