Actionscript Resources for understanding workflow
- November 10, 2022
- 2 replies
- 1521 views
Hello!
I am working in Adobe Animate to help create interactive, educational exe files that showcase animation, audio and video as well as allow for the user to control the flow of content via skip forward, skip backward, pause, play and volume buttons. I have already found tons of success through the Adobe Support community in setting up animation and audio with Animate along with getting the controls set up to be coded with AS3 and for that I am eternally grateful.
I understand that what I am attempting to achieve will be difficult in terms of video integration on an AS3 file, so I may be forced to animate in program rather than importing video to Animate from after effects. However I've run into a situation where I cannot seem to understand the workflow for using Actionscript 3 with Animate and I was wondering if there are any resources out there for using AS3 alongside Adobe Animate 2022? Relying on old videos of people using AS3 with flash don't seem to produce the intended results and I can't tell if the architecture keeps changing or if I just can't seem to understand the code. Even a lot of our old projects in office circa 2012-2013 break upon opening the fla file, so looking back at old projects for guidance feels like a dead end.
I have already bookmarked the AS3 Reference and the AS3 Developer's Guide, have done countless hours of research, debugging and video watching though I'm running into a continuous problem with understanding AS3 syntax and how it relates to layers on the timeline, symbols and scenes, and labels/instances/properties/actionscript classes. There also appears to be a discrepancy in a lot of the answers I read pertaining to starting code via importing packages vs. using simple commands such as gotoAndplay().
As an example of an area of trouble, I have attached a gif file of a simple button interaction that takes place within a movie clip across 100 frames. I intend to loop through these 100 frames until the user interacts with the button, forcing a jump to the frame at the beginning of a fade out into the full interactive animation.
There are 4 layers within this movie clip: The Title (static text), the grey/transparent screen underlay (png bitmap), the button & its start text (motion tween for glow effect, button), and the actions layer. The button glows blue, has instances of green coloring on hover and light orange on click, and begins a fade out after 100 frames. I have a very simple sample script previously sourced from an answer on these forums, however it does not seem to do what I intend and I cannot understand why.
Frame 99 (frame 1 script is identical minus the gotoAndPlay function)
gotoAndPlay("SplashScreen");
this.SplashScreen.startBtn.addEventListener(MouseEvent.CLICK,dostart);
function dostart(e:MouseEvent){
startBtn.removeEventListener(MouseEvent.CLICK,dostart);
gotoAndPlay("Fade");
}
Looking at the gif, the video will play through the first 100 frames, will not listen for a click and will cycle through the colors of the button once the video continues through the fade out. All of which are unintended functionality.
Here's a sample project so you can see what I'm working with if you feel so inclined to assist.
I guess long story short, are there resources that help explain the AS3 integration and workflow rather than just tell me what the answer to my Actionscript problem would be?
