# Code for animation in flash action script 2.0

## Main Question or Discussion Point

i have a a board and i want it divided into 6 parts.
1 part is equal to the size of the stage.
when the mouse moves to the left of the screen i want the current part to tween into the left part.
same for right and down and up.

what i have so far is for the bar on the left, right, bottom.
on(rollOver){
...
something do to _x and _y???

how do i finish it?

Related Programming and Computer Science News on Phys.org
minger
I dont' really understand your question, but you can basically just set a point (x,y) that you want to be at. Then for your invisible button, you can have something like:
Code:
onRollOver() {
mcSquare.nextFrame()
}
Then on one of the 6 squares, you have a stop command on the first frame, then on the second, you have something like:
Code:
onFrameEvent(enterframe){
dx = targetx - this._x
dy = targety - this._y
this._x =+ dx
this._y =+ dy
}
Sorry if the code is rusty, it's been years since I've coded or done anything in Flash.

For better reference, may I direct you to www.flashkit.com <-GREAT FORUM for Flash