Join Todd Perkins for an in-depth discussion in this video Implementing interfaces, part of Flash CS4 Professional: Object-Oriented Programming .
Now we are going to look at using an interface inside of a class. Remember…that we have an interface defined called ISpeech that has a method called speak…defined that returns a value of void.…So, I'm going to go to my Person class and then I'm going to implement that interface…right after the class declaration. So public class Person implements. …It should turn blue if you have typed it correctly and then the interface name, ISpeech.…
By the way, we have multiple interfaces that a class is implementing, …you can separate them by commas here.…So now before we do anything else, what I'm going to do is save the file. …As we talked about in another movie, any class that implements an interface needs to…define the methods that are set up in that interface. So every class that…implements ISpeech, needs to have a public method called speak. I haven't…defined that in the Person class, so let's see what happens.…When we are going to go to the first keyframe in the Actions layer, open up the…Actions panel, create a variable called person, data type it Person and create…
- 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.