3 Replies Latest reply on Oct 3, 2007 4:44 AM by Michael_Rabone

    Upgraded to CS3 - Script not woriking now

      Hello. Small ActionScript issue here. I've got a flash animation embeded in a html file. If at any point you want to skip the animation and proceed to the next page in the html course you can by clicking a button. This button contains the following ActionScript:

      on (release) {

      And when the animation comes to the end:


      It's been working fine until I recently upgraded to Flash CS3. This script seems to work only upto Flash Player 6. What changes to I need to do to this script to make it work?

      Thanks. Help appreciated.
        • 1. Re: Upgraded to CS3 - Script not woriking now
          AScracker Level 1
          In As 3.0 on(press) function won't work we need to change the script like this

          function onPress_but(event:MouseEvent) {
          var target_URL:URLRequest = new URLRequest(" http://google.com/");



          • 2. Re: Upgraded to CS3 - Script not woriking now
            Hi. You didn't mention whether or not you're using the AS2 or AS3 compiler. I'll assume you're
            using AS3.

            if you are trying to call javascript functions that are embedded in the html page,
            read the built-in documentation on ExternalInterface.call()
            AS3 seems like alot of extra typing alot of the time, but it's neat methods for the built in Classes like this that make it worth the effort.

            Adding scripts directly on buttons isn't allowed in AS3. You'll need to attach a listener with an event handler that
            calls your script.

            import flash.events.*;
            var myButton:Button=new Button();

            //function called when myButton is pressed
            function loadMyScript(event:EVENT):void{

            hope this helps. :)
            • 3. Re: Upgraded to CS3 - Script not woriking now
              Michael_Rabone Level 1
              Thanks for your help and applogies for not mentioning what ActionScript I'm using.

              I'm actually using ActionScript 2.0. Any ideas to why I've got this issue?