Icons--A Moving Background With AS3 Effects

Jan 13, 2004 12:57



Icons--A Moving Background With AS3 Effects

This isn't complicated, really, friends. Just follow along step-by-step. If you get stuck or have questions, either comment here or post an entry to the community.

1. Open PSP7 and AS3 (you'll be usin' both).



2. Open an image that contains the picture of a person with at least some background showing behind him/her. This is important, as that's where your 'effect' will play out. Make sure you're working FROM A COPY of the image--and you've Saved the original where you can easily locate it.

Here's what I worked with:



3. In PSP7 take the image and go to Layers, Promote to Layer.

4. Zoom in once on the image and maximize it to fill your workspace. This makes it easier to see and work with. (In other words, you can skip this step if you don't feel you need it.)

5. Take your Eraser tool (tool palette) and make sure it's set fairly small (10-15) on 100% opacity. Then 'erase' around the person until you've eliminated the entire background.



This will be the foreground image of your final icon, so use care in the erasing procedure.

You might do well to Save it as a .psp or .png (just to be safe).

6. Go to AS3 and use browse to locate the original/base image. Open it.

7. Now we're going to apply our 'background' effect to the image! Go to Insert Image Effect. Use the following settings:

Start with: animation frame
Run effect in reverse direction (checked)
Effect length: 2.1
Frames: 5 fps (will total 10 frames)
Effect: Stained Glass
Show Preview (checked)

8. Click on the Customize button and set the following settings:

Rendering Options:
Rendering: Better quality (all the way up)
Light: Toward the Dim end
Air absorptivity: Toward long rays
Blend mode: Normal
Light Movement:
Light start x: -17
Light start y: 50
Light end x: 81
Light end y: 50

Click OK.

Now you've got your basic background!

9. Immediately Delete the frame that you started with from the animation. Then dump 3 more. (To be 'safe' it's best to keep your animation around 7 frames, max. This should mean your animation will be under the 40k limit imposed by LiveJournal and some other blogs.)



Now here's the way I do the next part. If you do it differently and want to share your own Tutorial, please do so! (As I'm fond of saying, there's always an awful lot of ways to do things in PSP7/AS3--and no one way is the only way.)

10. In AS3, highlight frame one of your animation. Click on the 'Export Frames to Paint Shop Pro' button (which you'll see on the left-hand side of your toolbar).

As you've already got PSP7 open, this frame will pop on over there. (If you didn't have it open, this would automatically Open the software.)

11. Now you should be in PSP7. Sometimes this can be a tad buggy and you'll stay in AS3--even though the frame you're working with is over in PSP7. If for some reason you're still in AS3, just go to your Windows taskbar and click the PSP7 button to open that window. (It's not a big deal, in other words.)

Now you've already got your Foreground (erased around) image open and waiting there--and now you've got frame one of your Background.

Click on the Foreground image. Right-click and Copy. You can now Minimize it. (A Copy will remain available to use for every frame.)

12. Click on the frame and right-click. Paste as new layer.

13. Close your frame and say 'yes' when asked about updating. (Or if you've customized your Standard Toolbar to include the 'Update to Animation Shop' button, then click it before closing the frame. Either way works the same.)

14. Highlight the next frame (2 of 7) and do the exact same thing. Keep doing this until all 7 frames include the Foreground image.

Why do it this way? You certainly can Copy the image and then go over to AS3 and Paste it into each frame--but sometimes it's a tad more difficult to do this and keep things perfectly straight and even. I'm pretty anal 'bout that, so I like a way that makes sure each frame has things lined up just so. LOL.

15. Now in AS3 you should have the completed animation. You can click the 'View Animation' button on your toolbar to see how it looks.

16. Save. (I'd recommend doing this Quality vs. Size set all the way toward the top for the best Quality.)

17. Note the SIZE when you've finished your Save. Obviously this must be below 40k. (And if it says it is 40k, that's generally still too large to use at LJ! If necessary, delete a frame or two and Save again... (If you 'Undo' first, your SECOND Save won't re-compress the original save. Meaning you'll have better final quality.)

That's it, friends. Give 'er a try.

Czar Nikky has a similar version of this where he creates his own moving background (not using AS3 effects). Maybe he'll share that with us at some point... (hint, hint, Nikky-boy!)...

Here's the final project:



As with all tutorials, we who write them greatly appreciate hearing reviews of how they work for you. If you find a spot that's not clear, let us know so we can edit and make it clear.

If it works for you, we love to have you post entries that show samples of what you've created!

Remember not to get frustrated if things don't seem to be turning out the way you expect. Just go through carefully, step-by-step and be sure you're not missing anything. (And let me know if I'm missing something! LOL.)

Good luck, friends.

~~KevinR, moderator

animated icon, animation, as3, moving background using as3 effects, enhancing images, tutorial

Previous post Next post
Up