title: Converting ActionScript 3 FLA’s to HTML5 canvas FLA’s in Flash cs6
body: <p><strong>Hi there,</strong>
  i have doubt about converting <strong>.fla</strong> files to <strong>html5 canvas</strong>. i am developing the project by using <strong>Action script version 3</strong> but now i want that project on <strong>html5 canvas</strong> for the browser compatibility and other issues to be solved..</p>
  
  <p>Anyone help me to solve the issue</p>
  
  <p>I am trying <strong>Swiffy Extension</strong> and <strong>CreateJS</strong> tools. But the code was not linking properly because am using action script and also i don't know how to linking files from one to another.. please anyone help me to solve the issues.</p>
  
  <p><strong>Example .FLA code:</strong></p>
  
  <pre><code>package com.privacy_pirates.game  {
  
      //import all the Flash libraries we will need
      import flash.display.MovieClip;
      import flash.events.Event;
      import flash.events.MouseEvent;
      import flash.display.Loader;
      import flash.events.ProgressEvent;
      import flash.net.URLRequest;
      import flash.utils.Timer;
      import flash.utils.*;
  
      public class Main extends MovieClip{
          //all the onjects that are on the stage that will need to be called
          public var content_mc:MovieClip;
          public var introLoader:Loader;
          public var tutotrialLoader:Loader;
          public var preloader_mc:Preloader;
          public var btn_play:MovieClip;
  
          public function Main() {
              // constructor code
              //when the class is added to the stage
              addEventListener(Event.ADDED_TO_STAGE, addedToStage);
          }
  
          public function addedToStage(e:Event):void{
              //trace("added to stage is executing");
              removeEventListener(Event.ADDED_TO_STAGE, addedToStage);
              //the swf that will be loaded
              introLoader = new Loader();
              //when it's ready, perform the function loadComplete
              introLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
              //make the preloader
              introLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);   
              //the file that will be loaded
              introLoader.load(new URLRequest("Animation.swf"));
          }
  
          private function loadComplete(e:Event):void{
              //trace("load is complete");
              //add the file to the stage
              addChild(introLoader);
          }
  
          //the progress bar at the bottom of the screen
          private function loadProgress(e:ProgressEvent):void{
              var percent:Number = e.bytesLoaded / e.bytesTotal;
              preloader_mc.setPercent(percent);
          }
      }
  
  }
  </code></pre>