From the course: Adobe Animate CC: HTML5 Canvas and WebGL

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

WebGL and JavaScript

WebGL and JavaScript

From the course: Adobe Animate CC: HTML5 Canvas and WebGL

Start my 1-month free trial

WebGL and JavaScript

- The last thing we need to do is wire in some interactivity so that the ad can be clicked. Flash Professional allows us to natively write JavaScript in the Actions Panel when dealing with WebGL content. Even though we have what appears to be a button on the stage. We'll make it so that wherever the user clicks, we can activate the intended action. We already have an Actions Layer right here. Let's go out to frame 70, which is the last frame, and we'll choose to Insert > Timeline > Blank Keyframe. Now that we have this keyframe created, we can go into Window and choose Actions. All right, so the first thing we want to do is actually stop the Timeline right here. So, to do that, we'll open up the Code Snippets and choose our Code Snippets for WebGL, and choose Stop at this Frame. Let's Copy to Clipboard, and we'll just paste that right in. It tells us here Stop at This Frame. The timeline's going to stop or pause at this frame where you insert the code. So, we can see that the WebGL…

Contents