ActionScript 2.0 :: Advanced Sliding MC Related To Mouse Position
Oct 25, 2007
I have been building a movie and I am using the following script to move my mc left or right. However, this looks pretty simple and I was really looking to reach the level of Vodafone this movie's animation, where the mc stops sliding, when the mouse is not moving. This is the code I am using so far and it works fine, but with no easing and it moves continuously..:
Code:
xcenter = 250;
speed = 1/70;
videos.onEnterFrame = function() {
var distance = _root._xmouse-xcenter;
videos._x -= (distance*speed);
[Code] .....
View 2 Replies
Similar Posts:
Apr 3, 2002
Trying to create (and learn) an effect I see often where a series of photos (side-by-side) will scroll across and when your mouse draws nearer to the centerpoint it slows down enough to be able to click on it.
View 4 Replies
Mar 22, 2012
I have some movieclips like this one: game_mc.substage_mc.rightHand and inside the rightHand i have a thread_mc like this:
game_mc.substage_mc.rightHand.thread_mc
Ok so here is the thing, i need to access the thread.x and thread.y position related to the stage or substage_mc i donīt really care, but if i do this[code]...
View 3 Replies
Feb 29, 2008
I have a movie clip that I have given the a "sliding" variable to move it across the X axis. So far I have been using a variable of
Code:
movieClip.newX = -250;
but what i need to do is have the movieclip slide to a position which is relative to an object inside of it.
As i need the slider to move to a position that centers the object which the slider contains on centered on the screen - i have tried:
Code:
movieClip.newX = movieClip.ContentsObject.Stage.width/2;
but with no response. I realise that code is incorrect, but need something that will work in that way. I presume i need some sort of listener to follow the _x position of the specific movie clip.
View 7 Replies
Nov 25, 2003
I've created a sliding menu that has a left button and a right button. Each button slides a background movieclip to the left or right. The background mc eases into position when one of the buttons is clicked. Problem is that buttons can still be clicked while the mc is easing into position. This throws off my x coordinate positioning of the mc. I've tried disabling the buttons and enabling them again at a few different points in my code. I've also tried using a time delay to enable the buttons but my logic isn't working.
View 5 Replies
Oct 14, 2004
I have a "slide" function that slides a MC for let's say 150 px. I call that function every 5 sec with the SetInterval function.
[Code]....
the things is, when i run the function without setInterval, it works perfectly. But when i setInterval and even if i added a updateAfterEvent(), it still won't slide but only move to the final position of the sliding.. So why doesn't it refresh the display??
View 5 Replies
Jun 30, 2010
how to make it work.I have 3 layers.
1. top layer is an image of a cell phone with a blank screen (where I'd like the mask to be utilized)
2. the mask... which is paired with the cell phone image above.
3. the main/maskable image, which is only revealed by the cell phone's screen.
4. the very bottom image, visible all the time.
I need the base layer image (#3) to be static, and I need the top two layers to be able to follow the same mouse x/y coordinates. So far, I've only known how to have the mask and the masked image be one together, rather than be able to move the mask independently of the image I want to mask.
View 4 Replies
Mar 30, 2009
I have a sliding scroll bar which responses to the mouses movement (as seen on link). [URL]. How do start to embed buttons within the movie clip so it stops and goes to another animation/movie clip?
View 2 Replies
Feb 1, 2006
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 Replies
Nov 12, 2009
I 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 Replies
Jan 22, 2010
I am looking for the Action Script that will allow me to set up a horiz. set of images and use the mouse movement to move the band of images left or right. Upon clickin on the image I will have a link to other views.
View 3 Replies
Mar 28, 2010
tween from one position to mouse position
View 1 Replies
Oct 29, 2009
I 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);
View 3 Replies
Mar 9, 2010
Code:
addEventListener(MouseEvent.MOUSE_WHEEL,mouseWheel);
function mouseWheel(event:MouseEvent) {
Map.scaleX = Map.scaleX + event.delta*.01;
Map.scaleY = Map.scaleX;
}
The problem with this code is that it scales from the registration point (0,0). Due to the other transformations I'm doing to this image at various times, it isn't possible to move the registration point. The image is larger than the stage and the user is able to drag it around. I want the mouse wheel to zoom in on the place the mouse is hovering over (or at a minimum...the center of the "view" they have...aka the stage)I tried doing this:
Code:
internalPoint = new Point(Map.mouseX, Map.mouseY);
externalPoint = new Point(stage.mouseX, stage.mouseY);
var matrix:Matrix = Map.transform.matrix;
[code]....
Which, incidentally, I'm using that whole portion of code to zoom into the state they will be in when they use the mouse wheel.
View 1 Replies
Apr 21, 2010
I have MC masked with TEXT,when the user moves his mouse down more text appears from the bottom and when he moves it goes bakc to the original position...I do not want the mouse wheel .. I woudl like to do it by mouse hovering...
View 5 Replies
Aug 4, 2011
I am designing a web application in Flex 4 and currently facing an issue rendering advanced HTML tags and entities in Flex 4. All I want to do is basically render an HTML text coming to me something like the one given below:-
[Code]....
View 3 Replies
Jan 1, 2010
I am trying to get the mouse's position even when it is outside of the flash window. How can I do this?stage.mouseX/Y only returns the mouse position on the stage, not when the mouse is outside. Is there another way?
View 5 Replies
Apr 11, 2010
The closest I have come to is the basic mouse hide and then mouse show, however this only gives the illusion of the cursor not being there, however you can still use it. I would like the cursor to be 'disabled' within the flash movie for a limited time. Either by it disapearing and then reappearing, or by it being frozen in place
View 2 Replies
Jan 12, 2009
How can i use mouse position in as3?
View 1 Replies
Jan 27, 2009
I have a panning background with buttons in it. It would be nice if when the button is pressed i could move the position of the mouse so that the movie pans and catches up with the new position. Is this possible?
View 4 Replies
Nov 20, 2009
I want to do something which is probably pretty simple but I've got absolutely no idea how to do it!What I want is for the Alpha value of an object (movie clip) to change depending on the x position of the mouse. So when the mouse is at 0 the alpha of the object will be 0%, and when it's at 100 the alpha will be 100%
View 4 Replies
Jul 20, 2011
So 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]....
View 4 Replies
Jul 28, 2009
I have 16 MC on stage when they are clicked they can be draged but how do i make the one being clicked above all the others?
View 8 Replies
Jun 13, 2011
My question is fairly straight forward: Is there a way to move the position of the mouse?within confines of the stage)I tried changing the value of mouseX/mouseY but it shows the following errors:I:FlashFlash ClassesMazegameMaze.as, Line 98 1178: Attempted access of inaccessible property mouseX through a reference with static type game:Maze.I:FlashFlash ClassesMazegameMaze.as, Line 98 1059: Property is read-only.
View 6 Replies
Aug 6, 2011
i wan to change my mouse coordinate to x->0, y ->0, possible?
View 3 Replies
Jun 23, 2010
Is there a way to lock the mouse X and Y position?, I mean, I want to move my mouse but I want that the mouse position to be locked on.. let say, the center of the screen. Btw, I need to do this using Flash.
View 2 Replies
Jul 8, 2009
im currently developing a website and would like to learn how to make this Effect Here
View 1 Replies
Apr 8, 2009
Im trying to follow an example and get a simple arrow sprite to rotate to the mouse position. This example comes out of the book 'Foundation Actionscript 3.0 Making things move' however when I build the following .as files, open a new as3.0 document, assign the document class to RotateToMouse, run the movie the swf's stage is blank and lacking the arrow sprite im telling it to create.
Code:
Code: Select allpackage
{
[code]....
View 1 Replies
Jun 10, 2010
i want to make my thumbnails move opposite of where the mouse is.so for example, if i move the mouse up the thumbnail moves down, if i move the mouse left, the thumbnail goes right etc...im trying to google this but i dont even know what its called so im not getting good results, or rather TOO many varied results lol. i was told on another forum that its called parallax menu or something like that but when i research it, i get millions of pages refering to this type of effect (they have other that move vert/horiz too)
View 5 Replies
May 26, 2004
I'm trying to make a movie clip play when the mouse is in a certain position on the screen without using invisible buttons, coding this myself so far I've got
[Code]...
View 3 Replies