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

Trying to convert an animation to html 5 (part 1)

Engaged ,
Mar 02, 2021 Mar 02, 2021

Copy link to clipboard

Copied

Hi all,

 

First, let me state that I am barely above beginner status.  I used the hunt and peck method to put together some fairly complex flash animations and I'd now like to convert them to html 5.  This is part 1 of my education I guess.

I started the animation by stopping on frame 1 and making the alpha of some objects 0.  Can I still do this in Javascript?  I hunted around the web for help and it looked like the following code would work (FYI all of these things are "objects" in actionscript.)

this.stop();

this.rightStalk.alpha=.0;
this.leftStalk.alpha=.0;
this.hazard.alpha=.0;
this.brake.alpha=.0;
this.leftSense.alpha=.0;
this.rightSense.alpha=.0;

Is this code correct or is there some other command I have to execute to get alpha to work?

 

Thanks!

 

TOPICS
Code

Views

162

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

Community Expert , Mar 02, 2021 Mar 02, 2021

yes, that will work (but the decimal is superfluous) if those objects exist when the code executes..

Votes

Translate

Translate
Community Expert ,
Mar 02, 2021 Mar 02, 2021

Copy link to clipboard

Copied

yes, that will work (but the decimal is superfluous) if those objects exist when the code executes..

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
Engaged ,
Mar 02, 2021 Mar 02, 2021

Copy link to clipboard

Copied

Thanks kglad!

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
Community Expert ,
Mar 02, 2021 Mar 02, 2021

Copy link to clipboard

Copied

LATEST

you're welcome.

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