Join Todd Perkins for an in-depth discussion in this video Using access modifiers, part of Flash CS4 Professional: Object-Oriented Programming .
In this movie, we will get practice using access modifiers. We are just going…to use the public and private access modifiers, but you can use the other…access modifiers in exactly the same way. On the stage here, I have a TV.…Its name is tv_mc and in the Library you can see that it's connected to the TV class.…The TV class is pretty simple. It just has a public method called getChannel.…Because the method is public it can be used anywhere a TV exists. If I go to my…FLA file, open up the Timeline, select the first keyframe of the Actions layer…and open up the Actions panel. I can run tv_mc's getChannel method without…getting an error.…
So it's accessible on the main Timeline or anywhere there is an instance of the…TV class. Let's say I made the method private instead of public, going to go to…the TV class and change the public method to a private method just by replacing…the word public with private.…Before I test this, we are going to make sure to save the file because it won't…work unless I save it. I'll go back to the FLA and test the movie. And here is…
- 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.