ActionScript 2.0 :: Moving The X Axis Of A Movieclip?

Dec 7, 2003

how to move the x axis of a movieclip.

I am almost finished with a site and I have five main buttons at the top- Home - About - Services - Portfolio - Contact. Then I have placed a movieclip in the center of the stage with an image inside that has a width of 3740. This leaves 747 for each section. I need it to move over 747 for each section plus or minus and I know that from Home to Contact it will have to move 2992 but I think I can figure all that out as soon as I just figure out how to get it to move and set a speed.

View 2 Replies


Similar Posts:


Moving A MC X Axis On Button Down

Feb 15, 2010

I am getting the following error when trying to move a Move Clip on it's x axis by a value of 5.:TypeError: Error #1010: A term is undefined and has no properties.at flashmovie_fla::MainTimeline/mouseDownHandler()[code]

View 1 Replies

ActionScript 2.0 :: Moving Only In X Axis?

Feb 11, 2003

just working on making my footer playable.got the ship shooting and moving ok, though i would like the ship to only move in the x axes. what do i have to add to this code used to replace the mouse and move the ship_mc.

Code:

onClipEvent (load) {
this._visible = 0;
Mouse.hide();[code]....

View 8 Replies

ActionScript 3.0 :: Moving An Object Up And Down The Y Axis?

Apr 21, 2011

i'm trying to use actionscript so i can make an object move up and down the Y axis by inputing numbers into a textbox. However at the moment my object starts in the centre and then when i enter a number it only goes down, and im not too sure how i can use negative numbers to make it travel up the y axis. I was thinking of using the numbers -10 - 10 so -10 would go down and 10 go up. Here is my code

Actionscript Code:
// EXAMPLE WHERE TEXTBOX USED TO POSITION A BALL ON THE STAGEpackage {  import flash.display.Sprite;  import flash.display.Stage;  import flash.text.*; 

[code]......

View 2 Replies

ActionScript 3.0 :: Moving Sprites On The X-axis?

May 19, 2009

for ease, I am using tweener to move the objects. I have randomly generated a load of Sprites, inside a container, along the (x,y,z) axis.

I want to scroll the objects along the x-axis when I move the mouse left and right.

Code:
function Scroll():void
{
cont = new Sprite();

[Code].....

View 2 Replies

ActionScript 2.0 :: Car Moving With Mouse On X Axis?

Apr 16, 2011

I would like to make a similar effect with car movement found on that site:

[URL]

i assume that there will be something to do with "_x = _x+_xmouse" but how do i define the boundries and what about the wheel movement? Or maybe it would be better to do this as a MC and if x of the mouse is less than x of MC then prevFrame, if its more then nextFrame ? Have no idea how to put it all together

View 3 Replies

ActionScript 3.0 :: Moving A Sprite In Both Directions Of X-axis?

Jul 27, 2009

am trying to make a game whre i want the sprite to move from positive x-axis to negetive x-axis for 30 seconds and after dat it has to down along y-axis one step.

View 1 Replies

ActionScript 2.0 :: Moving Graphic X Axis Only Threw Mouse Move Code Check?

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

ActionScript 1/2 :: Multiple Draggable Movieclip Within The X And Y Axis Of Another Movieclip

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

ActionScript 2.0 :: Creating Bubbles Using The Snow 3.0 - Snow Moving Downward On The Y Axis?

May 15, 2007

I created bubbles using the snow 3.0 tutorial from here at kirupa. I slightly altered the code so it would be for bubbles on a canvas of 800x500.The problem with the tutorial is that it is for snow moving downward on the y axis. for bubbles in the water, I need them going upward.which part of the code I need to alter so the bubbles will move up and not down? Also, I need the life of the bubble to last the length of the canvas.

Code:
init = function () {
width = 800;
// pixels[code]........

View 13 Replies

ActionScript 1/2 :: Draggable Movieclip Within The X And Y Axis Of Another Movieclip?

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

ActionScript 3.0 :: Construct Coordinates With Distance In Meters On The X-axis And Time In Seconds On The Y-axis

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

ActionScript 2.0 :: Make An Object Move Along Y Axis Once It Has Reached Its X Axis Target?

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

ActionScript 3.0 :: Tweens Objects Return To Their Original Position - Start Jumping Between Y Axis 200 And Y Axis 83?

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

ActionScript 2.0 :: Drag Movieclip On Y-axis

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

ActionScript 3.0 :: Repeat MovieClip Along X Axis

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

ActionScript 2.0 :: Repeat A Movieclip Across Y Axis?

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

Flex :: Stacked Bar Chart With Date As X-axis And Names As Y-axis?

Apr 13, 2012

I'm making a chart where the x-axis needs to have dates and y-axis names. The lenght of the bar is longer when the date is later. But I want to stack multiple bars on eachother. for example This is the code I have so far

<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;

[code].....

View 1 Replies

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

ActionScript 2.0 :: Making Movieclip Look At Cursor On The X Axis

Jan 15, 2010

I have been trying in vain to make my movieclip look at my cursor on the X axis. The problem I have is that, when it's negative scale. it's keeps looping the 2 directions.

[Code]....

View 0 Replies

ActionScript 2.0 :: [Flash8] Scaling A Movieclip From 100%-70%-100% Using The X-axis

Aug 22, 2007

I am building a flash piece in which I need an object to move across the stage from right to left and scale from 100% just off the right side of the stage, to 70% in the middle of the stage and then 100% again just off the left side of the stage. Giving the illusion that it is moving in a circular pattern around the viewer. My goal is to get the scaling to be relative to the MC's x position on the stage. Moving it across the stage is the easy part, and I can scale the MC from 100% on the right to 0% on the left using an onEnterFrame function containing:

MC._xscale = MC._yscale = Math.round((MC._x/Stage.width)*100);

but I can't seem to figure the 100-70-100 deal out. I thought there might be a math function like sin, cos or tan that would really help out, but I can't seem to find anything out there

View 3 Replies

ActionScript 3.0 :: Draggable Movieclip With Loop In Y-axis?

Sep 17, 2009

For the last couple of days I've been trying to find an example of a draggable movieclip (with mouse) in Y-axis which also can loop. This movieclip will load several different dynamic SWF-files from a XML file, but they are all the same width and height.I want this movieclip draggable in Y-axis only, and it should loop when you reach the end. But I can't figure it out tbh.What I want to achieve is similar to this: But in a vertical direction and when you grab something all 3 images that are visible should follow the mouse movement.Here is a code that I've written, you can drag the "container"-movieclip, but I can't figure out how to loop it and everytime I press and drag it again, the movieclip pops back to Y:0 at the mouse-pointer, hard to explain

import caurina.transitions.*;
import flash.display.Sprite;
import flash.events.Event;

[code].....

View 2 Replies

Actionscript 3 :: Rotate Movieclip On Different Axis On Mouse Position?

Mar 27, 2011

I am looking for direction to this old UFC effect - [URL] that appears on the main page. It is movieclips rotating on different axis based on the mouse position. So far I have found this script:

stage.addEventListener(MouseEvent.MOUSE_MOVE,EnterFrame);
function EnterFrame(e:Event)
{
mc.rotation = (180*Math.atan2(mouseY-mc.y,mouseX-mc.x))/Math.PI + 90;
}

But this only rotates on x and y. What's a way to approach this effect?

View 1 Replies

ActionScript 2.0 :: MovieClip Movement - Image Panning On X And Y Axis

Nov 6, 2006

I've mastered the way of image panning on an x asis for menus and so forth, but I am trying to get it working with an x and y asis. I mean like the main navigation in this example [URL].

View 4 Replies

ActionScript 3.0 :: Custom Class Registration - Rotating At 0 - 0 Axis And Not At The Centre Of The MovieClip

Apr 3, 2009

I posted a question regarding how to make a ladybug move around the screen and I managed to make a class that loaded a ladybug png then using a timer moves the bug around the screen...
but I have a huge problem...this has been bugging me all day and cannot find a solution...
The ladybug moves around the screen but rotates towards the moving direction before moving. The problem is that the ladybug is rotating at 0,0 axis and not at the centre of the movieClip. Is there a way to offset the registration point so that the ladybug rotates centred?

[Code]...

View 1 Replies

Flex :: Align Vertical Axis Zero For Multiple Vertical Axis Chart?

Mar 22, 2011

Based on this Adobe multiple axis chart example: [URL]

Then I changed some data values to negative and my axis became not aligned anymore.

how to align vertical axis? Is this another Adobe bug or there is some property that aligns axis?

<?xml version="1.0" encoding="utf-8"?>
<s:Application
minHeight="600"

[Code]...

View 1 Replies

Moving From One MovieClip To Another?

Mar 7, 2009

I have a main MovieClip in which I have several frame labels, each will eventually have different MovieClips associated with them. First time through I want to play an "intro" MovieClip, which I have placed on the stage at the begining of the main timeline, then at the end of the "intro" Clip, go to the first frame label and play that MovieClip.

The way I was going about it was placing this code in the last frame of the "intro" MovieClip:

Code:

MovieClip(parent).screen_mc.gotoAndPlay("home");

'screen_mc' is the instance name of the Main MovieClip.

[URL]

View 3 Replies

ActionScript 2.0 :: Making A MovieClip Move Side To Side Along The Horizontal Axis?

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

ActionScript 2.0 :: Movieclip To Move Along The X-axis To A Certain Point And Then Back To The Starting Point Again?

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

[F8] Moving Movieclip With A Mouseclick?

Nov 26, 2008

Im currently making a game that has one of those old-skool Fallout maps (a world map where you click somewhere and the "you" marker moves there) that im trying to replicate.I already have the scripts ready for map interaction (using onhit here). But i was wondering if someone could help me with a script that works this way:

1. I have a movieclip (the character)

2. When i click somewhere on the map i want this movieclip to move there. Not instantly but moving over the screen to that point where you clicked.

3. I also want there to be passages that when the movieclip hit that movieclip (named hit for example) it stops dead and doesn't move (will be used on the map for mountains and such) and the player has to click somewhere else to move it that path (im assuming this will be something like onhit: hit - speed=0 something but im not a good scripter and it would had to be worked into the script.

4. ok this one is kinda optional but would be great! If it's possible to have it worked in the script that when the clip doesn't move (and is stationary on the map) the movieclip stays on frame 1 but when the movieclip is in motion (and moving across the screen) the movieclip is on frame 2 (and reverts to frame 1 when it's not moving anymore and so no)

View 15 Replies







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