Join Todd Perkins for an in-depth discussion in this video Using TweenLite to animate images, part of Flash CS4 Professional: Object-Oriented Programming .
Instead of just loading the images and making them appear, we are going to use…TweenLite to make the images fade in when they are done loading. Remember that…for this to work you will need to be importing the TweenLite class and you will…need to have the GS folder in the same folder as your FLA file or in your…classpath. Scroll down to the imageLoaded method.…Right below the code we already have, so that's going to be loader.alpha = 0,…and then we are going to use TweenLite.to to fade it in. So go to the next line, …type TweenLite.to and in the parenthesis we pass in three parameters.…
First, the object that we want to tween, which is the loader; second, the amount…of time we want the tween to take, which I'm going to put here as one. …You can do a faster tween if you'd like, but just for the video demonstration,…I wanted to take a little bit more time so that you can see it.…So the third parameter is going to be an object, so it's in curly braces and…then we are just going to have the alpha go to one. So alpha:1 and that's it.…
- 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.