Hi I’ve got this piece of code that I’m trying to reverse
onClipEvent (load) {
speed = 10;
}
onClipEvent (enterFrame) {
_y += (_root.target-_y)/speed;
_x += (_root.target-_x)/speed;
}
Place this MC at x=0, y=0.
Now on a button add the script that contains the position you want to send your MC to:
on (release) {
_root.target = 250;
}
Thats an example of pretty smooth motion.
instead of putting _root.target = 250; I’ve got target set to 0 on each button, I do:
newBgValue = mainHolderBackground._x=800;
newBgValue = mainHolderBackground._y=0;
_root.target = 0;
on each button. However, this is not what I want, I want the clips **to end up **on that position, not start off on my new position!
Hope that someone can help, it’s probably a simple answer eh?
Cheers!
PS: I’m using Flash 8