2 Replies Latest reply: Feb 22, 2010 9:16 PM by TorQue[MoD] RSS

    Change AS2 file to AS3?

    TorQue[MoD] Community Member
      Hey all!
      I started a new flash project and accidentally chose Action Script 2 instead of Action Script 3 and didn't realize it until I had already done quite a bit of work in the timeline. Just wondering if there's an easy way to change the document type to AS3?
      I tried simply using the AS3 option in the drop down menu in the actions panel, but it still gives me a syntax error when I know the code works fine in an AS3 document.
      Thanks!
        • 1. Re: Change AS2 file to AS3?
          Ned Murphy CommunityMVP

          Go into the Publish Settings and in the Flash section select AS3.

          • 2. Re: Change AS2 file to AS3?
            TorQue[MoD] Community Member

            Thank you. I tried that, but now when test the movie I get two compile errors:

             

            WARNING: The component 'FLVPlayback' requires ActionScript 2.0.
            WARNING: The component 'UIScrollBar' requires ActionScript 2.0.

            And the playback does not stop at the frames I have told it to using a simple stop(); action. I know I've used a UI Scrollbar in AS3 before and I definitely know FLV Playback doesn't require AS 2.0 so maybe I need to change the settings of those components to be 3.0 components? Not sure how to do that though.

             

            *UPDATE: Deleting the FLV and the UI Scrollbar and then adding them again fixed this problem. Obviously the components from AS2 and AS3 are much different.

             

            On a different note, I have two other questions for you... Firstly, I've got the FLV Playback component starting off stage and sliding in to the center when the page loads. This seems to work fine in the timeline, but when I test the movie, the video remains on the right side of the stage and doesn't slide in. Any idea why?

             

            Secondly is there a way to pause the video when you navigate to another page? Cause it keeps playing in the background (I can hear the audio still) even though I click on another page.

             

            Thanks!