Viewers: in countries Watching now:
In ActionScript 3.0 in Flash Professional CS5 Essential Training, Todd Perkins shows Flash designers how to incorporate ActionScript code into their projects and create interactive presentations and applications. The course includes a review of ActionScript language basics and the object-oriented programming (OOP) methodology, a tour of those Flash Professional CS5 features designed for developers, such as code hinting and the Code Snippets panel, and instructions on interacting with objects in the Library and placing code on the Timeline. Exercise files are included with the course.
One of the more common tasks when working with ActionScript in Flash Pro is to use ActionScript code to manipulate objects on the stage. Now you probably already have experience with this. You have even done that in this title. The easiest way to do that is to give an object an instance name and use that instance name to reference the object in the Actions panel. From the stage here, if I select my border, you will see it's a movie clip, and it has an instance name of boarder_mc. Note that you won't see the instance name field unless you have a particular type of object selected.
Instance names are only applicable to movie clips, buttons, some types of text fields, and components, like the FLV playback component. Note that my instance name is boarder_mc. Instance names are actually variables that are created behind the scenes in Flash, and need to follow the same naming conventions. In other words, you can't start with a number - so you should start with a letter, and you cannot include any spaces or special characters. I've followed this naming convention for a few years now, so I am used to ending every movie clip instance name with _mc.
A movie clip instance name ending in _mc in previous versions of Flash would give you access to instant code hinting. And in this version of Flash, that feature does not exist, so you don't really need to have that in there. That's just something I still do because I am used to doing it. So again, for you, that is optional. Let's go to the first keyframe of the actions layer and open up the Actions panel. So if we want to reference the boarder, all we have to do is type that instance name in our code, boarder_mc. If you want to see what Flash sees when you type boarder_mc, you can trace boarder_mc and test the movie.
You can see that Flash sees an object that is an instance of boarder_4. The boarder part comes from that boarder symbol that we created, and the object is an ActionScript object, which is basically an instance. So again, Flash creates these instances behind the scenes. So that you don't create a conflict, don't create variables with the same names as your instance names, or else Flash may break that connection that you set up by giving an object an instance name.
So to recap, you can apply an instance name to certain types of objects by selecting them and going to the Properties panel. By adding an instance name to an object, you can easily modify that object using ActionScript.
Find answers to the most frequently asked questions about ActionScript 3.0 in Flash Professional CS5 Essential Training .
Here are the FAQs that matched your search "" :
Sorry, there are no matches for your search "" —to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.