3 Replies Latest reply on May 6, 2013 7:15 AM by Ned Murphy

    AS 2 Error: The class or interface 'Event' could not be loaded.


      Hey, I'm new to the forums and I have problems with Flash that i just cant fix. I have this error that keeps telling me how "The class or interface 'Event' could not be loaded. The error is on the 5th line of the code:



      1  stop();

      3  addEventListener(Event.ENTER_FRAME, preLoad);

      function preLoad(e:Event):void{

      6      var bytestoLoad:Number = loaderInfo.bytesTotal;

      7      var numberLoaded:Number = loaderInfo.bytesLoaded;

      8      if(bytestoLoad == numberLoaded){

      9          removeEventListener(Event.ENTER_FRAME, preLoad);


      } else {

      _root.preLoader.preLoaderFill.scaleX = numberLoaded/bytestoLoad;

      _root.preLoader.bytesPercent.text = Math.floor(numberLoaded/bytestoLoad*100) + "%";




      I know that the code is for AS3 but I cant switch to AS3 atm and I need the same code, but for AS2. So, can anyone convert this for me? By the way, this is supposed to be a preloader and I am putting this on the 1st frame. I have so extensions (.as), just the .fla file.

      Also, I am using the newest Flash, Adobe Flash CS6.