|
|
|
#1 |
|
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 |
|
|
|
|
|
#2 |
|
Monkey Moderator
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? |
|
|
|
|
|
#3 |
|
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 |
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|