Jump to content


flash question


  • You cannot reply to this topic
5 replies to this topic

#1 Clandestine

    * Forum Police *

  • Members
  • PipPipPip
  • 833 posts
  • Gender:Male
  • Location:Redondo Beach, CA

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

:)

#2 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 17 January 2006 - 04:40 PM

Just need to use this:

var xMouse = mouse._x
var yMouse = mouse._y

Have fun
Funkysoul

Edited by funkysoul, 17 January 2006 - 04:40 PM.


#3 Clandestine

    * Forum Police *

  • Members
  • PipPipPip
  • 833 posts
  • Gender:Male
  • Location:Redondo Beach, CA

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

:D

#4 Clandestine

    * Forum Police *

  • Members
  • PipPipPip
  • 833 posts
  • Gender:Male
  • Location:Redondo Beach, CA

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 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

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 Clandestine

    * Forum Police *

  • Members
  • PipPipPip
  • 833 posts
  • Gender:Male
  • Location:Redondo Beach, CA

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