0 Replies - 3587 Views - Last Post: 29 November 2013 - 01:08 PM

#1 CodeNubee  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 22
  • Joined: 28-March 13

Loading sound when movie clip loads

Posted 29 November 2013 - 01:08 PM

I am using Adobe Flash Professional CS6

What I am trying to do is play a mp3 file that I have in my library when the clip loads and stop playing it when the a new clip is selected from the menu I created. On the button that loads the movie clip (Instance name: Slideshow), I have the following code:
on (release){
	gotoAndPlay(120);
}
onClipEvent (load){
	mySong = new Sound();
	mySong.attachSound("MastersThisHall");
	mySong.start(0,50);
}
onClipEvent (unload) {
	mySong.stop();
}


- I went to the properties of the MastersThisHall.mp3 file in my library,
- Selected the "ActionScript", tab,
- Checked the box that says "Export for ActionScript",
- Unchecked the "Export in frame 1" check box, and
- Added MastersThisHall in the "Identifier" field.

The sound is NOT playing when I when the "Slideshow" button is pressed.

Ideas?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1