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


Similar Posts:


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

ActionScript 3.0 :: Get Movieclip To Repeat On Mouse_over?

Jun 15, 2011

I am attempting to have a text sentence slide out from behind and to the right of a company name. The company name is a movie clip and the sentence is a movieclip within a movieclip.On a mouse_over the sentence scrolls out from the right of the company name and then on a mouse_out the sentence scrolls back to the left behind the compnay name. This is working perfectly.Here's the trouble: after the sentence has scrolled back behind the company name and when the mouse is placed over the company name again, the sentence will not scroll out from behind the company name. The movieclip performs perfectly only one time and it won't repeat itself. I would like it to work everytime the mouse is placed over or removed from the company name. Perhaps you know why this is happening. Here is the code I am using on the main timeline. The inner movieclip has its own timeline for the sentence. It has a 60 frame tween on it with a stop() command on the first and sixtieth frame.

import flash.events.Event;import flash.events.MouseEvent;
rizzoCorp_mc.addEventListener(MouseEvent.MOUSE_OVER, moverRizzoF);function[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 1/2 :: Repeat Same Tween With Different Random Number For MovieClip

Feb 22, 2011

for (i=0; i<humans; i++) {
ranDistX = Math.floor(Math.random()*(20-(-20+1)))+-20;
ranDistY = Math.floor(Math.random()*(20-(-20+1)))+-20;
var humansMoving = new Tween(_root["human"+i], "_x", Linear, _root["human"+i]._x, _root["human"+i]._x+ranDistX, 2, true);
[Code] ....

The tween works only once. I need it so when the tween is finished, it does the same tween (with a different random number (different position)), however after the first two tweens (x and y) have finished the movieclips just sit there.

View 3 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 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

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

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

Make MC Repeat Look Better?

Apr 1, 2010

I don't know much about flash.. I've created a MC with tomatoes falling.. when the MC repeats itself, which I want it to, looks too "rough". I am hoping to make the transition a little smoother.. I've read a little about mathematical random function, but it looks so complicated.Here is the flash: http:[url].....

View 4 Replies

Making Random Not Repeat?

Aug 25, 2009

Im wanting to change the variable numSound. At the moment it is a random number 1-5 which works well but I dont want repetition. Tried all sorts of things but no luck.

Code:
private function randRange(min:Number, max:Number):Number
{

[code].....

View 6 Replies

Repeat Only Some Frames Infinitely?

Mar 19, 2010

1. starts with 2 guns crossed centered

2. the shoot at the same time and start dragging towards the edges of the screen like this: <------ (center) ------>

3. fill the centerish area with smoke from the gunfire while the guns are moving away

4. as the smoke clears my name appears in the middle

5. then a few more frames of smoke coming out of the guns (i want this part to repeat, only this part though so theres just infinite smoke coming out)

now i'm still a bit fresh to flash. here's what i have down. i got my gun pics and the tilt up when fired and got them to drag away (motion tween). i also got my name to fade in from a frame in the middle to the end. i still don't know how to make the bang, or smoke (then make the smoke vanish), and then have the last few frames repeat.

View 1 Replies

ActionScript 3.0 :: Random Do Something Without Repeat

Mar 22, 2012

I've 3 movieclip on stage which is mc1,mc2,mc3 at first they are alpha=0 What I want is when i click on revealBtn, 1 of them will show up as alpha=1. But with my code below, sometimes I need to click about 5 times or more only can make all those mc show up.

[Code]..

View 1 Replies

ActionScript 3.0 :: Toggling Repeat On And Off?

Feb 26, 2010

I got some code to make a  video loop indefinitely with the nsvid4_loop function, but i want it t  be toggleable via a button I am trying to set up a function to do that (vid4loopwitch).. i'm getting stuck though on how exactly to incorporate the one nsvid4loop with its event listener into the function for repeating  it is probably pretty straightforward i'm just still learning my way around AS. check the code to see what i have so far.. i just need to know what i need to add  to the vid4loopswitch function to get it going. it is really hurtin my brain

var nsvid4:NetStream = new NetStream(nc);
nsvid4.client = this;
nsvid4.play("clips/video1.flv");

[code].....

View 4 Replies

Arrays :: Randomly Do Something Without Repeat?

Mar 22, 2012

I've 3 movieclip on stage which is mc1,mc2,mc3at first they are alpha=0What I want is when i click on revealBtn, 1 of them will show up as alpha=1.But with my code below, sometimes I need to click about 5 times or more only can make all those mc show up.Is there any solution for what I wanted? I've try splice but it's still not working well.

var mcArray:Array = [mc1,mc2,mc3];
for (var j:int = 0; j < mcArray.length; j++)
{

[code].....

View 2 Replies

ActionScript 3.0 :: Random Int Without Repeat

Jan 15, 2009

how i should go about making a function that returns a random int w/out repeating? i was thinking:

[Code]...

would this be sufficient? i'm tracing my output and sometimes i don't see anything. is this because it could take a while to iterate through w/out a repetition and that may cause the variable to be undefined during that call of the function?

View 9 Replies

ActionScript 2.0 :: How To Repeat The Tween

Aug 18, 2009

I designed image viewer and the main functionality of the code is written in an external class - AS file. The connection between the fla file and the external class work ok. In the fla file I added some movie clips as buttons and when I press them, the external pictures are loading successfully.

A) When the picture is loaded, I am using a tween , and the picture is moving inside the screen.For this I call inputfade() function from the external as.

B) When I choose another picture to be loaded, I want the current picture to move outside from the screen, and the new loaded picture to move inside (same as explained in A).For the current picture to move outside I used outputfade() function, and for new loaded picture to move inside I am using the same first function inputfade()

Here is the main code:
//moving inside
public function inputfade(){
var easeType = mx.transitions.easing.Bounce.easeOut;

[code]....

I have a problem with the part, when the picture is moving outside from the screen (when outputfade() is finished,) I can not add new coming tween. (- I can not call any new tween function).It seems that any code related to tween (exept yoyo)or other type of mc motion is blocked after after finishing the function outputfade(). I also add with some trace (�test�); after finishing the inputfade function and the trace work. Also interesting this.yoyo() function works as well after finishing outputfade, which is not same case with calling inputfade();

View 0 Replies







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