ActionScript 3.0 :: Movieclip Move On Menu X Axis?
Jun 16, 2009
I'm making a Website, where the the menu will have a luminous movieclip which follows the menu items X axis around and stays there.I wan't to confine the movement to the menu only. Once it leaves the area, the bar stops moving.This is what I have so far:
stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
function mouseMove(event:MouseEvent) {
menubar_mc.x = mouseX;
}
View 1 Replies
Similar Posts:
Mar 2, 2005
I'm trying to grasp how functions and motion tweening works.
Heres my question. How do i make an object move along the y axis once it has reached its x axis target?
HEre is the code, that i got from here.
and what in this code is making the MC ease out?[code]...
View 14 Replies
Dec 22, 2008
Im in need of a simple code which makes a MovieClip move side to side horizontally preferably using the attachMovie function.The MovieClip must not go off the screen so the movement will have to be limited within the stage size.
View 11 Replies
Apr 12, 2007
It's been a long time since I've done any work with actionscript, and alas I've forgotten nearly everything. I've tried to look for a tutorial that would explain basic animation with actionscript, but the one that I found on Kirupa was no longer there.
Basically I'd like to do this:On the stage I have a movieclip and I'd like the movieclip to move along the x-axis to a certain point and then back to the starting point again. The moving speed of the movieclip should also be adjustable.
View 8 Replies
Feb 23, 2009
i want to move a MC from 200 to 0 on X-axis..suppose this mc's name is mc1..
Action Script 2.0:
mc1._x=200;
onEnterFrame = function(){[code]...........
View 1 Replies
Aug 27, 2009
I've got a script that let's me drag the mask with by clicking and dragging it with with my mouse. Currently the mask will move along x and y axis. I would like it to move only on the x axis.[code]...
View 3 Replies
May 27, 2010
Just making the move to AS3 so bare with me. I used a tutorial on senocular for attaching mcs to stage with random positioning and y position sorting. What I am trying to do now is have the clips move along their respective x axis back and foward in a random amount of pixels. Say move 33pixels left, flip then move 12 pixels right and so on....
ActionScript Code:
// The number of trees to generate
var treeCount:int = 50;
var velocities:Dictionary = new Dictionary();
[Code].....
View 1 Replies
Aug 28, 2006
I want to move MC_char on x axis. I have two sideways moving clip of moving man.if I move my charater on x axis it should move on the same with the enternal movement of MC.
View 2 Replies
Nov 19, 2009
have two sets of movie clips. I'm communicating to these movie clips with another program via binary sockets. For the first set of movie clips: when it recieves its instance name, and a second number (InstanceName+#) from the socket, the named movie clip will jump to the frame corresponding with that number. for ex: if the incoming data from the socket is (mc7+3), then movieclip 7 will jump to frame 3.
For the second set of movie clips: when it recieves its instance name, and a second number (InstanceName+#) from the socket, the named movie clip will move location across the screen, by the y coordinate moving to the # given by the socket...thats a little confusing. for ex: if the incoming data from the socket is (mc4+500), then movieclip 4 will move so that it's y coordinate is at 500.
Here is my code:
Code:
var socketBuffer:String = "";
s.addEventListener(ProgressEvent.SOCKET_DATA, onDATA);
function onDATA(e:ProgressEvent):void{
[Code]....
i got rid of some errors. the first part is working where the movie clips jump to the frame they are told to so no errors there. but when i try to move the movie clips in reference to the FADER array, (along the y axis) nothing happens. (look at bold part of code)
theres also another method i'm willing to approach but i'm not sure how to go about it. rahter than using the FADER array, I would rewrite the code for each individual movie clip, so that it says "if incomign data names a movie clip and gives a number, change the named movie clip's y coordinate to the incoming number"
View 9 Replies
Dec 10, 2009
I'm trying to a make a small animation, and I was wondering if there is a way to make the flash "camera" move on the x, y, and z axis on a specific frame? LMK if you need more details.
View 7 Replies
Jun 1, 2004
I want to make a handle pull up and then down through an arc. Now using the startDrag on the Handle won't make the handle pivot around an axis. It needs to move a bit like a (one arm bandit) or (The old coin Poker Machines) I have attached a basic file to show the problem I have so far.
View 2 Replies
Jun 30, 2010
I want to move an object along the x axis continuously after a button is pressed until the object reaches a point. How can I achieve this?
View 5 Replies
Jun 1, 2004
I want to make a handle pull up and then down through an arc. Now using the startDrag on the Handle won't make the handle pivot around an axis. It needs to move a bit like a (one arm bandit) or (The old coin Poker Machines) I have attached a basic file to show the problem I have so far.
View 2 Replies
May 10, 2011
I'm creating a simple game and I need to move objects down the y-axis from the top of the screen to the bottom.I want one object specifically to randomly appear and then exit the screen. I'm using a random number generator to test against and call the object to the screen and to move from top to bottom when the random number is greater than 950.The problem is that when the random number generator, generates two numbers in a row over 950 the objects skips back to the top.The animation is nested within the mc. I tried animating it with as3 but it jumps down the screen and doesn't look like a smooth animation.Is their a way that I can track the progress of the mc animation and use an && conditional to only play the animation when it's on, say frame one of the animation?What I want is to say if the movie clip is at frame one(stopped) and the random number is greater than 950 play the clip. If the clip is begin played not at frame one. Don't replay it.[code]
View 1 Replies
Sep 7, 2011
is there a easy way to make an object move along the x axis in one direction then when it reaches that direction it moves back. with a smoove movement.
View 1 Replies
Jan 2, 2004
I'm trying to make an object to move randomly across x-axis and while it moves back and forth it also scales in width.
View 3 Replies
Jun 30, 2010
I want to move an object along the x axis continuously after a button is pressed until the object reaches a point. How can I achieve this?
View 9 Replies
Jan 29, 2009
I have one very large movieclip, and I'd like to create a very smooth (eased), tween, that moves it around the stage, on mouse move. so far, I've read the "get mouse direction" article, and that's helped a lot. and I'm calculating the distance the mouse is moving.. and that's all good and dandy,.. but I'm having a little trouble converting that into a smooth scroll.. I'd like to use tweenmax preferably, and not an on enterframe.
View 14 Replies
Jan 7, 2004
I have a menu bar that when a user mouses over it, a second menu slide out beneath it.when I move my mouse off the first menu bar, the second menu bar disappears. Im not sure how to organize my hit areas so that the second bar stays even if I mouse off the first menu bar.
View 1 Replies
Jul 24, 2010
I'm trying to do a simple game in which you have to move a frog in X axis to catch the falling flies. sorry if I mistake some words cuz I talk in spanish It's already done, but it has 2 bugs and I dunno what the reasons are
The 1st bug, Each time the game is over, and you click in "PLAY AGAIN ", I could notice that the frog movement (which you can move by pressing the keys) is increased a little; for example if you played 6 times the 7th you can reach the opposite side by pressing the corresponding key 2 times, despite the fact that in the code i did write only +15px for the right when you press right arrow and -15px for the left when you press the left one (on X axis) for each time the key is pressed
[Code]....
View 3 Replies
Jun 2, 2003
basically this is the code i got from a kirupa tutorial and i just want the graphic to be moved on the x axis
onClipEvent (enterFrame) {
getlimits = _root.normalpic.getBounds(_root);
//get the limits of the normal pic movie
[code].....
View 3 Replies
Sep 3, 2010
I am building a vertical menu that is draggable on the Y axis.
1.How do I add easing? Can I use fuse?
2.If the button that is being dragged reaches a point on the y axis it would trigger a function. If it is let go before reaching that point the button would snap back to the original position. I guess a simple (if statement) would work - but not working for me
3.Last thing. It is a vertical menu, so when a button is being dragged everything above it would drag with it. Cannot seem to get that to happen
View 1 Replies
Apr 12, 2011
Baisically I've created a button using symbol and I want the button to move a movie clip up the y axis by 4 every time it is clicked (move the movie.) I really don't know how to do this. This is what I currently have but its not ActionScript:
[Code]...
View 6 Replies
Mar 19, 2012
I have this four draggable movieclips. I have able to drag the green bar within the gray bar and the dynamic percentage text increase/decrease accordingly.
The program should make the second draggable determine the percentage of the first (100 - current value) and make it the basis for the other 3 draggable.
Example:
if the 1st draggable will be 75%. the other 25% will be divided by the other 3 draggables.
The 3rd draggable determine the 2nd percentage (100 - current value) and make it the basis for the other 2 draggable and so on.
When I drag the 1st draggable the other 3 is drag & animated accordingly but I cannot drag the 2nd, 3rd and 4th draggable.
View 1 Replies
Aug 2, 2011
I know that startDrag function allow a movieclip to be draggable on the stage. But what I'm trying to achieve here is that I want that certain movieclip to be draggable on a limited space. I attach a screenshot for further information.Above is a screeshot of the flash movie. The white area is the stage and the green square is the draggable movieclip while the gray rectangle is its draggable limit.
View 3 Replies
Nov 27, 2011
I am trying to construct coordinates with distance in meters on the x-axis and time in seconds on the y-axis, without using the timeline. How can I draw the divisions on the x-axis and y-axis ? Or I better draw the whole thing.
var my_shape:Shape = new Shape();addChild(my_shape);
my_shape.graphics.lineStyle(3, 0xFF0000, 1);my_shape.graphics.moveTo(50,50);my_shape.graphics.lineTo(50, 300);my_shape.graphics.lineTo(500, 300);
View 9 Replies
Aug 7, 2009
I've put together this simple code for an SWF with three roll over images (called: Training, Resources and Contact).When I roll over Training I would like the symbol Training_txt to tween its alpha to 1 (from 0) and tween its y axis to 220 (from 83).When I roll out of Training I would like to run the two tweens in reverse.
This works fine for each of the three roll over images, so long as each tween is allowed to fully execute before a new tween is started. The problem arises if i quickly move the mouse curser between the three roll over images before the previous tweens have finished executing.In this instance, the tweened objects start to behave erratically. They usually return to their original position as per the roll_out tween but then start jumping between y axis 200 and y axis 83 (without tweening - they just appear).
Code below -
stop();
import fl.transitions.Tween;
import fl.transitions.easing.*;[code]..........
View 1 Replies
Apr 26, 2010
Is it possible to drag a movie clip named "xxxx" along the y axis when you click and drag? if so what is the as2 code?
View 1 Replies
Feb 17, 2011
I'm new to flash. and action script.. I'm trying to repeat my Movieclip 'wave' using TimeLineMax from com.greensock Package. I'm able to repeat it in the correct way... with the following..
var tl:TimeLineMax=new TimeLineMax({repeat:20,yoyo:false,repeatDelay:1.5,ease:Elastic.easeIn Out});
tl.append(TweenMax.to(wave,1,{x:"2200"}));
But, I want my mc to start back from the starting of the stage, when it cross the stage. i.e. the part that cross the stage should again start from the 0 of x and follow......
View 4 Replies
Dec 22, 2004
Im trying to repeat a movieclip across y axis soo it takes Stage.height and divdes the height of movieclip and finds out how many times to duplicate movieclip soo it covers entier swf. Stage..here instance back is the movieclip to be repeated along y axis. and back_repeat is the variable that contains value of how many times the back movieclip should be repeated
Code:
back_repeat = Stage.height/back._height;
back_repeat = Math.round(back_repeat);
i=0;
while(i<back_repeat) {
[Code]...
View 1 Replies