Code for animation in flash action script 2.0

Click For Summary
The discussion revolves around creating an interactive board divided into six parts, where each part corresponds to a section of a stage. The goal is to implement a feature that allows the current part to tween into the left, right, up, or down sections based on mouse movement. Initial code snippets suggest using an onRollOver event to trigger animations, specifically moving a movie clip to a target position defined by coordinates (x, y). The conversation includes advice on using frame events to calculate movement towards the target position. Additionally, a resource recommendation for further assistance in Flash programming is provided, highlighting the value of community forums for troubleshooting and learning.
brandy
Messages
156
Reaction score
0
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?
please and thankyou.
 
Technology news on Phys.org
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
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
3
Views
6K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
5K