Playing a mp3 when a movie clip loads
i using adobe flash professional cs6
what trying play mp3 file have in library when clip loads , stop playing when new clip selected menu created. on button loads movie clip (instance name: slideshow), have following code:
[code]
on (release){
gotoandplay(120);
}
onclipevent (load){
mysong = new sound();
mysong.attachsound("mastersthishall");
mysong.start(0,50);
}
onclipevent (unload) {
mysong.stop();
}
[/code]
- went properties of mastersthishall.mp3 file in library,
- selected "actionscript", tab,
- checked box says "export actionscript",
- unchecked "export in frame 1" check box, and
- added mastersthishall in "identifier" field.
the sound not playing when when "slideshow" button pressed.
ideas?
attach code main timeline:
mysong = new sound(this);
mysong.attachsound("mastersthishall");
mysong.start(0,50);
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment