Join Todd Perkins for an in-depth discussion in this video Throwing errors, part of Flash CS4 Professional: Object-Oriented Programming .
In this movie, we are going to look at throwing errors. That is, creating your…own errors. Now, if you are new to object-oriented programming, you may be…wondering why you would want to create errors.…Let me show you here. I'm going to go to the first keyframe in the Actions layer …in my application and open up the Actions panel. We wrote this code in the…previous movie. If you remember, the remote class needs its TV property set in…order to work properly. Let's say we commented out this line of code or forgot…to give a value to the TV property of the remote. We are going to test the movie…and see what happens.…
I will click a button to change the channel and we get an error in the Output window.… Let's see what the error says. Cannot access a property or method of a…null object reference. So the problem with this error is that it's very vague.…I don't necessarily know where the problem is in my code.…What would be great is if this message said, Error, you need to set TV property…in order to use the remote. We will look at how to do that in just a minute.…
- Loading external text, images, and XML files
- Creating essential properties for a View class
- Defining a Model class
- Building and implementing interfaces and designs
- Debugging projects
- Building applications with Controller-class buttons
Skill Level Intermediate
1. ActionScript 3.0 Essentials
2. Advanced ActionScript Techniques
3. Object-Oriented Programming Fundamentals
4. The Model View Controller Design Pattern
5. Building a Model Class
6. Building a View Class
7. Building a Controller Class
8. Improving and Debugging the Application
9. Moving Forward
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.