PDA

View Full Version : bug with button !!!


sprung
10-08-2002, 09:17 PM
www.hertzmedia.net/clients/january

i have make a movie clip with xy position on frame 1:

targetx = 1012;
targety = 385;

-----------------------------//

and one button with this script inside:

on (rollOver) {
_root.targetx = 660;
_root.targety = 385;
}
on (rollOut) {
_root.targetx = 1012;
_root.targety = 385;
}


---------------------------//

it does'nt work when i had another button

somebody know how to fix it or can explain me (tutorial ???) how proceed to make it functional?

thanks a lot

:)

toke
10-08-2002, 10:56 PM
do you mean adding another button on to the stage?
or..
do you mean adding the script rollover/out to the button?
or..
do you mean moving the button to the same position as your "targetx" and "targety"?

Here is what I would suggest:

1. The action for the first frame use this instead

orgX = getProperty("_root.yourMovieName",_x);
orgY = getProperty("_root.yourMovieName",_y);

then..

2. on the button

on (rollOver) {
setProperty("_root.yourMovieName", _x, 660);
setProperty("_root.yourMovieName", _y, 385);
}
on (rollOut) {
setProperty("_root.yourMovieName", _x, orgX);
setProperty("_root.yourMovieName", _y, orgY);
}

see if this would solve your problem..

sprung
10-09-2002, 01:18 PM
lol

sory, i'm too clear ; )


i mean, when i add button (like green one) on it.

i just begin to use motion script.

i have to work...

i'll try your suggestion and experiment different way.

thanks a lot :p