Home
Username:
Password:
Adobe Flash ActionScript 3.0 for Designers Tutorials

Your First Script / Project 1: Building Basic Navigation

Subtitles of the Movie

We're now ready for our first script. Let's start with the most basic, yet important kind of Flash script: scripts for stopping the playback head and moving it to a desired frame. It's likely that you've already seen and used a script like this. Even the most basic Flash projects will need one. Go to the Work Files folder and open the nav underscore function underscore end.fla file. Make sure that your Timeline is visible by choosing Window, Timeline. If you don't see it, put the Timeline up at the top of the workspace like I have here and then take the Playback head, which is this red rectangle, and move it across the Timeline so you can see all of the frames. Notice several things. One, how organized everything is. I have everything here in layers. There's an actions layer at the top, a label layer and then my content underneath. Keyframes and frame titles are on all of the important frames. All the buttons have labels. Notice also that nothing is jiggling or moving as I mov my Playback Head. There are small A's here at the top of the Timeline in the Actions Panel. Those A's represent actions and actions can only be placed, or will only be placed in this tutorial. in the actions layer, which will always be placed in the very top of the Layer stack. Go ahead and open the Actions Window by choosing Window, Actions from the Main Menu. Let's bring the Actions Window or Panel over here where we can see it and now click on one of the small A's and you'll notice that there are scripts in the Actions Window. More information about this Actions Panel or Actions Window later, but notice that most of the script is right here in the very first frame of the very first layer there. Let's open this up so you can see the script. Notice also here that my script is very well organized and I have these grayed out areas which represent comments that will not be executed. Again, more about the specifics of this script shortly. For now let's go ahead and run this script by choosing Control, Test Movie from the Main Menu. Flash will go ahead and export this file as an swf file and now we can roll over each of the buttons. Notice that the labels are there. They're all animating and if I click on the buttons each one is functioning and moving the Playback Head to one of the labels up here in the Timeline. And I can tell that each of the buttons is working because of the labels that I've placed here in my Stage area - not the frame labels but the content labels - so we can go ahead and actually add content to each of these frames and we thereby have created a very small little website here in Flash using these very straightforward and simple ActionScript elements. Go ahead and close the Flash Player window. Before we proceed to this particular script, let me move on to the next several movies and give you an overview of this Actions Panel right here.

Tutorial Information

Course: Adobe Flash ActionScript 3.0 for Designers
Author: James Gonzalez
SKU: 34060
ISBN: 1-935320-82-3
Release Date: 2009-11-09
Duration: 9.5 hrs / 101 lessons
Work Files: Yes
Captions: Available on CD and Online University
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 98,729 Video Tutorials (23,265 free)
  • Video Available as Flash or QuickTime
  • Over 1026 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available