I’m really lost now… :hangover:
If you check my site I’m trying to make ( www.napoly.wz.cz ) and click one of my buttons the menu/logo/music/… will move to the coords…
Here’s the script I used:
1st frame:
speed = 5;
frame in which the action will take place:
MovieClip.prototype.move = function() {
endX = 192;
endY = 205;
this._x += Math.floor((endX-this._x)/speed);
this._y += Math.round((endY-this._y)/speed);
delete this.onEnterFrame;
};
MC which you want to move:
onClipEvent(enterFrame){
move()
}
But if you try to click for example on the “contact” button and after “about” button you can see that my music button (right side) is closer to the main border… so why the mc’s coords are little off if you had clicked different button before (or if the mc’s coords are different than before)? [note that I need to use Math.floor and Math.round to make it look sharp and that the speed value is for all MC’s number 5]. Also my MC location is set up to hole pixels…
I tested it without Math function but it was same… any advice?
Hope I was clear… (sorry for my English)