Click to See Complete Forum and Search --> : Help! audio going crazy (Flash)


kate!!
11-19-2007, 06:52 AM
Hi there,

Just wondering if anyone can help me with using audio in flash as I am making a website which has a sound track that starts when the user enters. Also I have made audio buttons that switch the audio track on and off but the problems I am having are when you go back to the beginning page the same track repeats so there are multiples of the same track playing, making an overlapping effect. Also when you switch it off on other pages the track comes back on when go back to the beginning (home page) – where the audio starts.

So what I want to achieve is the track to begin when entering the site and then for the user to have the choice to have the sound on or off – without it overlapping or coming back on.

This is making loopy so if anyone can help it would be appreciated.
Thanks,
Kate

p808
11-26-2007, 05:47 PM
I don't understand or can't guess the mechanics of your website, but this is what I usually do. I make the sound start on frame 1 lets say. But all animation and movie clips start on frame 2 (except backgrounds and things like that). Then when you click "home" the button points to frame 2, by passing frame 1 and the restart of song.

Did that make any sense?
P808

kate!!
11-27-2007, 04:37 AM
It makes perfect sense but I already have "home" on another frame to where the audio starts. I think maybe it's the audio buttons I'm using, got the tutorial for them here: http://www.entheosweb.com/Flash/flash_sound_button.asp

thank you for your help!

kate!!
11-27-2007, 04:49 AM
Sorry, yeah I've just tried deleting the audio buttons and just placing the audio onto the timeline and it doesn't repeat at all, which is great but I do need some audio controls. I know it's a bit cheeky but you don't happen to know how make good audio buttons that switch the audio on and off without repeating the track or the track coming back on, when you go back to the home page.

I hope I haven't confused you, I'm not that good at explaining

p808
11-27-2007, 10:44 AM
music on/off – always have all files in the same folder. It makes it a lot easier. Create an empty movie clip and call it music buttons. Then drag out and instance of a button on frame one. Then add a blank keyframe on frame 2 and add the play or go button making sure they are aligned. Open a new layer for actions. Open frame one in the actions layer and open the actions panel. Enter a stop press enter and type:
stop() ;

var mySound:Sound = new Sound() ;

mySound.loadSound(“08.mp3”, true) ;

of course where 08.mp3= whatever the name of the file your trying to play. Next click on the button in the first frame and open the actions panel. Type:
on (release) {
mySound.stop() ;
nextFrame() ;
}

move the playhead onto frame 2 and click on the button and type:
on (release) {
mySound.start() ;
prevFrame() ;
}
Here you must save!

kate!!
11-29-2007, 06:01 AM
Really sorry for the late reply as I wanted to try your scripting first. Anyway I've done it and it works perfectly thank you soooo much, I am so happy I can't stop smiling.

Thanks, you have made my year!

p808
11-29-2007, 08:07 AM
Hey your welcome!