ActionScript 2.0 :: Scrolling Based On Mouse Position
Jun 18, 2005check out: [URL] - great site
Does anyone know how this scrolling based on mouse position works?
check out: [URL] - great site
Does anyone know how this scrolling based on mouse position works?
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:[url].... 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.
View 9 Repliesi'm trying to setup a scrolling list of products but without the use of a scrollbar. It would be really thankful if someone would assist me in getting attached fla integrated with mouse based scrolling. So if the user moves his mouse to the upper corner of the product list then it would scroll up and vice-versa.
View 1 RepliesI tried my best to search the forum before posting, but if this issue has already been addressed, I apologise in advance. My goal is to create a movieclip that will scroll vertically based on mouse movement, rather than mouse position.I've found many tutorials on the yugop scrolling menu, but my problem with this menu is that the scrolling continues even when the mouse has stopped moving, if the mouse position is on either side of the stage.
View 1 RepliesI am currently working on a interactive map that I am building in flash. I need to figure out if there is a way to code something so that we can have our map zoomed in, so it is only showing a section of the map in the veiwport at a time, but when the mouse reaches the edge of the screen I want it to automatically scroll with it, up, down, over, etc.
View 1 RepliesI have a strip of thumbnails in an MC that is quite long. I am masking this long strip of thumbnails so only a few can be seen at a time. I want the user to be able to move this strip to the right and left based on where their mouse is.But a lot of the solutions I've seen have used the stage width to achieve this...however, I only want the strip to move if they are over the 'active' area.....basically if they are over the mask area.And then when it reaches the end of the strip
View 1 RepliesSo I'm working on my portfolio and I got this problem. The code posted scrolls the sprite "cellContainer" based on the position of stage.mouseY. Perfect.Problem is that I want stage.mouseY to equal the entire cellContainer height. Kind of like how a small tablet equals a huge monitor. So when stage.mouseY = 0,cellContainer.y = 0 and when stage.mouseY = stage.stageHeight, cellContainer.y = stage.stageHeight - cellContainer.height. Right now, it scrolls, but it takes a while to scroll throught the entire height of cellContainer. I want it to be proportional to stage.mouseY.
Actionscript Code:
private function scrollStart(e:Event)[code]....
I am looking for the a code to make my background image move horizontally both ways, when the mouse position is on the left or right of the screen
View 4 RepliesI'm doing an online advertising format (728x90 leaderboard). I have embedded a video into the flash file which covers 1/3 of the format (242x90).What i need to do is seek this video from 0% to 100% based on the mouse position over this area (242x90). I'm guessing it would be easier if i created a button over the video which is 242x90 but i would still be looking for the code that seeks the video based on the mouse position over the button.
View 7 RepliesI am building a gallery which scroll the thumbs according to mouse position. It all works but I try to tell the scrolling to stop with the last thumb on each side, and there I am stuck. I attach the scroll function. The inner if statement is meant to stop the scrolling at a certain point (the 800 is just a number I try, I need to make it more flexible). It works when the mouse move to the right but does not work when it moves to the left.
View 3 Replies[code]When I hover the upper (red) part of the List (I would like to have the List scroll downward, the higher the mouse position is, the faster it should scroll). Similarly, If the mouse hovers over the bottom (red) part, the List scrolls upwards, and the lower the mouse is hovered, the faster the list would scroll. The current code does work - Though, the trace outs make it obvious that:this.layout.verticalScrollPosition += (mouseY - 220)*0.5.or this.layout.verticalScrollPosition += (mouseY -86)*0.5;are giving jumping effects, is there a way to make these values change more linearly or smoother? I created an AnimateProperty, but that works well only if I would like to scroll to a selectedIndex, In this case, I would like the scroller to keep scrolling linearly as the mouse is hovered to a particular red area, and increase in speed when I scroll to either extremity.The Objective: While the mouse is over the Bottom (red part )of the List, the verticalScrollPosition scrolls faster as it gets farther than the center of the ticket list... yet there is jumping effect going on, I suppose due to the EnterFrame. the Same with Upper Part... the higher the cursor is, the faster the List should scroll.I feel this is a common problem to Flash CSx developers.
View 1 RepliesI'm trying to recreate a javascript version of the site [URL] which is in flash.
Currently I've already done up the basic layout, which is a simple horizontal container containing divs. You can see the code here [URL]
I'm thinking to set a handler for mousemove event, but I'm not sure how to do the math behind the container's left position in relation to the mouse's x position for the scrolling part.
I have created a document 600x300 filled with buttons for a rollover effect. I want to be able to play sounds dependant on the x and y position of the mouse without having to use objects that interfere with the buttons.
View 2 RepliesI'm trying to make a faux 3D rotation animation where if the user mouses to the right the object rotates right and if the user mouses to the left the object rotates left. Depending on how far they move the mouse the rotation should speed up or slow down.I spent a lot of time making an object in 3d studio max and importing the animation of rotation as JPEGs onto the timeline. I figured the most efficient way to go about this would be to make the mouse control the timeline instead of the object itself.
View 4 RepliesI am attempting to create 360 degree spin-around product viewer. So far I have a movie clip with 24 frames, each one with a different 15 degree angle shot of the product. Upon playback of the movie, the product appears 3D, spinning 360 degrees.
That was the easy part. Now what I need is to be able to click and drag the product to change which view you are seeing (or which frame in the mc you are on) thus producing a spinning effect. How can you code, in AS3.0, that when the mouse is clicked and drug, go to a certain frame based on the current X position of the mouse?
I have am wanting to do a quick calculation based on the mouse position.here is what I am trying to do.I have an item the site on the stage
stage.width = 400;
object.width = 900;
object.x needs to be at its most -900 and at its least -225.
and based on the mouse position on the stage object will scroll within these bounds.I have all the functional done but just need to know the basic equation to find these points.
I have created a globe that rotates with no problem, but what I am trying to do is to control the direction of the rotation based on the mouse position. For example, if the mouse is to the right of the globe, it rotates towards the right and if the mouse in on the left, the globe rotates left. When the mouse is over the globe, it should stop.
View 1 RepliesI am trying to make an animation where the user can mouse over a small MC at the top of the stage, which controls the movement of another larger MC at the bottom of the stage.I am thinking that 'points' (which I know nothing about) might be the way to go. The other thing is that it needs to be fluid motion. Am I at least on the right track with points and mouse_move or is there a better approach for this?
View 2 RepliesI'm creating a slideshow gallery in flash and am basically there now except for one bit...
have a look here [URL]
The slider at the bottom for the thumbnails moves ok but I want it to stop at the last slide. I
I can manage to code it based on the mc's _x value
i.e if (mc._x < -200){ //do nothing }
but this creates a dead stop and I want a gently slow down like if you were to navigate from thumb 8 back to 1.
all of my coding at the moment uses the mc's x value in relation to the mouse's distance.
The code I have currently set on the slider is:
Code:
onClipEvent (enterFrame) {
if((_root.slidesQTY>6)&&(_root._ymouse>460)){
if(this._x<0){
[Code]....
how I could add another if statement that doesn't halt the animation as it hits the last slide but creates a smooth slow down?
I have been racking my brain trying to figure this out for some time. I have some animated links that activate based on mouse position. The problem is when you whip the mouse over them quickly and it leaves the dimensions of the project, flash thinks the mouse is still there and the links continue their animation. IT IS EXTREMELY FRUSTRATING!! I have a feeling its a simple fix but i cant figure it out. here is the site - [URL] the actionscript is below...probably the most round about way ever devised.
[CODE].....
I need to move a movieclip based on mouse x position. Like this site [URL] - Which I built using a flashloaded app, but I need more control in this project so I'd like to code it without the app. Basically, I have an image of a boy (left) and a girl (right) and I want to move the boy slightly toward the girl when the mouse goes right and slightly away when the mouse goes left. But only about 25-50 pixels in each direction.
I've cobbled some code together from google searching and rough ideas, and it works in a way, but the boy jumps about 400 pixels to the left on the initial mouse move and then floats a bit too far right and left from there. Here's what I've got on the boyMC:
[Code]...
I am having difficulty with getting the playhead to move inside a movieclip based on the horizontal or vertical position of the mouse on the screen. I can get the horizontal motion to move the playhead, but I can't get the vertical movement to do the same. I have attached the document class .as file for it.
View 2 RepliesIs it possible to draw motion guide/path for a mouse position based movement?
For example if I have path the is like letter H. I would need to write many clauses/conditions for the borders of the movement. It would be a LOT easier if there would be some solution that makes the object always to stay on the defined path when moving..
I have a spark List with an item renderer and a tile layout. If I scroll by clicking with the mouse on the scroll bar and trying to scroll with the mouse wheel after that, there is a problem: The interval of the scrolling is oversized, instead of scrolling one item down (or up) the List scrolls 4 items down (or up).
[Code]...
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 2 RepliesI have an Input Text area that users can edit and then submit. I need to be able to show, on screen, the cursor's current position as they type. I don't need to know where the mouse is but all work-arounds I've found so far can only tell me the mouse position. The font for the text is 'courier' or 'courier new' and the Input Text area is scrollable.
View 8 Repliestween from one position to mouse position
View 1 Repliesflash and actionscript but am a computer science student so code is ok. that said I wanna build a xml based scrolling thumbnails in an horizontal bar. each pic should have some effect when the mouse is over it + the scrolling bar should scrol left or right depending on the mouse pos+ the bar stops when am over a pic (with some conditions) I think this i all PS: I have only two days to do it
View 1 RepliesI've checked out a lot of the tutorials on this subject on the internet and they are overly elaborate, involving cameras, in previous versions of flash i would have just messed around with x and y values and xscales and y scales.Anyway my problems is I have a single bitmapdata image of perlinnoise 500x500 on a 500x500 stage. I'm trying to do this all in code.Now I have a few buttons at the bottom. ScrollLeft, ScrollDown, ZoomOut Etc.However when i make a listener to my buttons using Mouse Down im only getting a single increment of scrolling [code]When i click and hold the mouse on the button im just getting 1 pixel of movement, what i want to see is the scene move smoothly while i have the mouse held down.Additionally .scroll doesnt seem to work with floats?
View 9 RepliesI have a map application that when I use the mouse wheel the map will scale up or scale down. The next thing I want to do is to focus on the mouse pointer while zooming on the part of the map.
I have this code...
function focusMousePosition(){ onMouseMove = function (){ Stage.width = _root._xmouse; Stage.height = _root._ymouse; updateAfterEvent(); }}
var mouseWheelListener = new Object();var wheelNum:Number;
mouseWheelListener.onMouseWheel = function(wheelNum){ focusMousePosition(); if (wheelNum > 0){ map._xscale *= 0.9; map._yscale *= 0.9; }else{ map._xscale *= 1.1; map._yscale *= 1.1; }}Mouse.addListener(mouseWheelListener);