Question
Trouble Understanding variables
I am committed to learning A3, but HOLY CRAP!! I have never
been a programmer, just a lowly designer. Apparently a pretty dumb
designer! :)
I can breeze through this in AS2 with no problem, but AS3 is killin' me! I am trying to create a music player that will embed in a web page, it will be XML driven and the XML will be populated via a database and generated by PHP. I am using a listbox component to display the playlist (from the XMLfile). I have figured out how to start playing the first mp3 on the list.
Now when the user click a different button, I can get that song to play also, but I ended up created a second sound object, so the two play at the same time. Not good. I have tried and tried to access the object that is playing the first sound so I can stop it and load a new sound into it - I am about to pull my hair out!
I seem to missing a basic understanding of how to access this object and change the variable value so I can play a new song. Any help would be GREATLY appreciated!!
I can breeze through this in AS2 with no problem, but AS3 is killin' me! I am trying to create a music player that will embed in a web page, it will be XML driven and the XML will be populated via a database and generated by PHP. I am using a listbox component to display the playlist (from the XMLfile). I have figured out how to start playing the first mp3 on the list.
Now when the user click a different button, I can get that song to play also, but I ended up created a second sound object, so the two play at the same time. Not good. I have tried and tried to access the object that is playing the first sound so I can stop it and load a new sound into it - I am about to pull my hair out!
I seem to missing a basic understanding of how to access this object and change the variable value so I can play a new song. Any help would be GREATLY appreciated!!