To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Reply
 
Thread Tools Search this Thread Display Modes
Old 07-25-2005, 03:28 AM   #1
mrk13
user in A minor
 
Join Date: Jan 2005
Location: finland
Posts: 121
a simple scripted motion tween question

hi u all!
i found a nice tut about tweening with action scripting, and actually can make some sense of it. hooray! it works. but how could i alter the code so that i can make my object (here figure1_mc) move diagonally instead of straight horizontal/vertical line? the tut explains only how to toggle x or y values separately. ok ok, my cover has blown: i'm pretty new to action scripting, but i'm learning...

here's the code:

var easeType = mx.transitions.easing.Regular.easeOut;
myTween = new mx.transitions.Tween(figure1_mc, "_y", easeType, 0, 300, 30);

so if there's anyone with extra hands out there, i sure could use one now
manymanythnx, mar
mrk13 is offline   Reply With Quote
Old 07-25-2005, 04:58 AM   #2
Lexicon
Monkey Moderator
 
Lexicon's Avatar
 
Join Date: Jul 2001
Location: UK
Posts: 2,038
if you do a _x tween and a _y tween then you get a diagonal tween.

Code:
var easeType = mx.transitions.easing.Regular.easeOut;
myTweenx = new mx.transitions.Tween(figure1_mc, "_x", easeType, 0, 300, 30);
myTweeny = new mx.transitions.Tween(figure1_mc, "_y", easeType, 0, 300, 30);
__________________
www.lexicon-design.co.uk
If we aren't supposed to eat animals, then why are they made of meat?
If Vegetarians like animals so much, why do they eat all their food?
Lexicon is offline   Reply With Quote
Old 07-25-2005, 05:13 AM   #3
mrk13
user in A minor
 
Join Date: Jan 2005
Location: finland
Posts: 121
i actually tried that earlier, but it wouldn't work for me - now, double-checking i found a mistake in instance names. how typical is that. blind as a bat, me...
thanks, this helps a lot!
mar
mrk13 is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:11 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.