25 Replies Latest reply on Oct 6, 2016 2:14 PM by just.emma

    Help converting AS3 to HTML

    benpaddlejones

      I'm using Adobe Flash Pro CC, and nothing is loading into the canvas, I know its my loader, but not sure what I have done wrong:

      this.stop(); this.addEventListener(Event.ENTER_FRAME, this.loading);  private function loading():{ var total:Number = this.stage.loaderInfo.bytesTotal; var loaded:Number = this.stage.loaderInfo.bytesLoaded;  if (total == loaded){ this.removeEventListener(Event.ENTER_FRAME, this.loading); this.gotoAndPlay(3); }

      }

      This was the AS3

      stop(); this.addEventListener(Event.ENTER_FRAME, loading);  function loading(e:Event):void{ var total:Number = this.stage.loaderInfo.bytesTotal; var loaded:Number = this.stage.loaderInfo.bytesLoaded;  if (total == loaded){ this.removeEventListener(Event.ENTER_FRAME, loading); this.gotoAndPlay(3); }  }