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








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.




FlashKit > Flash Help > Flash ActionScript
Posted on: 06-28-2002, 03:54 PM


View Complete Forum Thread with Replies

Sponsored Links:

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 Clips, Using Mouse Position
Hi,

ok, check out, www.f1play.com

What im triying to do, is make a menu like the nav on the right of the site where it scrolls up and down as you move the mouse up and down. Does anybody have an example of this tha i could check out?

Thanks
Chris

View Replies !    View Related
Scrolling Background On Mouse Position Help
using flash 8.
ok now this works, but is limited.
everything moves back and fourth according to which way the mouse is moving, but for some reason it won't go further than say 1350px! why?
help me.


this.onEnterFrame = function() {
difference = _xmouse-_root.bg.menu_mc.arrow_mc._x;
_root.bg.menu_mc.arrow_mc._x = _root.bg.menu_mc.arrow_mc._x+(difference/2);
_root.bg.menu_mc._x = -_root.bg.menu_mc.arrow_mc._x;
};

View Replies !    View Related
Scrolling Based On Mouse Position
Hi,

check out: http://www.furax.ca - great site

Does anyone know how this scrolling based on mouse position works?

thanks

ash

View Replies !    View Related
Content Scrolling Via Mouse-Position
Hello all. Quick question for anyone who can help. . .

I'm very much into smooth animations and clean, crisp design techniques for Flash. So obviously, I have loved learning and becoming more familiar with the "easing" and smooth tweening techniques.

I have come across an example of something I'd love to learn to do, but am not sure how to do it. From what I've seen though, there are some masterful designers/developers in these forums so I figure'd I'd post it here to see if anyone could help teach me the technique.

The example site is North Kingdom. My question is: How did they get the page content to scroll according to the mouse postion? I've seen this done with some photo galleries, but I would LOVE to know how to do it with content.

Can anyone help?

Thanks.

-coldfinger

View Replies !    View Related
Scrolling MC, Controling It's Direction With Mouse Position.
Ok, This is an example of what I'm trying to do. Please see: http://www.abeautifulmind.com/main.html

After a few preloaders, a long image begins to scroll and is controlled by the position of your mouse over the MC. My question is:

1. How is this image scrolling in a complete loop and not just from beginning to end and back again?

2. How is it scripted to react to mouse? i.e. controlling is direction of travel and speed of travel.

Any help would be very appreciated. Thanks.

View Replies !    View Related
Scrolling Speed Depending On Mouse Position
hello,

i want a certain mc to move faster or slower to the right or the left depending on the position of the mouse.
(yes, its a common effect )

also, how do i get a seamless repeating effect of that mc?
thanks!

View Replies !    View Related
Scrolling Photo Bar Cont. By Mouse Position?
I'm trying to find a Flash tutorial and have been Googl'ing away, but
I can't really figure out what to call it!! The end result should be a
strip of photos that scroll both left/right or up/down depending on
the design - the scroll is determined by the placement of the mouse.

Here are two examples:

http://www.kannerarch.com/flash/main.html - click "residential," then
"511 House" to see what I'm talking about

http://www.albertsanchez.com/

I'd love a link to a tutorial, a .fla file or even a fresh suggestion of a
keyword phrase to search for!!! I'm pretty good at fiddling around
with Actionscript, though I can't write it myself, so anything in the
ballpark might help!

Thanks!

View Replies !    View Related
[F8] Mouse Position-based Scrolling Menu
Hello!

I am searching, searching for a Mouse position-based scrolling menu.

You can find an example of what I mean here : http://www.userenabled.com/downloads/rssfeeder/

I am referring to the active menu on the right, in the RSS feeder, below "Sample Feeds".

A concise tutorial would be very helpful!

Thanks!

View Replies !    View Related
Scrolling Background Based On Mouse Position
Scrolling background Hi all, does anyone know where i can find a script to attach to a movie/background image so that i can make the movie clip pan left or right based on the mouse position (with easing too!)? Example http://www.saintsandsoldiers.com/ make sure you enter the site thats where you will see what i mean. I've been wanting to create a page like this for some time using png files and transperency and multiple layers.

Thanks all!

View Replies !    View Related
Controlling Stage Scrolling With Mouse Position
I am trying to create a stage that moves around based on the x and y location of my mouse with easing to stop the screen from going past the boundaries. Any thoughts or advice?

here is an example
http://www.chromazone-imaging.co.uk/flashindex.html

thanks
-P

View Replies !    View Related
Horizontal Scrolling Based On Mouse Position
Hey,

I'm sure this is a pretty common thing, but I've done some searching and didn't come up with what I needed... So I was wondering if anybody could point me in the direction of a tutorial that may help me create something like the scrolling portfolio at SectionSeven, ie, the way it's a long, horizontal list of images, and when you move your mouse either to the left or right sides, it scrolls accordingly. I also like how the farther to the side your mouse is, the faster it scrolls. It also seems to have "momentum", so for instance, if you're scrolling really fast to the left, and then you quickly move your mouse to the right side, it smoothly slows down, and then starts to change direction.

I'm only interested in the scrolling, I don't need the 3D page effect at all.

Thanks for any help, I appreciate it.

View Replies !    View Related
Scrolling Based On Mouse Position Quest
I have a playlist on the stage in a movieClip which is masked by a mask so that only a small portion is visible.

I have added a scroll function to that movieClip so that is scrolls up and down (with restrains ofcourse) based on my mouseY position on the stage.

Now, I found this formula for scrooling once somewhere else and it works fine...

container.y += Math.cos((-root.mouseY/stage.stageHeight)*Math.PI)*15;

...or it can be written this way ofcourse to scroll from side to side:

fullContainer.x += Math.cos((-root.mouseX/stage.stageWidth)*Math.PI)*15;

...and that number (15) repersents the speed of a scroll.

I have used this formula couple of times on some galleries i have created and it works just fine, but the content which is being applied to scroolls regardless the mouse is above the content we want to scroll or anywhere on the stage, BUT I wanted to create what has been created here, on this site: http://www.flashden.net/files/55697/index.html

when the home page opens, go down below to the right, there is a button for opening a playlist, and when the playlist opens on the center of the stage, this playlist can also be scrolled up and down based on the mouse position, BUT it ONLY scrolls when the mouse IS ABOVE the playlist, and anywhere else it doesnt scroll and there is a message: "close playlist"
now, what I am interested in is how to make this scrollable only when mouse is above the content we want to scroll.

If someone can enlighten me I would be greatly satisfied


--------
fullContainer.addEventListener(Event.ENTER_FRAME, cosinus);
function cosinus(e:Event) {
fullContainer.y += Math.cos((-root.mouseY/stage.stageHeight)*Math.PI)*15;

if (fullContainer.y > 0) { // the restrains
fullContainer.y = 0;
}
if (fullContainer.y < - 300) { // the restrains
fullContainer.y = - 300;
}
}
----------


sorry for the long post and Happy New Year everyone!

View Replies !    View Related
Movieclip Scrolling Relative To Mouse Position With Gravity
I need to scroll several movieclips based on whether the cursor is to the left or right of the screen. I would like the clips to move at different speeds to give the impression of depth. I'd also like there to be a sense of gravity when the mouse stops i.e. I don't want the movieclips to stop moving instantly.

Does anyone know of a tutorial somewhere on the web to do this?

Thanks.

View Replies !    View Related
Kirupa Vertical Scrolling Based On Mouse Position
Hi,

I've made a scrolling text that detects the mouse Y position for a movie that is published in 100% width and height. The scrolling is based on the tutorial http://www.kirupa.com/developer/flash8/scrollbar5.htm

But unlike this tutorial I don't have any scroll track or scroll face to control the scrolling. It entirely depends on the mouse position. The attached file is working but continue the scrolling after the point it should stop. I'm really frustrated and all ready spent lot of time for this. Any help will really appreciated


Attachment : http://www.mysharefile.com/v/9910920...irupa.fla.html

View Replies !    View Related
Horizontal Scrolling Determined By Rollover Or Mouse Position
I've got a question. I've searched the forums for something similar and can't find an answer.

I have a 1600px wide jpeg, I'd like to have it so that I can have a flash file in a 500px wide website, where you can roll over arrows in the bottom left and bottom right corners, to scroll this image left and right.

An example can be seen at:
http://www.7forallmankind.com/women.html

You can ignore the rollover's for the particular women on that page, I just want the scrolling left and right functionality as seen there.

I tried a decompiler on the above file, but the action scripting went over my head.

Easy, beginner/intermediate flash help would be greatly appreciated.

View Replies !    View Related
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
How Do I Create?: Scrolling Image Stops On Mouse Over-starts On Mouse Off
I’m trying to create this animation:

