Skip to main content
rickhino
Inspiring
March 2, 2021
Answered

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

  • March 2, 2021
  • 1 reply
  • 348 views

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!

 

This topic has been closed for replies.
Correct answer kglad

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

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
March 2, 2021

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

rickhino
rickhinoAuthor
Inspiring
March 2, 2021

Thanks kglad!

kglad
Community Expert
Community Expert
March 2, 2021

you're welcome.