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.
Even the most seasoned programmers make mistakes, but the difference between the pros and amateurs is that the pros know how to read error messages. Flash has two windows that help you find errors in your code, one of which we'll focus on in this movie. If I test the movie here with Command+ Return or Ctrl+Enter on the PC, you'll see an error in the Compiler Errors window. In the Location section, Flash tells me where the offending code is: in Scene 1, layer 'actions', Line 8.
The description says, Syntax error: expecting rightparen before semicolon. So note that when you get an error, make sure to read the error message. I know that's pretty obvious to say, but read it and really think about what's wrong. There is a missing rightparen, according to Flash. So I am going to double-click this error message, and Flash will actually open up the Actions panel and highlight the offending code for me. Now at this point if you don't understand this code, I don't want you to worry about that. I just want you to understand how the Compiler Errors window works right now.
The offending code is highlighted. I can see at the end that there is only one right parenthesis, but at the beginning of the code there are two left parentheses. So when you are writing ActionScript, they actually need to be balanced out. You need to have - if you have two left parentheses you need to have two right parentheses. One of these on the left is actually a mistake, so if I delete that, I can test the movie again, and Flash has actually given me another error. Note that when you get into Compiler Error, Flash actually stops processing the code.
That's why we didn't see these two errors at once. So if we look at this, we have Scene 1, layer 'actions', Frame 1, Line 23. Access of undefined property SoundMixe. So if I double-click that, I can see that this is undefined, SoundMixe. Now being used to writing code all the time, I know that this is probably supposed to be SoundMixer, with an r on the end, and if you are new and you didn't see that right-away, I promise as you go through this title, as you get more experience with ActionScript, errors like this will become more obvious to you.
So I make the fix, and I test the movie one more time, and the code is processed, and you can tell that by hearing the background music. When you see errors in the Output and Compiler Errors windows, don't panic. Remember that those windows give you important messages about fixing your problems. By paying attention to those messages, you will be able to fix your errors and more quickly transition into being an ActionScript master.
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.