# \_this. problem

**URL:** <https://forum.kirupa.com/t/-this-problem/29781>\
**Category:** flash\
**Created:** [August 30, 2003, 7:15pm UTC](https://forum.kirupa.com/t/-this-problem/29781 "2003-08-30T19:15:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![blueshift](https://avatars.discourse-cdn.com/v4/letter/b/ac91a4/32.png) [@blueshift](https://forum.kirupa.com/u/blueshift)\
**Post date:** [August 30, 2003, 7:15pm UTC](https://forum.kirupa.com/t/-this-problem/29781/1 "2003-08-30T19:15:18Z")

</div>

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](http://web.ics.purdue.edu/~rstremke//_this.zip)

Thanks guys.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2003, 7:38pm UTC](https://forum.kirupa.com/t/-this-problem/29781/2 "2003-08-30T19:38:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2003, 9:27pm UTC](https://forum.kirupa.com/t/-this-problem/29781/3 "2003-08-30T21:27:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2003, 9:39pm UTC](https://forum.kirupa.com/t/-this-problem/29781/4 "2003-08-30T21:39:46Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2003, 9:40pm UTC](https://forum.kirupa.com/t/-this-problem/29781/5 "2003-08-30T21:40:40Z")

</div>

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](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=27950).

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2003, 9:48pm UTC](https://forum.kirupa.com/t/-this-problem/29781/6 "2003-08-30T21:48:36Z")

</div>

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

=)
