A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Is this AS2?

  1. #1
    Junior Member
    Join Date
    Dec 2009
    Posts
    12

    Is this AS2?

    Hi forum
    I'm doing a small project for a client. I have been given an 'AS2' FLA containing this code:
    Code:
    stop();
    addEventListener(Event.ENTER_FRAME, loading);
    
    function loading(event:Event)
    {
       var bytestotal = stage.loaderInfo.bytesTotal;
       var bytesloaded = stage.loaderInfo.bytesLoaded;
       var sclbar = Math.round(bytesloaded*100/bytestotal);
       loader_mc.LoadingText.text = sclbar + "%";
       loader_mc.gotoAndPlay(sclbar);
       if (bytesloaded >= bytestotal)
       {
          gotoAndPlay(2);
          removeEventListener(Event.ENTER_FRAME, loading);
       }
    }
    Can anyone confirm if this is AS2 or AS3 please?

    I ask because it won't compile, stating:
    Code:
    "Scene=preloader, layer=Layer 1, frame=1, Line 4    The class or interface 'Event' could not be loaded."
    Thanks!

  2. #2
    var x:Number = 1; x /= 0;
    Join Date
    Dec 2004
    Posts
    549
    No. That is AS3.

  3. #3
    Junior Member
    Join Date
    Dec 2009
    Posts
    12
    Cool. Just as I suspected. Many thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center