3 Replies Latest reply on Dec 22, 2006 10:58 PM by kglad

    adding actions to button instance names in first frame

    Jonibean Level 1
      I have a little movie clip to play some mp3 files. It starts with a list, and for each song is a button, which, when pressed, stops sound, starts a new mp3, and goes to another frame which has a stop button in that particular button's place. I am trying to do it using instance names for the buttons and adding the actionscript in the first frame rather than on the buttons themselves, and it sort of works, but each song plays only once (going down the list) The stop button doesn't work at all. In each of the other main section frames, there is a stop action, but nothing else except the buttons. I am pretty new at this, so everything takes a lot of research to figure out. I'd love any help anyone can give me, as I may have syntax wrong or something. Do I need to add this code to each of the section frames or something?

      This is my actionscript:

      btn_stop.onRelease = function(){

      btn_Song1.onRelease = function(){
      var song1:Sound = new Sound();
      song1.loadSound("Soaring1-Burlesque.mp3", true);

      btn_Song2.onRelease = function(){
      var song2:Sound = new Sound();
      song2.loadSound("Soaring2-PopCyclePotpourri.mp3", true);

      btn_Song3.onRelease = function(){
      var song3:Sound = new Sound();
      song3.loadSound("Soaring3-PopCycle-SongofLight.mp3", true);

      btn_Song4.onRelease = function(){
      var song4:Sound = new Sound();
      song4.loadSound("Soaring4-PopCycleRipsnorter.mp3", true);