Join Todd Perkins for an in-depth discussion in this video Loading external images, part of Flash CS4 Professional: Object-Oriented Programming .
Now we are going to actually make our SlideshowView class display visual data…by loading external images. I'm going to scroll down in the SlideshowView class…to the update method. I'm going to delete the Trace statement that's there and…I'm going to replace it with making the loader load the external file.…So loader.load and in the parenthesis I'm going to create a new URL Request.…I'm going to pass in a new URLRequest in the parenthesis. Just like we looked…at in an earlier movie, you don't necessarily need to create a variable to hold…the URLRequest. You can just create it when you are loading the file.…
The file that we are going to load is whatever the model's current file is. So…it is going to be model.currentFile. Remember that's a property of the model…that it represents the current image file. So that's going to load and then…once it's loaded the imageLoaded function is going to execute. Remember that…what's defined in the constructor when we added the event listener to the…loader. So when the image is loaded I'm just going to bring loader all the way…
- 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?
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.