Join Todd Perkins for an in-depth discussion in this video Connecting a model, part of Flash CS4 Professional: Object-Oriented Programming .
Now we will look at creating a new instance of the SlideshowView class in the…SlideshowDocument class and connecting that instance with a model. So in the…SlideshowDocument class, right below importing SlideshowModel, I'm going to…import mvc.SlideshowView. Now we will need to create a property to represent the view.…So I'll create a new public property in the property section called slideView…and data type it to SlideshowView. Right above where I defined the…SlideshowModel in the constructor, I'm going to give the value to the…SlideshowView. So slideView = new SlideshowView(). Remember that in the constructor, …we need to pass in a container and that is container_mc from the…main Timeline of our FLA file. So if I select it here in the FLA, you can see…that it's container_mc.…
Back to SlideshowDocument. Before I load the data file in slideModel.load,…I'm going to go right above that, set the model property of the slideView,…so slideView.model. Remember that's a property defined in our View class so the…
- 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.