-
controlling music files
Hello,
I have a music file that places and loops when my site loads. I would like to turn this loop off or reduce the volume when I push play to play another music file. How can I do this? The other music file is controlled using the flash media component. Btw, I have Flash 8.
Thanks,
tdsilk
-
Senior Member
Put your looping sound inside a movieclip. Then, create a new Sound class object:code: music = new Sound(movieClip);
-
Use a listener object that will respond anytime you start playing the file with the media component.
You could erase the else condition, which will start the loop back when you stop the other file.
var listenerObject:Object = new Object();
listenerObject.click = function(eventObj:Object) {
if(myMedia_component.playing == true){
myLoop.stop();
}else{
myLoop.start();
}
};
myMedia_component.addEventListener("click", listenerObject);
-
Hi Inasite,
I'm pretty new to actionscript, so let me see if I understand you correctly. Are you saying that I need to place my sound loop in a MC called myLoop? Currently the sound loop is on a layer on the timeline. It's set as an event that loops 99 times. Also, is the myMedia_component in your post the linkid or component instance name for the sound playing in the Media player component? Thank you in advance for your help.
tdsilk
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|