if anyone could help that would be awesome
flash question
Started by Clandestine, Jan 17 2006 02:21 PM
5 replies to this topic
#1
Posted 17 January 2006 - 02:21 PM
how can you have the cords of the mouse to dispaly as you move it in dynamic text boxes? i want to do it for extra credit for an assignment
if anyone could help that would be awesome
if anyone could help that would be awesome
#2
Posted 17 January 2006 - 04:40 PM
Just need to use this:
Have fun
Funkysoul
var xMouse = mouse._x var yMouse = mouse._y
Have fun
Funkysoul
Edited by funkysoul, 17 January 2006 - 04:40 PM.
#3
Posted 18 January 2006 - 01:09 AM
ooo man that is such an easy code why didnt i think of doing that haha
thanks soo much, ill give it a try at school tomarrow
thanks soo much, ill give it a try at school tomarrow
#4
Posted 18 January 2006 - 09:58 AM
hrm, im here at school and i tried that code and it isnt working =*(
var xMouse = mouse._x;
var yMouse = mouse._y;
Mouse.hide();
_root.onMouseMove = function() {
cursor._x = _xmouse;
cursor._y = _ymouse;
updateAfterEvent();
}
_root.onMouseDown = function() {
cursor.gotoAndPlay("down");
}
_root.onMouseUp = function() {
cursor.gotoAndPlay("up");
}
#5
Posted 18 January 2006 - 11:22 AM
Create 2 textfields give each one an unique instance name, I've used in this example "xmousecords", "ymousecords" and put this code into the root timeline:
onMouseMove = function() {
xmousecords.text = _xmouse;
ymousecords.text = _ymouse;
updateAfterEvent();
}
Edited by funkysoul, 18 January 2006 - 11:23 AM.
#6
Posted 18 January 2006 - 04:26 PM
thanks works like a charm
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
