homepage Welcome to WebmasterWorld Guest from 54.226.191.80
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

    
flash: tween or script?
what do you prefer?
benihana




msg:1564656
 3:20 pm on Mar 24, 2004 (gmt 0)

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?

 

robotsdobetter




msg:1564657
 3:24 pm on Mar 24, 2004 (gmt 0)

I tweened most things, but if I need something to be neat or cool I use script, well unless I need it done fast.

benihana




msg:1564658
 3:26 pm on Mar 24, 2004 (gmt 0)

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?

robotsdobetter




msg:1564659
 3:28 pm on Mar 24, 2004 (gmt 0)

Script is best.

winstun




msg:1564660
 5:53 pm on Mar 24, 2004 (gmt 0)

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.

Cheers

benihana




msg:1564661
 6:23 pm on Mar 24, 2004 (gmt 0)

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...

cheers

winstun




msg:1564662
 7:01 pm on Mar 24, 2004 (gmt 0)

Thanks, Benihana.

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!

benihana




msg:1564663
 8:03 pm on Mar 24, 2004 (gmt 0)

cheers winston.
i guess i was hoping for something nmore like:

my_mc.attatchToPath(my_path);

:)

oh well.

thanks for clearing this up.

ben

winstun




msg:1564664
 8:56 pm on Mar 24, 2004 (gmt 0)

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. :)

ceasar




msg:1564665
 9:46 pm on Mar 24, 2004 (gmt 0)

ok
well can someone give me examples
of what action script does
vs tweening?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved