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








Dynamic Movement According To Y Mouse?


hey all,

im sure most of you have seen something where you move the mouse to the right, and a little slider bar moves everything left, or when you move the mouse left, a little slider moves everything right... they can be annoying becaues if you dont have your mouse right in the center of the movie, the dang things just keep scrolling... well i want to make one of those annoying things.. has anyone got any ideas to help me out?? mabye point me in the direction of a movie or give me some AS help?? thanks anyone.

jake




FlashKit > Flash Help > Flash MX
Posted on: 03-26-2003, 05:19 PM


View Complete Forum Thread with Replies

Sponsored Links:

Dynamic Text Movement On Mouse Up/down
i'm trying to make a dymanic text field that you can scoll through using key press <up> and <down> but it just scrolls non stop. Is there a way to set restraints to move only one line at a time?

Thanks,
Drop

View Replies !    View Related
Dynamic Text, Mouse Movement Question... :)
Okay... This will probably be simple for some of you.

How do I make the "animation" stop?

The text moves, based on the mouse movement, and I put a mask over the text to only show a certain area at any given time...

this.mytext.onEnterFrame = function() {
if (_root._ymouse>Stage.height/2) {
_root.speed = -2;
} else if (_root._ymouse<Stage.height/2) {
_root.speed = 2;
}
this._y += _root.speed;
if (this.mymask._y>Stage.height) {
this.mymask._y = 0;
} else if (this.mymask._y<0) {
this.mymask._y = Stage.height;
}
}

View Replies !    View Related
Dynamic Image Animation Based On Mouse Movement
Hi All,

We have made a dynamic image animation using xml. We are attaching the source code herewith. At present, when you place your mouse over the images, the animation will start backwards. I.e., it will reverse the way the images are loading.

We want this animation order (normal and reverse) to control based on the mouse movement. By default, now the images are animating in one direction. That is fine now. But, we want the animation should get reversed when you place your mouse at bottom of the page. And again when you move the cursor towards top of the page, animation should again start as normal (vice versa).

Any idea how we can achieve this task using mouse placement?

Thanks in advance.

Krishhhhh

View Replies !    View Related
Move Dynamic Mask Movie.. With Mouse Movement..
Hi everyone, hi like to move my masked dynamic menù, at right and left by mouse move on mask area. I've use an conditions to force the sliding but it doesnt work fine. My mask area is large 973 px



This is the code i ve.


Code:
MovieClip.prototype.easeX = function(x) {
this.onEnterFrame = function() {
this._x = x-(x-this._x)/1.2;
if (Math.abs(x-this._x)<=1) {
//delete this.onEnterFrame;
this._x = x;
}
};
};



Code:
this.onEnterFrame= function() {
if (_root.mask.hitTest(_root._xmouse, _root._ymouse)) {
slideMenu();
}
};


Code:
slideMenu = function () {
if (_root._xmouse>782) {
this.container.easeY(-214);
} else {
this.container.easeY(88);
}
};


Anyone can help me??

View Replies !    View Related
Mouse-movement Triggers Background Movement - Help Me Find Tutorial
I want to learn how to make an image react on my mouse-movement, so you get the effect as if you're looking around. You move the mouse to the right, and the image on the screen moves to the right, etc. I've seen an example of that on http://www.center-of-the-world.com/ - but I don't know how to find a tutorial for that on the Flashkit-site. Can anyone help?

View Replies !    View Related
Capturing Mouse Movement/locking Out A Direction Of Movement
does anyone have a good solution in AS 2 for simulating horizontal and vertical finger gestures like on an iPhone?

I have a Mouse listener that calculates movement in both directions and whichever one is larger in value (primary movement of mouse) then it locks out the other using a boolean value. And then once the mouseUp event is triggered, it sets the values to true again to listen for another horizontal or vertical gesture movement.

the problem I'm running into is that every once in awhile while I'm "gesturing" or moving the mouse in a particular direction, I'll get some funky results which clues me into that the other direction might not being totally locked out.

Make any sense?

View Replies !    View Related
Flowing Mc Movement Opposite Of Mouse Movement
I have a mc (fStrip) which looks like a piece of filmstrip with thumbnail images in it. I want this mc to move when the users mouse is positioned over it, but I only want it to move only along it's x-axis and in a direction opposite that of the mouse. And I want it to move or flow smoothly.