I have an long rectangular image (with more images going across it) scrolling FROM the right side of the screen to the left (very slowly). similar to a ticker.

I want the scrolling to stop when the viewer mouses over the menu strip. If they press on the image that they have just moused over, I have a movie clip I want to play for that image (a few images pop up, one bigger than the other). When the viewer mouses off, the movie clip disappears, and the menu continues scrolling to the left, from the right.

Greatly appreciated!!

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
Automatic Scrolling On Mouse Over For Text Scrolling
hi all, ive made a scrolling text box with an up and down button as listed in the tutorials. i know how to make it move 1,2,3,etc lines at a time when the mouse is over but what code/variable do i need to replace the number with to make the text scroll continously as long as the mouse is over it?

thanks
bast

View Replies !    View Related
Scrolling An MC To A Fixed Position
I am desperately trying to achieve an effect which can be found on this site:

http://www.fme.fujitsu.com/employmen...ine/index.html

What I want to achieve is this:

Click on a relevant section on the nav and the 'content' MC will scroll to the corresponding position.
So in effect you end up with a very wide MC that is divided into sections.
I know it must be something like:

on (release) {
setProperty (_root.scroller, _x, "50");
}

but this will just move the MC to that position, not scroll it. Does anyone know of a code that will scroll the movie clip to a specified position?

Many thanks
Simon

View Replies !    View Related
EMERGENCY - Scrolling An MC To A Specified Position
I have a very wide MC (4000px) and a stage of about 500px.
I am going to divide the MC into sections to display various areas of the site.
What I want to do is create a script that can be attached to a button that will scroll the MC to a specified position. ie

on (release) {
setProperty ("_root.scroller", _x, "300");
}

This will obviously move scroller MC to 300 px but can anyone point me in the direction of how to scroll the movie to 300px!

Have a look at this for more of an idea
http://www.fme.fujitsu.com/employmen...ine/index.html

Cheers
Simon

View Replies !    View Related
[ _x Position Scrolling With Easing ]
Alright. I've seen this a million times but can't figure out how to do it, nor can I find a good sample .FLA to help me out. I have multiple pages of content in a clip. It's all masked and layed out and ready for horizontal motion/sliding/scrolling but I'd like to see it ease in and out of its motion without using tweening options. So to put it simply:

• I have a clip.
• Its scrolling is controlled by buttons on the main stage.
• I want it to move horizontally without tweening.
• I want it to rely on _x positioning if possible.
• I'd like to have it ease in and out of its horizontal sliding.

Any suggestions, samples, etc.?

Thanks in advance!

Umnbrella

View Replies !    View Related
Scrolling MC -- Parameters For Y Position
I have a movieClip of a client list which has dual functionality.
You can view the .swf at:
www.thestudioa.com
click on "clients" to see the problem with the scrolling :O)

First, on rollover of images in the content area, the client list scrolls the client name to the top of the list using the following "slider" code in the movieClip:


Code:
onClipEvent (enterFrame) {
if (slider == 0) {
finalY = -132;
currentY = getProperty("", _y);
diffY = (finalY-currentY)/3;
setProperty ("", _y, (currentY+diffY));
The button rollover code is:

Code:
on (rollOver) {
clientlist.slider = 0;
Okay -- that part works fine.
The problem is that I also need the client list to scroll using up and down arrows. I need to use the same slider code so that the transition is smooth from the navigation scrolling to the content scrolling. Currently, I am using the following code for the up and down arrows:

up arrow targets slider 16
down arrow targets slider 17
and rollout / release targets slider 18


Code:
} else if (slider == 16) {
finalY = _y+5;
currentY = getProperty("", _y);
diffY = (finalY-currentY)/1;
setProperty ("", _y, (currentY+diffY));
} else if (slider == 17) {
finalY = _y-5;
currentY = getProperty("", _y);
diffY = (finalY-currentY)/1;
setProperty ("", _y, (currentY+diffY));
} else if (slider == 18) {
currentY = getProperty("", _y);
}
How do I set the maximum top and bottom y positions?
Using this code, the user can scroll up and down forever -- leaving crazy white space.

You can view the .swf at:
www.thestudioa.com
click on "clients" to see the problem.

Any help is so appreciated.
Thanks,
Danielle
[Edited by dkdg on 06-20-2002 at 06:17 PM]

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
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

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
Copyright © 2005-08 www.BigResource.com, All rights reserved