-
I'm trying to track the cusor and display the x and y coords in dynamic text fields.
Heres what I have:
/*I created 2 dynamic text fields and gave them var names of
xpos and ypos inside a new mc. I placed the new mc on the main stage*/
onClipEvent (enterFrame) {
xpos = _root.blank._x;
ypos = _root.blank._y;
}
/*Then made another new mc named cross hairs placed on the main stage*/
onClipEvent (load) {
Mouse.hide();
}
onClipEvent (mouseMove) {
_x = _root._xmouse;
_y = _root._ymouse;
updateAfterEvent();
}
Everything works great execpt the x and y only show the first 3 digits, no decimals. BUT WAIT!!! In Flash 5, the movie works great in test mode, but when exported to .swf format it only shows 3 digits. (Ocassionaly I'll see a .95 pop up on the xpos field.) BUT THERES MORE!!! In a Flash 5 exported movie, that isnt working, it will work if I manually resize the window, or full screen it. Crazy! In Flash MX, it does exactly the same thing but will not work in test mode or a manually resized window like in Flash 5.
Any thought would be appreciated!!!!
-
May sound a bit silly, but are you sure your text fields are long enough to display all the digits?
-
Yep. They're long enough. That was one of the first things I checked.
-
why do you want decimals? if it's for a visual effect divide by .12 or some other fraction. But not if you use these vars for reference of course.
gparis
-
Found You talking about mouse coords an can you also help me? ....
I have also a problem -
How to make these dynamic textfields drging(dragable) with mouse(or near My_Pointer_clip) and displaying current(realtime) the _x _y coordinate values ?
Or how to duplicate these dyn.textfields in custom mouse trail clip so that they will display values?
Please, any ideas
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|