I've been trying to figure this out (see my lame attempt below) but without much luck. Can anyone help me out? Thanks.


onClipEvent (mouseMove) {
buffer=20 //movement buffer
mousePos=_root.fStrip._xmouse //store mouse position
if (mymouse!=_root.fStrip._xmouse){ //if the mouse has moved
diff=mymouse-_root.fStrip._xmouse; //find amount of movement
_root.fStrip._x-=diff/buffer; //buffer & set strips movement
updateAfterEvent(); //adding this makes the movement cleaner
}
}

View Replies !    View Related
Image Movement Based On Mouse Movement
I have my Flash canvas. In the Canvas I have an image that's centered and larger than the canvas. Obviously the entire image isn't shown. How can I use actionscript to move the image according to where the mouse is? So if I move my mouse to the top right corner I want the image to move accordingly to display the top-right corner (obviously in a smooth fashion . I tried looking for examples but wanted to know if anybody out there new.

Any ideas?

Little help and thanks in advance!
Brian

View Replies !    View Related
Object Movement Based On Mouse Movement
Not sure how to word this but. I have a object on the stage lets say that is 300 pixels wide. The actual stage is only 100px wide. I want to be able to "pan" the object left and right based on mouse position/movement. I saw a tutorial for it a while back but cant seem to find it. Anyone have a link to a tut or can throw out a little source code? It would be greatly appreciated.

View Replies !    View Related
Scroller That Moves According To Mouse Movement Not Mouse Location.
I am trying to recreate the effect seen here:

Express Top Ten

alright here's the request:

I have found many scroller tutes most of which use buttons to control them. What I need or think I need is a tute or file to refer to, that uses a mouseover effect to move the movieclip with respect to how much the mouse has moved and still uses easing.

I have found files that make the movieclip move according to the mouse position on the stage, but i need it to move in according to how far it just moved.

feel free to email me with any questions.

thanks in advance,
chris
email me

View Replies !    View Related
No Mouse Movement
is there a way of making a movie jump to another part of a movie when the mouse has not been used for a while. So in say, 30 seconds, the mouse has stayed still it goes and plays an introdustion part of the movie?

View Replies !    View Related
Mouse Movement
Ok here is my problem I have made my mouse disapear then i use an aimer to mask it but when i move off of the flash screen it disappears and i cant see where my mouse is is there any way to tell flash like when it can show my mouse iand when it cannot

View Replies !    View Related
Mouse Movement
Dear All,

I am trying to create an effect with a JPG. My idea is to reduce the alpha of the JPG when you move the mouse to the left and increase the alpha of the JPG when you move the mouse to the right.

How can I create this effect with Actionsript?

Thanks for your help

View Replies !    View Related
Mouse Movement
i want to manipulate a movie . i want to move the mouse left or right. a specific movie will move in _x ( same direction as the movement of the mouse)


thanks!

View Replies !    View Related
MC Mouse Movement
Hi,

I need some help with my problem, I have 3 MC with some dynamic text inside, this text come from a txt with variables.
If I have all MC visibles(with text) I can swap , but now I have a small problem , each one of them goes for one level different, and the nº 3 have a very very slow movement.

How can I correct this, I try with :

myMC.onMouseMove = function() {
updateAfterEvent();

And I dont see changes on it or I didn't use this in correct way, can someone help me with this, pls.

Thx

View Replies !    View Related
Mouse Movement
Hi;
Is there a way to detect if somebody is uing the mouse and therefore, if no movement is detected, I can re-run the movie?

Thanks
Riyad

View Replies !    View Related
Movement With Mouse
You have all seen those flash movies where a movie moves according to where your mouse is on the screen, scrolls left or right etc. usually with some type of easing.

Anybody knows simple code to achieve this, or where to find a tutorial?

View Replies !    View Related
Mouse Movement
hi there..i want to draw 2 boxes with a mouse cursor but the user while i'm drawing won't be able to do anything on the stage...i've seen that effect at
http://www.thanea.com/ars/

smth like that i suppose..any help would be useful..
thank u..!!

View Replies !    View Related
Containing Mouse Movement
I am making an interactive map and am trying to contain my mouse movement to only stay within a certain box instead of the whole page / flash movie template.

I have made a Movie Clip and given it an Instance Name of "menu"

This is the code I have used to make the mouse move all around at free will.
difference = _xmouse - arrow._x;
arrow._x = arrow._x + (difference/delay);
menu._x = - arrow._x;

difference = _ymouse - arrow._y;
arrow._y = arrow._y + (difference/delay);
menu._y = - arrow._y;

//second frame
prevFrame();
play();


Here's a link to the actual file so you can look at it and know exactly what I mean. > http://www.inkworth.com/smart/map.html <

I want to keep that mouse movement for that map inside the grey box so when I move the moues outside of it, the map stops moving, and I can continue to navigate the rest of the site (not seen)

Can anyone help??

View Replies !    View Related
[F8] Mouse Movement
Hi Everyone,

I was wondering if anyone had a Flash 8 script that could make a movie clip rotate and face the mouse. Then when a key, (w) is pressed, the clip would move whichever way it was facing.

I am using this script for a game, so a hittest script for walls would be nice too.

Thanks,

Mr_Welfare

View Replies !    View Related
Containing Mouse Movement
I am making an interactive map and am trying to contain my mouse movement to only stay within a certain box instead of the whole page / flash movie template.

I have made a Movie Clip and given it an Instance Name of "menu"

This is the code I have used to make the mouse move all around at free will.
difference = _xmouse - arrow._x;
arrow._x = arrow._x + (difference/delay);
menu._x = - arrow._x;

difference = _ymouse - arrow._y;
arrow._y = arrow._y + (difference/delay);
menu._y = - arrow._y;

Here's a link to the actual file so you can look at it and know exactly what I mean. > http://www.inkworth.com/smart/map.html <

I want to keep that mouse movement for that map inside the grey box so when I move the moues outside of it, the map stops moving, and I can continue to navigate the rest of the site (not seen)

Can anyone help??

View Replies !    View Related
Mouse Movement Help
Hi to all,

This is vertical xml gallery, where the mouse will move up, then the scoller will move up and vice versa. now i want the reverse . if it move up , then the scoller come down and if it move down , then the scoller move up.

can anyone please help me.

Thanks


Code:
this.onEnterFrame = function()
{
mask_y = _root.main.mask._y;
mask_h = _root.main.mask._height;
mask_middle = (mask_y + mask_h) / 2;

roller_y = _root.main.roller._y;
roller_h = _root.main.roller._height;
ymouse = _root.main.mask._ymouse;

if (ymouse < mask_y || ymouse> mask_y + mask_h)
speed = 0;
else
speed = (ymouse - mask_middle)/ 30;

if ((roller_y+roller_h)<(mask_y+mask_h) && speed <0)
speed = 0;

if (roller_y > mask_y && speed > 0)
speed = 0;
_root.main.roller._y += speed;
}
stop();

View Replies !    View Related
Mouse Movement
I made a little script that controls the y position of an object based on the y position of the mouse. Here it is:


ActionScript Code:
import flash.display.*;
import flash.events.Event;

var mcPaddle_r:paddleObj = new paddleObj();

mcPaddle_r.height = 50;
mcPaddle_r.width = 5;
mcPaddle_r.x = (stage.stageWidth - mcPaddle_r.width - 2);
mcPaddle_r.y = (stage.stageHeight / 2) - (mcPaddle_r.height / 2);
addChild(mcPaddle_r);

stage.addEventListener(MouseEvent.MOUSE_MOVE, process_mouse_input);

function process_mouse_input(event:MouseEvent):void
{
    if ((stage.mouseY > 50) && (stage.mouseY < (stage.stageHeight - 50 - mcPaddle_r.height)))
        mcPaddle_r.y = stage.mouseY;
}

The script isn't working. When I move the mouse, the paddle does not move with it. Am I doing something wrong?

Thanks for any help.

PS I also tried the following but it didn't work either:

ActionScript Code:
function process_mouse_input(event:MouseEvent):void
{
    if ((event.stageY > 50) && (event.stageY < (stage.stageHeight - 50 - mcPaddle_r.height)))
        mcPaddle_r.y = event.stageY;
}

PPS I traced the problem and it appears it is in the if statement. It won't trace if I place the trace whithin the if statement, but it will trace it if I place it before the if statement.

View Replies !    View Related
Mouse Movement
Hi all,

I am using this code for vertical scrolling gallery. How to add the X and Y Positions For Mouse up and Down for the Below code.

if (_global.chk == undefined) {
_global.chk = 1;
}

mask_y = getProperty("_root.main.verti.mask", _y);
mask_h = getProperty("_root.main.verti.mask", _height);
roller_y = getProperty("_root.main.verti.roller", _y);
roller_h = getProperty("_root.main.verti.roller", _height);

if (_global.chk == 1) {
if ((roller_y+roller_h)>(mask_y+mask_h)) {
setProperty("_root.main.verti.roller", _y, getProperty("_root.main.verti.roller", _y)-3);
} else {
_global.chk = 2;
}

} else if(_global.chk == 2) {
if (roller_y<=mask_h) {
setProperty("_root.main.verti.roller", _y, getProperty("_root.main.verti.roller", _y)+3);
} else {
_global.chk = 1;
}
}

Thanks
krishna

View Replies !    View Related
Mouse Movement
Hello, does anybody know how this works?

http://www.experiencewonderyou.co.uk/

Im interested in how the mouse moves across the picture, so the stage is almost like a view finder.

im sure their are many other examples of sites that use this... cant find any at the moment.

Thanks!!

View Replies !    View Related
Mouse Movement...
hi there..i want to draw 2 boxes with a mouse cursor but the user while i'm drawing won't be able to do anything on the stage...i've seen that effect at
http://www.thanea.com/ars/

smth like that i suppose..any help would be useful..
thank u..!!

View Replies !    View Related
*HeLp Please* MC Movement By Mouse
Hey anyone that has time to help me...

I've mastered the way of image panning on an x asis for menus and so forth, but im trying to get it working with an x and y asis... if you dont get what i mean i mean like the main mavigation in this example

http://www.chromazone-imaging.co.uk/flashindex.html

thanks very much to anyone who can help

sam

View Replies !    View Related
No Mouse Movement
I need help coming up with a AS that if there is no mouse movement a function will be called. I have the following code but it does not always work. If the user moves the mouse too fast out of the SWF this code does not get called. Therefore the images in here do not get reseted.


Code:
var myListener = new Object ();
myListener.onMouseMove = function () {
if ((_root._xmouse>=255) or (_root._ymouse>=255) or (_root._xmouse<=11) or (_root._ymouse<=11)) {
reset ();
}
trace (_xmouse);
};
Mouse.addListener (myListener);

View Replies !    View Related
Mouse Movement Help
Hi to all,

This is vertical xml gallery code, where the mouse will move up, then the scoller will move up and vice versa. now i want the reverse . if it move up , then the scoller come down and if it move down , then the scoller move up.

Can anyone please help me.

Thanks


Code:
this.onEnterFrame = function()
{
mask_y = _root.main.verti.mask._y;
mask_h = _root.main.verti.mask._height;
mask_middle = (mask_y + mask_h) / 2; // take middle of mask as reference

roller_y = _root.main.verti.roller._y;
roller_h = _root.main.verti.roller._height;
ymouse = _root.main.verti.mask._ymouse;

// if mous out of range
if (ymouse < mask_y || ymouse> mask_y + mask_h)
speed = 0;
else
speed = (ymouse - mask_middle)/ 10;
// calculate speed -> the closer to middle-> slower, closer to edges-> faster


// if roller bottom reaches mask bottom and scroll up, stop
if ((roller_y+roller_h)<(mask_y+mask_h) && speed < 0)
speed = 0;
// if roller top reaches mask top and scroll down, stop
if (roller_y > mask_y && speed > 0)
speed = 0;
_root.main.verti.roller._y += speed;
}
stop();

View Replies !    View Related
On Mouse Movement
Here's what I need to do:
Let's say I have a movie clip that is 750x500 and within that
I've created a 300x200 square that is going to be the like the viewing screen for an image I need to load.
I want the image to be behind the box, so that when you move the mouse within the square you move to different sections of the picture...such as a map.

What is the best way to do that. I know it involves actionscript but it also involves some masking and I have more problem with the masking than the actionscript for some reason.

I saw a tutorial out there one time on moving the movieclip north, east, south, or west dependent on where the mouse was....that's part of what I need.

Thanks for taking the time to read this.
Jason

View Replies !    View Related
LITTLE Mouse Movement. HELP
Hy everyone. I have a little INCIPT. So I want create a little little movement for my MC. So....the movimento consist simply on X axes. When I move on the left my mouse...the MC move by 20px RIGHT with tween effect...and INVERSE the same..20px on the LEFT...with easing. How can I do this little MOUSE FOLLOWER CODE?

Thank you all.


N3m3s1s

View Replies !    View Related
Random Movement On Mouse Over
hi!
I want an object to move smothly and then go back to its original place when touched by the mouse. Can anyone give me a hint how this could work with action script?
Thankyou!!
Anne

View Replies !    View Related
No Mouse Movement Causes A Screensaver
Hi

Im really stuck here. Ive got a flash file which is a presentation for my company and its to run on several show pcs which will allow the users to navigate between the presentation etc.

However the powers that be want me to add a "screensaver" effect to the file and they want it so that no matter where you are in the file if you dont touch the mouse etc for say 2 minutes then the Flash presentations begin going through a repetitive loop without waiting for user interaction.

now you see why my head hurts

Anybody got any ideas

Thanks

View Replies !    View Related
Detecting Mouse Movement
Hi, does anyone know code for the detection of mouse movement so that I can reset a timer when it occurs in the parent movie?

View Replies !    View Related
Detecting Mouse Movement?
Lo all,

What code would i need if i wanted to detect when the mouse has been moved?

Thanks for any help u can give me

View Replies !    View Related
Possible To Stop Mouse Movement?
Does anyone know how to freeze the mouse so that I can lock the mouse in place for a couple seconds?

View Replies !    View Related
Ascripted MOUSE Movement - Pls Help
hi,

have found interesting mousenavi fla,
here is a movie for better viewing:
http://www.actionscripts.org/showMovie.php?id=347

movie clip which follows the cursor is scripted:

onClipEvent (enterFrame) {
if (top.bew == "on") {
diffX = _root._xmouse - _x;
diffY = _root._ymouse - _y;
_x = _x + diffX/15;
_y = _y + diffY/15;
}
}

my problem is:
when the movie is loaded and your mouse IS NOT OVER the scene, movie clip first follows to 0,0 coordinates from its "start point", then after you moved cursor over the scene movie clips starts following your mouse movement - it is OK,

BUT how to change the script for movie clips (while cursor IS NOT OVER the scene) will follow to e.g. 360,240 coordinates (not just 0,0 as above) from its start point?

any help will be very appreciated

freelance100

View Replies !    View Related
Quitting On Mouse Movement. Help
Hi everyone!

I'm am trying to figure out a screensaver-like script. I have the key press to quit taken care of, but not the mouse. I tried:

onClipEvent(mouseMove){
fscommand("quit");
}

However, when the window opens, it automatically closes without any mouse movement whatsoever.

Any suggestions or alternate coding?

Thanx!

View Replies !    View Related
Mouse Movement : Timer
hi

Is there a way to load a swf file based on the idle time of the cursor.

For example, if the mouse movement is idle for 2 mins, i want the movie to load a swf file.

thanks

john

View Replies !    View Related
Mouse / Object Movement
Hey peeps,

I'm doing a website, and I have a pattern at the top of the site. I want this pattern to move very slowly in the opposite direction of the movement of the mouse. In fact the top bar is a big image that is masked. That way I want to have constant 'dynamics' in the site, although it is very slow.

Any ideas on how to do this?

Thanks

-sploenk-

View Replies !    View Related
Mask That Follows Mouse Movement
Hey guys,
I really need some help. Im supposed to develop a mask that essentially moves to the _xmouse position. I have a movie clip called target that is on the mask layer and I got everything to work. Except, that it doesnt work when the layer is a mask. When i change the layer to just a regular layer it works. But when I have it as a mask, nothing happens. Any advice would be most appreciated. thanks
Don

View Replies !    View Related
Follow The Mouse Movement?
ok here goes,

i want the mouse cursor to disapear and basically become a dot on the screen... but how do i do this?

im assuming i would make an mc with the dot in it, and somehow set it to follow the mouse... but how would i then get rid of the cursor image?
and will the cursor still be usable even though you cant see it... only the dot....???

cheers

View Replies !    View Related
Restrict Mouse Movement
hey guys, another question for ya, say I wanted to restrict mouse movent from going over say a box in the middle of the screen. like it has hit a wall... any help is greatly appreciated.
thanks
g.

View Replies !    View Related
How To Restrict Mouse Movement, +x, -x, +y, -y?
hello, how can I restrict the mouse downMovement, the mouse upMovement, the mouse leftMovement and the mouse rightMovement?
I tryed hitTest with no luck, could you help me out. I have attached a fla. file...

View Replies !    View Related
Mouse Movement Problem, Help
I keep posting this problem, and no one seems to have an answer, so i'll re word it.

Im trying to rotate a movie clip, so it is pointing in the direction that you move it with the mouse. Which I've basically got working, the problem comes when you move it slowly. As the way i'm working out the angles is by taking the distance moved in the x,y (of the mouse) and then converting it to an angle, but when the mouse is moved slowly because there is no fractions you just get whole numbers, so it either points straight up, or left/right, does any of that explaination make sense?

So how would I get the movie clip to point correctly in the direction moved even when the movement is very slow??

thanks for any help.

phil.

(using MX)

View Replies !    View Related
Moving With Mouse Movement.
I have made an animated bird and it moves with the direction of mouse. I want the bird to face the direction where we move mouse. I mean when we move mouse to the right side the bird should face right and when we move mouse to the left side the bird should face left and so on.

Please help me with this.

Thanks
Salim

View Replies !    View Related
Drag With Mouse Movement
Hi Flashers

I have a flash nav bar which is 543 pixels wide. When I move my mouse I want a square called ghost to move with the mouse horizonatally.. . on the clip called ghost i have this code

onClipEvent (load) {
_root.counter = _root.counter+1;
speed = _root.counter;
}
onClipEvent (enterFrame) {
_root.movePanel(this._name, speed);
}

and on the first frame of the movie have this code

counter = 3;
for (loopCount=2; loopCount<10; loopCount++) {
}
function movePanel(whichClip, baseRate) {
if (_root[whichClip]._x>_root._xmouse) {
difference = _root[whichClip]._x-_root._xmouse;
rate = difference/baseRate;
_root[whichClip]._x = _root[whichClip]._x-rate;
}
if (_root[whichClip]._x<_root._xmouse) {
difference = _root._xmouse-_root[whichClip]._x;
rate = difference/baseRate;
_root[whichClip]._x = _root[whichClip]._x+rate;
}
}

This all works fine but if i move my mouse horizontally off the movie area the ghost shape also moves off the screen, can i set a parameter of some coordinate locks horizontally to stop the ghost clip from moving off the page?

Many thanks

TASvinO

View Replies !    View Related
Detecting Non Mouse Movement
Can anyone point me in the right direction for the code of how to detect when a user hasnt moved the mouse for a certain amount of time.

thanks

View Replies !    View Related
Mouse Detected Movement.....
Ok, I made a menu that reacts to mouse movement to scroll up and down when the mouse moves up and down... but the problem is the menu ONLY moves when the mouse is moving, how can I change this code so that when the mouse position is at the top half of the movie clip, it moves the clip accordingly and doesn't stop once the mouse cursor stops????




Edit::::; Opps here's the code:

Code:
onClipEvent(mouseMove){
if (_ymouse < 216){
_root.buttonsSlider.scrollDown();
} else if (_ymouse > 216){
_root.buttonsSlider.scrollUp();
}
}

View Replies !    View Related
Mouse Movement To Movie
Does anyone know how to make a movie in which you move the mouse into the side of the window and it allows you to move freely througout the movie?

View Replies !    View Related
<<detecting Mouse Movement>>
I have a Movie Clip which is consist of 10 frames.
I want, if the mouse moves to right side it shows the next frame,
if the mouse moves to left side it shows the previous frame
does any one know...?
how should I detect if the mouse moves to right or left?

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