-
Help please with this script, sure its simple :)
hi
I have a Flash MP3 player which I downloaded. It works fine but I want to make it so that it doesnt autoplay the first tune when it loads.
Heres the script, Id appreciate any help with making this work
Thanks alot
Code:
function stop_all() {
this.content.gotoAndStop(1);
this.seek_bar.gotoAndStop(1);
this.seek_bar.handle.gotoAndStop(1);
}
function playItem (nr) {
mySound.stop();
mySound = new Sound();
this.fileType=_global.playlist[nr].fileType;
this.content.gotoAndPlay("stop");
//seek bar
this.seek_bar.gotoAndPlay("stop");
this.seek_bar.handle.gotoAndPlay("stop");
// prep time
if (this.fileType == "mp3") {
this.time_length = _global.playlist[nr].time;
} else {
delete (this.time_length);
}
this.time.gotoAndPlay("stop");
// title
if (nr < 10 ) {
var sNr = "0" + nr;
} else {
var sNr = String(nr);
}
title.title_text = sNr + ". "+ _global.playlist[nr].artist + " - " + _global.playlist[nr].title;
title.gotoAndPlay(2);
//controles
controles.gotoAndPlay("stop");
}
function doPrev() {
if (shuffle == false) {
if (loadNr > 1) {
loadNr--;
} else {
loadNr=_global.itemNr;
}
} else {
var temp_rand = random(_global.itemNr)+1;
while (loadNr == temp_rand) {
var temp_rand = random(_global.itemNr)+1;
}
loadNr = temp_rand;
}
playItem(loadNr);
}
function doNext() {
if (shuffle == false) {
if (loadNr == _global.itemNr) {
loadNr=1;
} else {
loadNr++;
}
} else {
var temp_rand = random(_global.itemNr)+1;
while (loadNr == temp_rand) {
var temp_rand = random(_global.itemNr)+1;
}
loadNr = temp_rand;
}
playItem(loadNr);
}
loadNr=1;
playItem (loadNr);
mySound = new Sound();
-
var x:Number = 1; x /= 0;
Just remove the second to last line: "playItem (loadNR);"
That should be all.
Hope this helps!
-Zippy Dee
Ted Newman
-
Thanks for the reply
This does stop it from playing the first track but it messes up the buttons. i.e. there is no PLAY button to start the track, so there must be something in a function that switches the buttons on and off as well......
Thanks again
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
|