_this. problem

I have an mp3 player movie that loads into my main movie. The mp3’s played fine in the stand alone movie, so I changed all the variable references to _this. when I wanted it to play inside the main movie. The first song plays fine, but the rest do not load at all. If anyone could tell me what I’m missing I would really appreciate it.

zip file

Thanks guys.

The keyword is this, not _this.
You’re also creating a MovieClip in _root in one of the functions in the frame actions, remove _root from the code.

Thanks, kode, I should have known that was a problem when it wasn’t blue highlighted. Now there seems to be another problem, the forward/back buttons change the song playing, and they work until the song changes to “From Heaven,” then all it does is reload that song over and over. Heres the code:
[AS]on(press){
if(this.currentSong == “Sleep”){
this.currentSong = “Daze Gone Bye”;
}
else if(this.currentSong == “Daze Gone Bye”){
this.currentSong = “From Heaven”;
}
else if(this.currentSong == “From Heaven”){
this.currentSong == “Sleep”;
}
else{
this.currentSong == “Sleep”;
}

loadFile(this.currentSong);

}
[/AS]

Any ideas? The file is in the .zip in the first post.

Pressing the button will select one of the 3 songs in the array in sequence.
[AS]var music_array = [“Sleep”, “Daze Gone Bye”, “From Heaven”], currentSong = 0;
function loadFile(song) {
trace(music_array[song]);//i dont know what your function does
}
my_button.onPress = function() {
currentSong == music_array.length-1 ? currentSong=0 : currentSong++;
loadFile(currentSong);
};
loadFile(currentSong);[/AS]

You should define an Array object containing the names of your songs.

See this thread for an example: http://www.kirupaforum.com/forums/showthread.php?s=&threadid=27950.

[EDIT]Stay out of my thread, claudio!! :hair: JK :P[/EDIT]

Oh sorry Kax, i didnt see you were online, so i decided to try helping our friend blueshift :wink:

=)