3 Replies Latest reply: Apr 24, 2014 6:25 AM by moccamaximum RSS

    Flash AS3.0 to Html Canvas convertion

    vari25 Community Member

      Hello Again,

       

      I am in a bit of fix here.

       

      I have converted my Flash project to Html Canvas in Flash CC.

       

      But my actions in timeline got commented out and have created a js file.

      Its not working as per the actions I have created.

      Done a bit of research and have known that the actions would be commented out and js has to be written for the actions wehave given.

       

      As I have no knowledge in programming Java Script, any help in this would be highly appreciated.

       

      This is the script I have been working on...

       

      Thanks in Advance..

       

       

      import flash.events.MouseEvent;
        
      Wall1.stop();
        
      Wall1.RedCove.visible = false;
      Wall1.PearlGrey.visible = false;
      Wall1.Boulder.visible = false;
      Wall1.Lava.visible = false;
        
      RedCove_btn.visible = false;
      PearlGrey_btn.visible = false;
      Boulder_btn.visible = false;
      Lava_btn.visible = false;
          
      Wall_btn.addEventListener(MouseEvent.CLICK,panels);
      function panels(event:MouseEvent):void
      {
                RedCove_btn.visible = true;
                PearlGrey_btn.visible = true;
                Boulder_btn.visible = true;
                Lava_btn.visible = true;
      }
        
      RedCove_btn.addEventListener(MouseEvent.CLICK, redcove);
      function redcove(event:MouseEvent):void
      {
                Wall1.RedCove.visible = true;
                Wall1.PearlGrey.visible = false;
                Wall1.Boulder.visible = false;
                Wall1.Lava.visible = false;
      }
      PearlGrey_btn.addEventListener(MouseEvent.CLICK, pearlgrey);
      function pearlgrey(event:MouseEvent):void
      {
                Wall1.PearlGrey.visible = true;
                Wall1.RedCove.visible = false;
                Wall1.Boulder.visible = false;
                Wall1.Lava.visible = false;
      }
      Boulder_btn.addEventListener(MouseEvent.CLICK, boulder);
      function boulder(event:MouseEvent):void
      {
                Wall1.Boulder.visible = true;
                Wall1.RedCove.visible = false;
                Wall1.Lava.visible = false;
                Wall1.PearlGrey.visible = false;
      }
      Lava_btn.addEventListener(MouseEvent.CLICK, lava);
      function lava(event:MouseEvent):void
      {
                Wall1.Lava.visible = true;
                Wall1.RedCove.visible = false;
                Wall1.Boulder.visible = false;
                Wall1.PearlGrey.visible = false;
      }
      
       Original_Image.addEventListener(MouseEvent.CLICK, hide);
      function hide (event:MouseEvent):void
      {
                RedCove_btn.visible = false;
                PearlGrey_btn.visible = false;
                Boulder_btn.visible = false;
                Lava_btn.visible = false;
      }