ActionScript 3.0 :: Control A MC Position Based On Mouse Point?

Jan 20, 2011

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


Similar Posts:


ActionScript 2.0 :: Ending _y Position Based On The Starting Point?

Aug 19, 2008

i know the pythagorean theorem for figuring out distance between 2 points.

what i don't know is how to take that equation and determine another aspect based on 2 different bits of data.

figure out the ending _y position based on the starting point, the initial angle and the ending _x position??

View 1 Replies

ActionScript 2.0 :: Mouse X Position To Control Movie Position?

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

As2 :: Control Mc Button Based On Main Timeline Position?

Oct 2, 2009

I have a thumbs_mc with thumbnail images. Within thumbs_mc, I have a transparent overlay_mc that functions as a button. Mouse over the overlay_mc and the alpha chages so there is a tint over that particular thumbnailWhen overlay_mc is clicked, the main timeline goes to a particular frame label.What I need to do is have the position of the playhead on the main timeline also determine the alpha of the overlay_mc so the viewer knows which thumbnail is playing.

View 1 Replies

Sprite Y Based On Mouse Position?

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

Actionscript 3 :: Find Closest Point To Mouse Position?

May 29, 2011

I've got a grid of sprites.Now I would like to drag an image on a grid-element.Therefore I need to know which x/y of the grid-element is the closest point to the mouse-position.

View 2 Replies

ActionScript 2.0 :: Seek Flv Based On Mouse Position

Oct 10, 2010

I'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 Replies

ActionScript 2.0 :: Scrolling Based On Mouse Position

Jun 18, 2005

check out: [URL] - great site

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

View 8 Replies

ActionScript 2.0 :: [CS3] Playing Sound Based On Mouse Position?

Jan 10, 2009

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 Replies

ActionScript 3.0 :: Timeline Controls Based On Mouse Position?

May 25, 2009

I'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 Replies

ActionScript 3.0 :: Set Current Frame Based On Mouse X Position?

Mar 26, 2009

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

View 21 Replies

ActionScript 2.0 :: Scrolling Background Based On Mouse Position?

Dec 19, 2005

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 Replies

ActionScript 3.0 :: Quick Calculation Based On The Mouse Position?

Jun 16, 2009

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.

View 3 Replies

IDE :: Ball - Globe Rotation Based On Mouse Position

Nov 30, 2009

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 Replies

ActionScript 2.0 :: Moving Movie Clip Based On Mouse Position?

Aug 11, 2009

I'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?

View 0 Replies

ActionScript 2.0 :: Animated Links That Activate Based On Mouse Position

Feb 27, 2010

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

View 0 Replies

ActionScript 2.0 :: [Flash CS3] Move A Movieclip Based On Mouse X Position

Feb 11, 2009

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

View 2 Replies

ActionScript 2.0 :: Control Timeline With Mouse Position?

May 21, 2007

Does anyone know how to control an mc's timeline with the mouse position? So, when you click and drag right it plays the timeline forward and vice versa? I know how to do it with a slider, but I'm stuck on replacing the slider position with the coordinate where you click your mouse...if that makes any sense.

View 2 Replies

ActionScript 3.0 :: Moving Playhead Inside MovieClip Based On Mouse Position

Dec 16, 2009

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 Replies

Professional :: Make A Circular Dial, Point At The Mouse Position While Staying Locked To It's Location?

Jul 23, 2010

I trained on flashMX back in the day and haven't done anything since so now I've got CS5 it's a bit like being at school again! I have a circular dial sat in the middle of the screen with an arrow placed on it's edge. How do I get the dial to rotate so it always faces the mouse pointer?

View 7 Replies

ActionScript 3.0 :: Draw Motion Guide/path For A Mouse Position Based Movement?

Mar 22, 2011

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

View 2 Replies

ActionScript 2.0 :: Make A Movieclip In Flash That Makes Buttons Spin Around A Point Depending On The Mouse Position?

Oct 9, 2007

I have recently followed a tutorial to make a movieclip in flash that makes buttons spin around a point depending on the mouse position. I have made my own version off this and would like to use it in a full flash website that i am making at the moment.

The only problem that i am having is with aligning this clip and as it is made up of script i cant physicly drag it to were i want it. I understand how to alighn this with x/y positioning but when i preview the flash in a web browser it is positioned correctly but then when i 'full screen' the browser this clip jumps about 4 inches down the page.

View 1 Replies

Actionscript 3 :: Calculating The Control Point Of Curve Using A Given Point

Jan 12, 2012

I am trying to develop a Quadratic Bezier Curve using the graphics.curveTo() method. Initially when i drag mouse to draw the shape, i use start point and end point of mouse to draw the curve line. I assume control point at any position below or up to the line. An draw the curve using this control point. some what like:-

[Code]...

Now i add a tip on this curve segment. I have x and y position of tip. I want to change the curve segment by dragging tip. but now i don't have the exact control point according to tip position. If i use tip coordinate as control point it reduce the height of curve and now tip does not lie on the curve segment. What i have to do is calculate the exact control point on the basis of tip coordinate. But i failed to get this point.

View 1 Replies

ActionScript 2.0 :: Drawing Api - The Curve Point Be The Same Point As The Mouse?

Nov 3, 2003

From the Robert Penner code given in this tutorial: [URL] i was wondering why controlx and controly has to be so complicated. I've tried changing it to just _root._xmouse but it messes up. I don't get this, shouldn't the curve point be the same point as the mouse?

View 13 Replies

IDE :: Cursor Position Not Mouse Position In Input Text Box

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

ActionScript 2.0 :: Tween From One Position To Mouse Position?

Mar 28, 2010

tween from one position to mouse position

View 1 Replies

ActionScript 2.0 :: Path Of Trajectory Based On Point?

Sep 12, 2009

this is a piece of my code

PHP Code:

dirx1 = (Math.cos((-70)*Math.PI/180)*80);
diry1 = Math.sin((-70)*Math.PI/180)*80;
}
fire1.onEnterFrame = function() {

[code]...

it throws a movieclip at a degree of -70 and a power of 80, while applying gravity of 2 to the diry var anyway... i want to, instead of making the trajectory based on power and angle, make it based on a point on the screen (mouse click) so the bullet will end up at that point when i click that point, ive seen this in bowmaster or bowmaster 2 so i know it works for as2.

View 1 Replies

C# :: Move Object From One Point To Another Based On Duration?

Jun 21, 2011

Basically if I have a sprite for example located at (10,10) I want to move it to say (50,100) and the whole process to take 2 seconds or whatever duration I specify. What is the exact math behind this? I was using a distance based solution to determine speed but was just using a random modifier to control the process. I need something more precise to execute exactly over a set duration.

View 4 Replies

Actionscript 3 :: Using A Point To Set Position?

Mar 8, 2011

Is there a way to set the x and y at the same time using the Point object?

View 2 Replies

ActionScript 1/2 :: Focus On Mouse Position When Zooming Movie Clip Using Mouse Wheel?

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







Copyrights 2005-15 www.BigResource.com, All rights reserved