View Full Version : Sound not synching to Moivie clip
MrBungle
07-30-2001, 02:05 PM
Can anyone help me figure out why this doesn't work? I have a very simple MC of just 20 frames, into this I've added a layer called 'Sounds' and then dragged my imported (file>import) sound clip, in .wav format onto the stage. When I trigger the movie, through a button event, the movie plays fine but the sound takes ages to play, like a good few seconds delay. When I set the sound panel options to be 'stream', the sound plays with the movie clip, but the whole thing is now jarred and slow. Can anyone point me in the right direction to get this to work. All I want is a 'pop' noise as my movie plays.....
Thanks in advance
Ben
MoFro
07-30-2001, 02:22 PM
Here's something you can try.
Go into your library and right click (PC) or ctrl click(mac)
on your sound file. Then select linkage. In the linkage menu select export file and give the sound an instance name for example pop. Then go to the first frame of your MC and on the sounds layer put these actions:
s=newSound();
s.attachSound(pop)
s.start(0,0)
In that last line of code the first 0 is the number of seconds offset which is 0 if you want the sound to play immediately, and the second 0 is the number of loops. I can't remember if a 0 or 1 means it will only play once and stop.
I hope this helps.
MrBungle
07-30-2001, 02:40 PM
Sorry to sound such a div, but....do I still need to have dragged a copy of it from the library onto the stage of the sound layer (so that the wave from is in the layer timeline?) as well as the script you gave me?
Thanks for the help
Ben
MoFro
07-30-2001, 02:44 PM
no
you can just put the code. as long as you properly link everything you won't need to drag an instance of the sound onto the timeline.
MrBungle
07-30-2001, 03:45 PM
My bad, it works great now!
I needed to select the sound in the sound panel from the pull down menu
Thanks
Ben
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.