Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Possible To Set The Mouse's Position?


Hi I am using flash mx is it possible to set the mouse's position without the user moving it?

thanks




FlashKit > Flash Help > Flash ActionScript
Posted on: 10-20-2002, 09:29 AM


View Complete Forum Thread with Replies

Sponsored Links:

Mouse X Position To Control Movie Position?
Hi, my understanding of actionscript is very basic and I'd like some help with writing a very simple script. Basically the x position of the mouse should control the play position of a movie. Do I need something like an event handler (I'm not sure exactly what these do, but I've seen similar scripts that seem to use them).

View Replies !    View Related
Mouse. Hide, Mouse.show-on New Position
On button release i hide mouse because mc start to play
and on the end of that mc i show mouse agin.

Plese tell me how to move mouse in new position on screen with mouse.show() function

tenx,
m.

View Replies !    View Related
Position Of Mouse = Position Of MC
How would I tell a movie clip to move along with the mouse without dragging. Also how would I define the area to which the movie clip can move?

View Replies !    View Related
Mouse Position ?
Here is my problem ..... i want 2 lines to follow my mouse ... like a X and Y line, but am not sure how to do this . i would like somthing like this
http://www.yigal-azrouel.com/

If anybody could please help me it would be greatly apreacted . If posible could i get some code??? to use as an example .
thanks.

View Replies !    View Related
Mouse Position?
Where I dit it wrong?
I want to get dynamicly y position of mouse in text box.

on the first frame I typed:

" var y = 0; "


and on movie action I typed:

"
onClipEvent (mouseMove) {

y = _root._ymouse;

updateAfterEvent();
} "

Thank you in advance

View Replies !    View Related
Mouse Position
How can i read the current mouse position on the x and y axis and output this to the screen?

Thanks

View Replies !    View Related
Position Of Mouse
is there a function that gives the position of the mouse? I've tried it with a drag movieclip and then reading the x and y coordinates .. .it works but there can only be one movieclip that can be dragged at a time .. so i tried a while (thrue) construction but it didnt work to so any suggestion?

View Replies !    View Related
Mouse Position
Hello,

I am trying to detect on the main timeline when the mouse is within a box or certain coordinates. Then once it is within these coordinates the movie will go to frame 2. Then once it is outside these coordinates then it will go back to frame 1. Is this possible.

If it helps an example of the coordinates of the box are

Top Left x=75 , y=23
Bottom Left x=75 , y=70
Bottom Right x=150 , y=70
Top Right x=150 , y=23

I hope this makes since.


This is what I put on the first frame of the main timeline. Nothing happened at all.

if (_ymouse >= 23 && _ymouse <=70 && _xmouse >=75 && _xmouse <=150) {
gotoAndPlay ("Scene 1", 2);
}

Thanks for any help!

View Replies !    View Related
Mouse Position. How?
Hi all,

Hope someone can help with this one.

Im trying to get the mouse cursor to change it's position on the screen when a button is clicked.

So when u click the button, the mouse jumps to the top corner of the screen.

any ideas?

View Replies !    View Related
Mouse Position
Is it posible to position the mouse curser at the beginning of a movie?

example:
I want that my mouse is at
_xmouse = 100
_ymosue = 200
as soon as my movie starts...

any ideas?

with:
_xmouse and _ymouse i can only recieve coordinates but not send!

View Replies !    View Related
Getting X Mouse Position
what is the command for getting the mouse position???
i got this:

scrollspeed = getProperty("../scrollmenu", _x);

i want the scrollspeed of a menu to be equal to the x position of the mouse... how do i do this???

so when i come to the center of the menu that it stops scrolling and the further you move your mouse the faster it scrolls?

ive seen it in some of you little name banners.. but how do i do it?

thanks..

View Replies !    View Related
Mouse Position
How can I know if the mouse is on the clip or not ?

View Replies !    View Related
Is It Possible To Set The Mouse Position?
Can you set the position of the users mouse without him moving it??
thanks

View Replies !    View Related
Mouse Position
I NEED MORE HELP!!

I have an image of logos 3000x100 long in an 650x400 swf which I control to go left and right according to were the mouse is using the following code;

xcenter = 325;
xdiff = _root._xmouse-xcenter;
_root.content._x = _root.content._x-xdiff/8;

The problem I have is that I would like to stop the image going off the stage when it reaches either end !, I realise that I would probarly need to use the IF statement, but cannot get my head round it.

