0 Replies Latest reply on Oct 20, 2006 8:01 AM by jmarchan

    Diff buttons, same function

      I have 4 buttons named boton0, boton1, boton2 and boton3, and I want them to play different videos when I click on them. What i'm trying to do is execute the same function with a different parameter according to the button pressed but when I assign the function to each .onRelease event, the function gets executed. What's the right way to do this?

      loadVarsVideos.onLoad = function(success:Boolean) {
      if (success) {
      arrVideos = loadVarsVideos.videos.split(",");
      arrDesc = loadVarsVideos.desc.split(",");
      for (j=0; j<cantidad; j++) {

      this["boton"+j].onRelease = cargarBoton(arrVideos[j]);
      } // fin del for
      } else {
      trace("Error loading/parsing LoadVars.");