How would i go about streaming audio files from my web space rather than importing them into flash?
Printable View
How would i go about streaming audio files from my web space rather than importing them into flash?
dynamically load them, i.e.
The argument 'true' in the code, causes the sound to stream.Code:s = new Sound();
s.loadSound("http://www.your_site.com/your_sound.mp3", true);
s.start();
playing = true;
Setting this to false, causes the sound to wait til it's fully loaded before it plays.
If i wanted to do the same thing where would i apply these actions if i had a on/off button
on a play button, put this code.
for the stop button put this code on the buttonCode:on(release){
if(!_root.playing){
_root.s.start();
playing = true;
}
}
Code:on(release){
if(_root.playing){
_root.s.stop();
playing = false;
}
}
and where would these actions go -
s = new Sound();
s.loadSound("http://www.your_site.com/your_sound.mp3", true);
s.start();
playing = true;
the button is named music..when i double click music in movie explorer it gives me layer 1 and 2 frames. both have actions of stop();
If you wan't authentic mp3 stream
go here
http://www.diamondbarnet.com
click on mp3 streamming link
sign up for free trial
bernie
You put the first code in keyframe 1 of the main timeline.
You put the actions for the buttons on the buttons themselves.
I applied the actions but nothing is playing
post the exact code that you put in frame 1 of your movie, and the exact code you put each button
on (release) {
if (!_root.playing) {
_root.s.start();
playing = true;
}
}
On button above
on (release) {
if (_root.playing) {
_root.s.stop();
playing = false;
}
}
off button above
and there are many layers but i dont kno which one to put the main code on. The layers are music layer, music controls, music file, and sound button.
on the music layer what do you have in frame 1?
I cannot put any code in because it says "current selection cannot have actions applied to it"
[Edited by james123454 on 07-12-2002 at 05:43 PM]