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.
Comments allow you to organize your code, temporarily disable code, and to write messages for yourself and for other programmers. Flash Pro lets you insert and remove comments with the click of a button. I will show you how that works in the Actions panel. I click the first keyframe in the actions layer and press option F9 on the Mac or F9 on the PC to open the Actions panel. Let's say I wanted to make a comment to tell another developer where the code is that starts the game. So I can click on line 6 in my code, type two forward slashes, and then I can type, "click or press a key to start the game." So line 7 and 8 are the code that does that.
They set up the code to click or to press a key to start the game. Again, you don't have to know what this code means right now; just understand the part about the comment - this is just a simple note to somebody. Notice that this line of code is gray, and if I delete those two forward slashes, then some of these words turn blue. That means they are reserved keywords in Flash, so this is actually going to be processed as code if I were to test moving right now. The easy way and the fast way to add a comment is to simply click the buttons at the top of the Actions panel.
So there is the multi-line comment, which is the forward slash and the asterisk, and there is the single-line comment that is the two forward slashes. So I can simply click the apply line comment to add two forward slashes. I can comment that line of code. So this line of code is gray, which means it will not be processed by the Flash Player. If you want to remove a comment, you can click the remove comment button. That's a speech bubble with x on it. So I can add a comment or remove comment. I will delete this line altogether, and let's say I wanted to disable this interactivity. I want to make it so you cannot click or press the button on the keyboard to start the game.
I can highlight these two lines of code, and I can click Apply block comment - that's the forward slash and asterisk, and Flash will wrap that code in forward slash asterisk and end the wrapping in asterisk forward slash. That creates a multiple-line comment and notice all this code is gray, so it will not be processed by the Flash player. Again, I can highlight that code, click the remove comment button, and it will go back to normal. So using the comment buttons in the Actions panel, you can quickly insert and remove comments in your code.
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.