CAN SOMEONE HELP?

View Replies !    View Related
Mouse Position
Hi,

Question: I have made a movieclip with two states, labeled "a" and "b".
Now onClipEvent I drag that movieclip, becoming my cursor.. that part is easy but what I want the mc to do is change states when it's in some part of the movie
For the dragging:
onClipEvent (enterFrame) {
this._x = _parent._xmouse;
this._y = _parent._ymouse;
}
but when the cursor mc comes in to a specified area of the stage I want it to go to Label "b"
Can anyone help?
Furthermore; is there a way to check if the mouse is outside of the movie (when inside a frameset) so it doesn't show the custom cursor mc?

View Replies !    View Related
Mouse Position
Greetings,

How do I set my movie so that whilst my mouse is not in it, it believes my mouse to be in a certain position? To be specific, I have a mouse over drag menu, but before I even mouse over it, it moves. It is initially moving. I want it initially stopped and the user to gain control once placing the mouse over the movie. Thank you kindly for your help.

Herk

View Replies !    View Related
Mouse Position
Hi all, I have a question to mouse position. I know about _xmouse and _ymouse properties, but I have another problem.

Is there any way to determine if the mouse is above the scene? I tried to use _xmouse and _ymouse properties but when you move the mouse very quickly off the scene, those properties return bad values.

Sorry for my english.

I know the reason of this behavior, the flash movie is simply slower than the mouse move (if the mouse move is quick enough ). I know it depends on framerate, but if you have some actionscripts on your objects, the movie can be so slow you can move the mouse off the scene faster than movie can realize with no problem.

So, can somebody advice please?

PS.: Gonna look for some info about detecting mouse-object collisions, that coud be a solution, so if you know smt about it, please, write it down. Thanks a lot.

View Replies !    View Related
Mouse Position
looking for ways to subtley guide the user around my page, wondered if there is any script that can tell the mouse to jump to a location on a certain frame, to indicate to the user where they are to click

cheers

View Replies !    View Related
Mouse Position.
im wondering if i can get the moused X position(left to right) and turn it into a percent(MousePositionX / Scene width)... then mutiply it by the number of frames in a movie clip(% * movieclipframes) then round it to the neared one so i have a whole number, and have the movie clip goto, and stop on that frame number.... so the further right i move my mouse, the further into the movie clip it goes, having the very left be the very begining of the movie, and the very right be the end.

View Replies !    View Related
Mouse Position
I need a movie clip to go on a specific frame when the mouse is roling out of the swf. Anyone can give me a quick tip for this?

Thanks!

View Replies !    View Related
Mouse Position
Heres the situation:

I would like when a user clicks on the button to set a different mouse coordinates, to move the mouse cursor...?


any help would be appreciated?

View Replies !    View Related
[F8] Help With Mouse Position
Hey everyone,

I've just started messing around with this and Im looking for some input about how to achieve a certain effect in dealing with mouse positioning.

So I've figured out how to make a movie clip move in relation to where the mouse is using this simple code below which just gets placed directly on the movie clip I want to affect.


Code:
onClipEvent(mouseMove) {
this._x = 500 + (_xmouse - 0)*+0.05;
this._y = 500 + (_ymouse - 0)*+0.05;
}


But I want to make it so that the movie clip moves slowly into position like it does on this site: Fort Minor

Any ideas?

Thanks.

View Replies !    View Related
[F8] Mouse Position
Sorry for being a fool but I can't figure out why this wouldn't work... ?

if (_xmouse>600 && _xmouse<800 && _ymouse>20 && _ymouse<180) {
dial.gotoAndPlay(2);
} else {
dial.gotoAndPlay(12);
}

cheers!!

View Replies !    View Related
The Position Of The Mouse
hiiii, how r u ?

how can I locate the fix position of the mouse when the movie loaded??

ex: when start the movei the first position of the mouse x=20 & y =60

please help me

View Replies !    View Related
The Position Of The Mouse
hiiii, how r u ?

how can I locate the fix position of the mouse when the movie loaded??

ex: when start the movei the first position of the mouse x=20 & y =60

please help me

View Replies !    View Related
Mouse Position
Hi,

I want to be able to continuously display (refreshing) the x,y positions of the mouse in a textfield. could anyone give me an answer quickly?

thanks in advance!!!

View Replies !    View Related
Set Mouse Position
Hello,

How i can set the mouse position to determinated value of "x" and "y" ?

