• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Flash AS3.0 to Html Canvas convertion

Guest
Apr 22, 2014 Apr 22, 2014

Copy link to clipboard

Copied

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;

}

TOPICS
ActionScript

Views

562

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guru , Apr 24, 2014 Apr 24, 2014

Doing this manually implies code has to be rewritten?

Yes, you have to edit the js file that  flash generates after you publish to canvas

EaselJS is a entirely different from AS 3.0 right?

EaselJS is basically a framework which enables you to write JavaScript with classes (similar to actionscript).

A functionality you need to make all the MovieClips/Sprites in your library available to javascript

Check out this tutorial to get a basic understanding:

http://code.tutsplus.com/articles/getting-started-with-easeljs-a-flash-like-interface-for-the-html5-canvas--active-10382

Votes

Translate

Translate
Guru ,
Apr 23, 2014 Apr 23, 2014

Copy link to clipboard

Copied

if the autoconversion dosen`t work for your project you will have to do it manually.

The framework you need to look into is documented here:

http://www.createjs.com/Docs/EaselJS/modules/EaselJS.html

click events are handled like this:

Wall_btn.addEventListener("click", panels);

function panels(event){

          RedCove_btn.visible = true;

          PearlGrey_btn.visible = true;

          Boulder_btn.visible = true;

          Lava_btn.visible = true;

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 24, 2014 Apr 24, 2014

Copy link to clipboard

Copied

Hello moccamaximum,

Doing this manually implies code has to be rewritten?

Or the .js file can be edited??

But the EaselJS is a entirely different from AS 3.0 right??

Please do help me understand.

Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Apr 24, 2014 Apr 24, 2014

Copy link to clipboard

Copied

LATEST

Doing this manually implies code has to be rewritten?

Yes, you have to edit the js file that  flash generates after you publish to canvas

EaselJS is a entirely different from AS 3.0 right?

EaselJS is basically a framework which enables you to write JavaScript with classes (similar to actionscript).

A functionality you need to make all the MovieClips/Sprites in your library available to javascript

Check out this tutorial to get a basic understanding:

http://code.tutsplus.com/articles/getting-started-with-easeljs-a-flash-like-interface-for-the-html5-...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines