PDA

View Full Version : more targets


wgf
01-29-2003, 03:54 PM
I got this perfect working script that tells a mc that his x and y go to the x and y of a ather mc. Now I want that if i push the button that then mc1's x and y go to the same plase as mc2's x and y and that mc'3 and 4 move along with mc1.

a ather option is that i put mc1,mc3 and mc4 in a ather mc and i call it mc0. And then i say mc0 moves with mc1's x and y to mc2's x and y.

the script:

on (release) {
mc1._x = mc2._x;
mc1._y = mc2._y;
}

wgf
01-30-2003, 12:55 PM
helloo? some one?

lbower
01-30-2003, 05:06 PM
I'm not sure I'm understanding the question, but why can't you use the following:

on (release) {
mc1._x = mc2._x;
mc1._y = mc2._y;
mc3._x = mc1._x;
mc3._y = mc1._y;
mc4._x = mc1._x;
mc4._y = mc1._y;
}

wgf
01-30-2003, 06:04 PM
no no thats not what i mean, now mc3 and 4 go on mc1 but i want them to move with mc1 so that when mc3 whas on the right from mc1 and mc1 gows 40 inches to the right that mc3 gows also 40 inches to the right.

lbower
01-30-2003, 08:45 PM
oh, okay. How's this?

wgf
01-30-2003, 09:22 PM
it's verry cool but if i want a ather buuton now that say's m3 x and y are m2 x and y?

wgf
01-30-2003, 09:43 PM
it works allready :D thnx now the nex question is how to make the balls move smooth? :s

lbower
01-31-2003, 03:15 PM
hmmm, I'm not quite sure on that one. Let me give it some thought.

wgf
02-01-2003, 09:31 PM
:d oke thnx

i'll be weating:)

wgf
02-16-2003, 11:54 AM
and...?

Ricod
02-16-2003, 12:07 PM
Don't be so impatient wgf. Not everybody spends their spare time scouring this forum.

What do you have so far ? The balls instantly move from one position to the next ?

wgf
02-16-2003, 12:15 PM
well the balls move on my comand and the movie grows. the only thing i still need is to make this moving script

var distanceX = m2._x-m1._x;
var distanceY = m2._y-m1._y;
m1._x = m2._x;
m1._y = m2._y;
m3._x = m3._x+distanceX;
m3._y = m3._y+distanceY;
m4._x = m4._x+distanceX;
m4._y = m4._y+distanceY;

gow easing. So not instant replace but smooth flow

Ricod
02-16-2003, 12:20 PM
Well, here are a few very nice easing equations by Robert Penner : http://robertpenner.com/scripts/easing_equations.txt