PDA

View Full Version : Need Advice In Making This File More AS



tomyknoker
04-15-2007, 10:07 AM
If anyone would mind taking the time to take a look at my file, I have got the AS working pretty nicely although have still needed to make my timeline quite long, if anyone can look and let me know what else I could control with AS would be greatly appreciated! :)

nwalton
04-19-2007, 07:58 AM
This seems like a pretty vague question-- there are a LOT of thing you can do, it just depends on what you're trying to accomplish.

Medyman
04-25-2007, 03:32 AM
If anyone would mind taking the time to take a look at my file, I have got the AS working pretty nicely although have still needed to make my timeline quite long, if anyone can look and let me know what else I could control with AS would be greatly appreciated! :)

You can take away the thing that is making your timelong so long -- the motion tweens.

You can use the Tween and easing classes to accomplish the same thing.

First, convert your "bg" graphic into a movieclip (instance name bg) and use the following actionscript to move it:


import mx.transitions.Tween;
import mx.transitions.easing.*;

new Tween (bg, "_x", Regular.easeOut, bg._x, bg._x + 20, 2, true)

This will explain everything reasonably well: http://www.kirupa.com/developer/actionscript/tween.htm

Post back here if you have any questions.

nwalton
04-25-2007, 07:59 PM
You want to make sure to look at the info on the onMotionFinished event associated with the Tween class (in the same kirupa.com page above). That can really help when you have things happening in sequence.


var bgTween:Tween = new Tween (bg, "_x", Regular.easeOut, bg._x, bg._x + 20, 2, true)

bgTween.onMotionFinished = function(){
// add items here to execute after tween is finished
}