|flash: tween or script?|
what do you prefer?
until recently id pretty much tweened everything in flash, but now ive started getting into actionscript i find myself spending ages trying to script something that i could really tween in minutes. dont get me wrong, i love the control scripting animation gives, but it seems a slow process to set things up.
just wondering what approach other people take? do you only tween when nessecary, and script everything else, or vice versa?
I tweened most things, but if I need something to be neat or cool I use script, well unless I need it done fast.
yeah i used to do the same. what im getting at really is
obviously scripting can do many things that tweening cannot, but for the things that can be done either way- what is best?
Script is best.
I agree that scripting is best.
I'll tween where objects must follow a path or, as was mentioned, where time is a factor. However, if it involves duplicating clips I'll use AS, as in a blur effect for example.
I still feel that shape tweening can pretty powerful and useful.
The more you script the quicker you'll be to accomplish tasks and also you can save frequently used snippets and just change the variables as necessary.
hi winstun - glad you chipped in :)
your post served as a prompt for another question thats been bothering me recently, you say youll do things on the timeline when its to follow a path - i was recently wondering if this could be done through AS (for duplicated clips).
is it *not* possible, or just easier to do it by hand?
|The more you script the quicker you'll be to accomplish tasks and also you can save frequently used snippets and just change the variables as necessary. |
yeah thats what i figured, but its easy to slip back when somethings not working, and the workloads piling up...
To try to answer your question, it could be possible to have an mc follow a path set from AS. However, this would likely involve a hardy mathematical algorithm.
Take for example a bee floating around the stage. You'd have to define the path with math using trig functions to get a smooth rounding around the bends or corners of the flight path. Then you'd have to have some sort of error checking so the bee would rotate accordingly as it went around those bends/ corners.
As you can see it would be a lot of pre-planning and time, but it could be done.
As I was writing another thought crossed my mind - I suppose in it's simplest form moving an mc from pointA to pointB ( as long as these are set before hand ) is setting a path in code for that mc.
Heh, I guess there could be a fair amount of discussion on this topic. Good question!
i guess i was hoping for something nmore like:
thanks for clearing this up.
Haha, yeah. I know what you mean.
It'd be nice if they had a method similar to setMask() where it was setPath() and it linked to an mc with a single line.
I'm sure someone more capable than I could make a component for something similar. :)
well can someone give me examples
of what action script does