0 Replies Latest reply on Aug 7, 2006 1:45 PM by Applied CD

    Need help recoding 2 scripts from AS2 to AS1

    Applied CD Level 1
      I’ve got a project with a 50K max file size requirement. The size report tells me that the AS2 class library is almost 48K, not a very good start. I’ve published my project with AS1 selected and the file size is within spec but the following two scripts don’t work. I’m a noob with Flash so downgrading AS code is driving me nuts. (Another option would be making the AS2 class lib smaller and only take the parts I need, can this be optimized?)

      Here’s the first script. It pauses the timeline for a specified number of milliseconds, then continues with a labeled frame:

      var nDelayID:Number = setInterval(this, "pause", 1000);
      // where 1000 is 1000 milliseconds
      function pause():Void {

      Here’s the second script. It checks the state of a checkbox and plays the specified sound if true. I just need a way to toggle audio on/off for 4 sound files.

      if (soundFXButton.selected){
      soundFX = new Sound();


      - Bob Gallo