
Welcome Guest
|
#1
|
|||
|
|||
|
Magnetic Menu
I’ve made a Flash Web Page with a Movie Clip in it which is made of a long row of buttons, some of them are outside the Stage itself. I wanted this row of buttons to move from its center point to the left and to the right so that the client will be able to click all the buttons which exist on that Movie Clip.
To do that I wrote this Action Script code: Actionscript:
onClipEvent (enterFrame) {
if (_root._ymouse > 94 && _root._ymouse < 174) {
_root.yChange = Math.round(_root._ymouse-this._y);
_root.xChange = Math.round(_root._xmouse-this._-300);
_root.yMove = Math.round(_root.yChange/134);
_root.xMove = Math.round(_root.xChange/20);
this._y += _root.yMove;
this._x -= _root.xMove;
}
else {
_root.yChange = Math.round(this._y - 134);
_root.xChange = Math.round(this._x - 300);
_root.yMove = Math.round(_root.yChange/134);
_root.xMove = Math.round(_root.xChange/20);
this._x -= _root.xMove;
this._y -= _root.yMove;
}
}Thanks in advance, Itai |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Flash menu! | Lawous | Flash 8 |
1 | 12-03-2006 11:54 PM |
| drop down menu | MacMaster | Flash MX |
0 | 08-08-2005 04:38 PM |
| Menu in flash document wont display | toddm | Actionscript 2.0 Components |
0 | 03-01-2005 10:42 PM |
| Flash 5 Menu Help | O-Jay | Flash 5 and below | 0 | 11-25-2004 09:47 PM |
| Positioning xml generated menu | tommie20 | Flash MX ActionScript |
1 | 05-04-2004 04:36 PM |

Programming Languages



