Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loadSound Problem 1

Status
Not open for further replies.
First, since your sound is set to stream, no need to start the sound on frame 3. It will start automatically. Also allways add this to your soundObject definition, unless your sound is associated to a particular movie clip, it will keep you out of further troubles.
Code:
// init sound
sndStream = new Sound(this);
sndStream.loadSound("fessler_lowqual.mp3",true);

// start sound
// sndStream.start();

Next, since your controls are located in movie clips, you have to add the path to your sound, which was defined on the main timeline.
Thus...
On your play button...
Code:
on(release) {
    _root.sndStream.start();
}
And on your stop button (which you didn't add an action to!)
Code:
on(release) {
    _root.sndStream.stop();
}

Also note that you should disable the play button, if the sound is already playing, otherwise a new press will constantly re-start it.

You'll find how to do this in this great tutorial...



Regards,

cubalibre2.gif
 
hmm stop button works fine now but can't start the sound once more if it was stopped.. any solution?

thanks in advance!
oliver
 
Sure you've put the same start code on your start button at both ends of your tween. Setting the code at one end of the tween doesn't necessarily set the same at the other end of the tween. Might as well check your stop button also!

Regards,

cubalibre2.gif
 
hm this works fine now..

but.. why is the preloader not working?

thanks in advance!!
oliver
 
and you don't edited the preloader part? hmm
btw.. nice sound :)

thanks for your help!!
 
Only added a picture (off stage) to show you that it did work if you're on a fast connection. Otherwise, since you're loading a streaming sound (which is not preloaded), this file is so small, that you wouldn't see much of the preloader on a slow connection either.

Regards,

cubalibre2.gif
 
OldNewbie,
exactly what i needed,
how do i do it, and where was i going wrong??
 
yeah i checked, i got a link that directed me to this thread. cant find anything but swf. that show me exactly what i want to do but not anything like a fla. ???
regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top