Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
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.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 101694 Viewers
61 Video lessons · 88445 Viewers
71 Video lessons · 72283 Viewers
56 Video lessons · 104006 Viewers
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.
Your file was successfully uploaded.