i like set the pointer mouse position (yes, the "arrow" that we see on screen) to determinated value of "x" and "y" conditionated by an event...

thanks!





























Edited: 01/09/2008 at 05:42:45 PM by jose_luis

View Replies !    View Related
Mouse Position
hi,
how can i use mouse position in as3?any codes?

View Replies !    View Related
Mouse X Y Position Help Please
Ok I have been randomly entering numbers so that when you move the mouse left the images move right and so on...

This is the code I’m using [I think I got it from FK originally a while back??].


PHP Code:



onClipEvent (mouseMove) {
    xmousepos1 = _xmouse;
    ymousepos1 = _ymouse;
    if (xmousepos1>xmousepos2 && ymousepos1>-98 && ymousepos1<-33) {
        _root.scrollclip.nextFrame();
    }
    if (xmousepos1-98 && ymousepos1<-33) {
        _root.scrollclip.prevFrame();
    }
    if (ymousepos1<-98 || ymousepos1>-33) {
        play ();
    }
    xmousepos2 = _xmouse;
    ymousepos2 = _ymouse;






As you can see from my FLA it’s not quite working the way it should. Is there a cleaner way of doing this?
If so could someone kindly point me in the right direction before I beat myself to death with my mouse.

FLA Download

Thanx in advance.

View Replies !    View Related
_y Mouse Position
I have a menu bar that I want to enter and exit the stage when the _y mouse position goes below a certain point. What code would I use for this?

I am confused.

View Replies !    View Related
Set The Mouse Position
does anyone know how to control the mouse position?

i want to move the mouse to a specific position on the screen. how can i do that?

thanks!!

View Replies !    View Related
Mouse Position
Here's the problem!
I have a movieclip which i want it to rotate according to the mouse position. Wut do i have to do???

View Replies !    View Related
Mouse Position
Never touching flash before I have decided upon implementing a navigation which involves playing a movie forward and backwards across the screen.

Using two buttons I have been able to get the movie to move across the screen from the left to the right and vice versa upon rollover.

I would like to somehow eliminate these buttons and make this work depending upon the horizontal location of the cursor.

Looking at the scripts I’m sure this can be done but I’m having trouble figuring out how to tell it to play the movie clip one direction when I am on the left side of the screen and to play the movie clip the opposite direction when the cursor is on the right side of the screen.

Well, I don’t know if my description makes any sense but any help is greatly appreciated.

View Replies !    View Related
Moving An Mc According To Mouse Position....
but with a kind of elastic feel to it. like on http://www.centeroftheworld.com

how do i do this?

View Replies !    View Related
Force Mouse To X Position?
Is it possible to move the mouse pointer to a set x position with code?

View Replies !    View Related
Jump To Mouse Position
i am experimenting with backgrounds for my site. i want to make a movie clip that will jump to where ever the mouse is when the user clicks the mouse, here is what i have just now but i won't work, can anyone shed some light on this.


on (release) {
follow._x = _root._xmouse;
follow._y = _root._ymouse;
}


also if anyone could tell me how to make the animation smooth as if it had been tweened, it would be excellent

thanks in advance

- jgo

View Replies !    View Related
Help. Scrolling By Mouse Position
How do I allow a user to scroll through a list, or, for example, a horizontal row of pictures, simply by repositioning the mouse left or right (from the center)?

Thanks in advance.

View Replies !    View Related
Scrolling By Mouse Position
Let's say I have a horizontal image that I want the user to be able to scroll through based on the mouse position.

For example, if the mouse is on the left part of the menu, the mene will scroll left (and vice versa). Many sites have menus like this, including the Macromedia site, so I presume it's fairly basic.

Can anyone tell me how to do this, or at least point me in the right direction? I gather it has something to do with the mouse x/y position on the screen.

Thanks in advance.

View Replies !    View Related
Help With '.checkBounds' And The Mouse Position
Can anyone help me with this one?

I want to have a square on my mainstage that
when the mouse passes over two lines follow the
mouse but when the the mouse moves out of
the square the lines dissapear.

I´d like to know ho to do this without using an
invisible button as I have links within the square,
(maybe using the action '.checkBounds', etc)

Thanks for any help,

Lenny.

View Replies !    View Related
Mouse Position - Flash 5
Aside from dragging an empty movieclip and testing it's x or y position against the time it is still, is there an easy way to tell if the mouse pointer is not over the flash content area?
I have several button MC's using hitTest for mouseover indicators and I would like them to reset if the mouse leaves the swf area. It is not so much of a big issue, I just think it looks sloppy, so I don't want to devote a lot of processor time to keeping track.

Anyone have any novel ideas?

View Replies !    View Related
4th Bad Question:how To Get The Mouse Position
hi
pls tell me how to get the mouse position : i mean to get 2 text boxes(one for x position and the 2nd is for the y position) which show us the position of the mouse on the screen
thx in advance
c ya!

View Replies !    View Related
Condition For Mouse Position
I need to move the container mc (empty) according to the x position of the mouse. But if I say:

if (_xmouse>160) {
setProperty (_root.empty, _x,100)
}
it does not work. even I tried _root._xmouse...What can I do? SHuld I add a listener for mouse first? What is wrong with it?

View Replies !    View Related
Mouse Position Problems
Help please! What i want to do is make a mc move only left and right on the _x axis if the mouse is within close proxsimaty of the mc. Basiclly, the mouse hot spot is within a small area. I must do this using the x and y coordinates. I hope this makes sense.

View Replies !    View Related
Detecting Mouse Position
What I want to do is detect my _ymouse position so that if it's great than y:470 gotoAndPlay a MC.

can I do this?

View Replies !    View Related
Mouse-position Question...
Hi there again...

I found the elastic code I was looking for.

But...

When I'm on a button and move the mouse to the bottom (The mouse has left the .swf) my button hangs...

Can anyone help me solve this problem?

http://www.flyersonline.nl/menu-test.html



Thanx...

This is the code I use:

====================
onClipEvent (load) {
this._y = 101;
closedy = 101;
openy = 52;
movey = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
movey += (openy-this._y)/3;
movey *= 0.8;
this._y += movey;
} else {
movey += (closedy-this._y)/1;
movey *= 0.2;
this._y += movey;
}
}

