|
-
Getting better day by day.....
media player script
the following script is working great, but can anyone tell me how i would amend the it, so that the mp3 doesn't start playing until it is fully loaded
thanks
imladris
onClipEvent (load) {
Sound = new Sound();
Sound.LoadSound("iwd.mp3", true);
Sound.start();
}
onClipEvent (enterFrame) {
_root.dl4=Sound.getBytesLoaded()/1024;
_root.dl5=Sound.getBytesTotal()/1024;
Sound.onSoundComplete = function() {_root.gotoAndPlay("MENU");}
}
onClipEvent (enterFrame) {
Sound.setVolume(_root.volume);
Sound.setPan(_root.pan);
}
-
undead creature
onClipEvent (load) {
Sound = new Sound();
Sound.LoadSound("iwd.mp3", false);
Sound.start();
}
In other words: the sound is not streamed.
-
Getting better day by day.....
d'oh !!!!
what an idiot i am hahahahahahahaha
-
Getting better day by day.....
i've replaced the true with false and the song now loads in full but the song doesn't start playing after loading is complete - any thoughts???
the full script is now :
onClipEvent (load) {
Sound = new Sound();
Sound.LoadSound("iwd.mp3", false);
Sound.start();
}
onClipEvent (enterFrame) {
_root.dl4=Sound.getBytesLoaded()/1024;
_root.dl5=Sound.getBytesTotal()/1024;
//to load the next song
Sound.onSoundComplete = function() {_root.gotoAndPlay("MENU");}
}
onClipEvent (enterFrame) {
Sound.setVolume(_root.volume);
Sound.setPan(_root.pan);
}
-
undead creature
Remove the Sound.start(); from "onClipEvent (load)" and create this function:
Code:
Sound.onLoad = function(success) {
if (success) {
Sound.start();
}
};
-
Getting better day by day.....
ok - i now have the following, but the mp3 still doesn't play -
onClipEvent (load) {
Sound = new Sound();
//to stream
Sound.LoadSound("iwd.mp3", false);
Sound.onLoad = function(success) {
if (success) {
Sound.start();
}
};
}
onClipEvent (enterFrame) {
_root.dl4=Sound.getBytesLoaded()/1024;
_root.dl5=Sound.getBytesTotal()/1024;
//to load the next song
Sound.onSoundComplete = function() {_root.gotoAndPlay("MENU");}
}
onClipEvent (enterFrame) {
Sound.setVolume(_root.volume);
Sound.setPan(_root.pan);
}
-
undead creature
Ohhh ...
Script for the child movieclip :
onClipEvent (enterFrame) {
_root.dl4=Sound.getBytesLoaded()/1024;
_root.dl5=Sound.getBytesTotal()/1024;
Sound.onSoundComplete = function() {_root.gotoAndPlay("MENU");}
Sound.setVolume(_root.volume);
Sound.setPan(_root.pan);
}
Script INSIDE of the child movieclip:
Sound = new Sound();
Sound.LoadSound("iwd.mp3", false);
Sound.onLoad = function(success) {
if (success) {
Sound.start();
}
};
stop();
I'm going home now.
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
|