View Replies !    View Related
Detecting Mouse Position
Can someone help me with detecting the mouse position: x and y cordinates.
I just want some input text that shows the position of the cursor in the movie...not relative to a movie clip or anything complicated like that. Just how to display the mouse cordinates.

Thanx

View Replies !    View Related
Function: Get Mouse Position?
Is there such a thing, and if so, I would love to know what it was.


This is what I have tried so far...

on (rollOver) {
strinfo = "Place Name Here";
}
on (rollOver) {
mouseyy = "_ymouse";
mouseyx = "_xmouse";
}
on (rollOver) {
setProperty ("info", _x, "mouseyx");
setProperty ("info", _y, "mouseyy");
}
on (rollOver) {
loadMovie ("info.swf", "info");
}

The object is to have the movie "info.swf" loaded where the mouse is currently positioned. The Set property and variable declariations are used to movie the empty movie "info" to the current mouse position.

View Replies !    View Related
Question On Mouse Position
the file and the swf:

http://vectec.net/shabnegar/new/test.htm
http://vectec.net/shabnegar/new/test.fla

It's a simple effect that is navigated by the two buttons, but what I am trying to do is to use the mouse position to move the images, so if the mouse is to the right of the midline go to the second image and if it is to the left go to the first image. The movement is a motion tween in a movie clip. so basically if the mouse is to the right of the midline play one movie clip and if it is to the left play another movieclip.

What is the code for that. I have tried to do it myself but I run into problems left and right...

I appreciate your help..

View Replies !    View Related
Get Oponents Mouse Position?
Hey,

I'm thinking of learning how to make MP games...

I was wondering if someone could make me an easy example/tutorial wich check's something like the oponents mouse position...

View Replies !    View Related
[help]Mouse Position Not Getting Updated?
Hey,

I'm sorry but I can't explain this problem very well, I've upload a .fla for use with FMX or FMX04...

The problem is while you're dragging something to it's boundaries, and then move the mouseCursor outside it, the mouseposition doesn't get updated...

Is there a way to fix this? Cuz it's relay bugging me

PS: screenshot of the problem in the .fla lybrary...

View Replies !    View Related
Move Away From Mouse Position
Hi all

This should b an easy quessie for someone.

All I want to do is to reverse this code, so that an mc moves away from the mouse position rather that follows it...

Thanks heaps.

onClipEvent (enterFrame) {
if (_root._xmouse>0 && _root._xmouse<475) {
endX = _root._xmouse;
}
this._x += (endX-this._x)/5;
}

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved