ActionScript 2.0 :: Making MovieClip Go In Reverse W/constantLoop?

Jan 25, 2008

I am building a site in flash that contains a number of cog movie clips. In this animation I have a lever that can shut off the cogs and make the cogs go forward and reverse. I seem to have the forward and stop functionality working, but I can't seem to get the cogs to go in reverse in a constant loop. They will only go in reverse until the beginning of the timeline. Below is the script I am using:

CODE TO STOP CLIP:

function stopClip() {
this.stop();
}
lever1_mc.onPress = function() {

[code].....

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Movieclip Reverse Playing - Mc Goes Reverse Until The Stop()

Jun 18, 2009

So I have this mc: this.slidingMenu it's a mc of a ring shaped menu, which turn around when 2 button get clicked. When the button on the right, mc goes forward until stop(), when the button on the left mc goes reverse until the stop(). In the first case i use gotoanplay, and everything goes fine. For the second I use prevFrame, like this:

[Code]....

View 3 Replies

ActionScript 3.0 :: Making A Sprite Reverse Direction?

Mar 21, 2012

This is a painfully simple concept and for some reason I can't get my head around it. The basic idea is I want a sprite to come down half way and then if it fails a random check, to reverse direction and move back towards the top.

Code:
private var _ReverseDirection:Boolean = (Math.random() > .5) ? true : false;
public var _Vel = 3;
public function main(){

[Code]....

So basically the the sprites created, a true/false boolean is made and the Loop function is started. As you can see though, as soon as the sprite starts moving backwards it fails the If statement and starts bouncing back and forth between passing and failing. I've toyed around with putting them in different functions, complex If statements, etc but it keeps coming back the conditions fluctuating back and forth.

View 2 Replies

ActionScript 3.0 :: Making The Main Stage Timeline Play In Reverse?

May 27, 2009

methood of telling the stage to continue playing in reverse, after a button is clicked, until it reaches a keyframe that will tell it to stop? I'm trying to make it so buttons will tell the stage to play a transition from beginning to end and then have it play in reverse when the "back" button is pressed. I'm currently searching online to find an answer but I haven't had any luck yet.

View 10 Replies

How To Reverse Movieclip In Slider.fla

Aug 16, 2009

I apologize for being a newbie. I have been trying to figure out how to reverse an EKG movieclip to go from right to left instead of the direction it is currently moving:

View 16 Replies

ActionScript 1/2 :: Play A Movieclip In Reverse?

Mar 11, 2009

I'm creating a movieclip that shows some photo samples with two arrows at the bottom. I want it so that if the user presses on the right arrow, the movie clip plays forward and goes toward the end to "shuffle" through the image samples. But I would also like them to be able to press on the left arrow and be able to play the movieclip backwards to "shuffle" back toward the beginning of the images.

The closest thing I can think of that would be similar to this would be the way you can shuffle through album images in iTunes.I just need to know the Actionscript 2.0 code to play the movieclip in reverse.

View 3 Replies

ActionScript 3.0 :: Can't Get Movieclip To Play In Reverse

Apr 18, 2011

I've got a movie clip which i want to affect with 2 buttons. On a mouse over, the right button makes the movie clip play, and tween to the right, and on mouse out, it stops. I want it to do the same thing but in reverse for the left button. Here's what i've got so far...

ActionScript Code:
/* Code to animate thumbnails RIGHT */
MC_ADNAV_RIGHT.addEventListener(MouseEvent.MOUSE_OVER, PlayThumbsRight);
function PlayThumbsRight(event:MouseEvent):void

[Code].....

View 4 Replies

ActionScript 3.0 :: Play And Reverse A Movieclip

Jan 7, 2010

I am trying to play and reverse a movieclip using the following script:

[Code]...

It works but just only one frame. Do I need to loop this function - if so how.

View 2 Replies

Activate MovieClip To Play Reverse In Timeline?

Nov 5, 2009

I need to have the ability to spin or rotate an object such as a globe. I have 2 rollover mc's that spin the globe but I am having trouble getting it to loop on the backwards spin. Right now I have it acivating the mc to play fowarding in its timeline then loop but what is the best way to get it to go in reverse. My .fla can be found here [URL].

View 1 Replies

ActionScript 2.0 :: Flash8 - Reverse The Frames In A MovieClip By Buttons

May 14, 2009

My inquiry is, if I have a MovieClip with an animation, and I need to play this MovieClip by button, I know I need to use this action // on (rollOver) // telltarget() // play()

but if I want to rollout before the animation reach the last frame, for example the frames are 90 and I decided to rollout in 50.

How I can make the frames go backward to frame 0 after I rollout of the button ??

For your information I have MC flash 8 professional.

View 3 Replies

ActionScript 2.0 :: One Button Play MovieClip Forward And Reverse?

Apr 21, 2010

I have a college project to hand in within 2 days. I'm making a website and what I want to achieve is a button that plays the movieclip (which is a piece of paper going onto the stage) and when you click it again it reverses that clip. I've tried loads of things and only got code that allows two buttons to reverse and go forward.

View 2 Replies

ActionScript 1/2 :: Remove Attached Movieclip In Reverse Order Of Placement?

Aug 21, 2009

Is it possible in AS2 to remove an attached movieclip instance in reverse order? I want to give the user the ability to click an erase button and remove the most recent instance of an attached movie. I have tried .swapDepths and getting inconsistent results. Here is what I have:

this.onMouseDown = function(){var drawdot:MovieClip;
drawdot = this.attachMovie("dot", "dot_mc", this.getNextHighestDepth(), {_x:_xmouse, _y:_ymouse});

[code].....

View 5 Replies

ActionScript 2.0 :: Making The Movieclip Loop?

Aug 31, 2010

I have got this example of drag and throw its working fine..But i need to add some more feature what code should i add to make this in loop and besides that i want this slide to scroll through numbered buttons..like in this example [URL]

View 11 Replies

ActionScript 3.0 :: Movieclip Making Itself Null?

Oct 4, 2009

I have a movieclip with a class attached to it, so obviously i can acces it with commands of the kind this.* What i want to do, is delete the movieclip after some time (it's a bullet from a tank and I want it to be gone after explosion). I can removeChild it, but the code "this = null" doesn't work.Is there any way to get it out of my memory? Because now my application slows down and in 5 minutes it's unplayable...

View 6 Replies

ActionScript 3.0 :: Making Movieclip X And Y Follow That Of Another

Jan 5, 2011

I'm making a game and have zombies spawning on a stage using math.random()

What I want to achieve is their health bars follow them above their heads, However they aren't spawning when I use:

ActionScript Code:
public function iceZombieSpawn(e:TimerEvent) {
iceZombie = new IceZombie(Math.random()*stage.stageWidth, -100); // Create new ice zombie at random x position (width, height, health, hitCount)

[Code].....

They do work when I specify a specific coordinate however won't get the desired result.

View 9 Replies

ActionScript 3.0 :: Making Grid With MovieClip?

May 29, 2009

I want to make a grid with movieClip. But I can't make no matter how much time I have used exploring and trying.I have 2 movieClips and button

1 - mc_main

2 - Row

Both movieClips are linked to classes. mc_main is on stage its a small dot.when I press button a new instance of Row should be attached to mc_main and should append. Below is code if anyone tell me how to attachieve this.

PHP Code:[code]....

View 1 Replies

IDE :: Movieclip Making It Stay On Hit Frame?

Aug 25, 2010

Im trying to make these movie clips stay on the hit state when the user clicks. Can someone help me out? This is what I have so far.

View 1 Replies

ActionScript 2.0 :: Making One Movieclip Control Another

Feb 11, 2004

I am probably just making a stupid mistake but can someone show me how to do the following... I have a moive clip on _root and another movieclip within several other movieclips. I want the moiveclilp that is in several other movieclips to be able to stop the movieclip on _root on a release trigger. I basically just want to know the proper AS for using one movieclip as a button that stops or plays another movieclip.

View 2 Replies

ActionScript 1/2 :: Making Cursor Avoid A MovieClip?

Apr 23, 2009

I'm looking to force the cursor to slow down/stop moving when it gets close to a MovieClip. Idealy you would be able to rollover the MovieClip when moving the cursor slowly but if the cursor is moving at some speed, it would be forced to stop at the edge of the MovieClip.

View 3 Replies

Actionscirpt :: Making A Drag And Drog Movieclip?

Nov 9, 2009

all i want to do is have a screen and items on the screen that the user can move around the sreen by clicking on it(drag) and left go when they lift their finger on the mouse (drop). oh and what do i write it too

View 2 Replies

ActionScript 3.0 :: Making LoadMovie In Empty MovieClip

Apr 17, 2011

I'm making a new as3 file, and there I made an animation, like an intro for my website, in a movie clip. But what I want is, when this animation or this movie clip ends, automatically it charges another swf with my website, without having to press any button. I read some tutorials on internet that I can make this, creating a new empty movie clip, and then writing some code, but it didn't work me.

View 5 Replies

Flash - Making Bitmap Copy Of MovieClip

Apr 19, 2011

I am developing a Paint Application is AS3. What I am trying is to basically mimick the MS Paint. I am using vector graphics to implement tools like pencil,line,curve and bitmap to implement bucket tool,spray and eraser. But I faced a problem. While its possible to draw bitmap over vector its not possible to draw vector over bitmap if every drawing is in the same layer.

So the idea that I have is to make it into two layers
Top layer where the vector drawing is done.
In the bottom layer layer after each vector drawing on MOUSE_UP a bitmap copy of the top layer is made and kept on the bottom layer. Keep the top layer fully transparent so that bottom layer is always visible.
Things like flood-fill(bucket tool), spray and eraser will be directly applied to bottom layer.
After each vector is drawn on MOUSE_UP the top layer will be cleared but everything will be visible because it has been re created in the bottom layer and the top layer is full transparent.

My questions are: Is there any flaw in my logic. How to make a bitmap copy of the movie clip on top. I tried but maybe I am stupid it does not work. The name of the MovieClips are topLayer_mc and bottomLayer_mc. What is need to have is to have a function to create a bitmap copy of topLayer_mc on every MOUSE_UP of pencil,line and add it to bottomLayer_mc. I mean create a bitmap copy of topLayer_mc on every MOUSE_UP of pencil, line and add it to bottomLayer_mc. A function will do.

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 3.0 :: Making Movieclip Instances Global?

Apr 28, 2010

Is this possible AS3? I've been searching everywhere for a way to make Movieclip Instances globally accessible and haven't had any luck.I know I can make variables global by making them public and static in the class constructor, but I can't find a resource for objects.

I hear this is typically bad form, but I have a portfolio site where the entire site and it's contents change scale and position for every thumbnail.If I could make things like the BG, border, header, footer etc. globally accessible, I could change them all with a one or two global methods.

View 6 Replies

ActionScript 3.0 :: Making A TLF Inside An Instance Of A MovieClip?

Oct 30, 2010

So, this is my thought-process:

First, I make an Array to hold all my Buttons. Then I make a loop and throw all the instances of the Buttons inside.

ActionScript Code:
var TextButtons: Array = new Array();  //my container for the buttons
for (var j:Number=0; j<6; j++){
var mb: menuButton = new menuButton();  //button created

[Code]....

Every works up to here and looks pretty sweet. Then things get tricky. I would like to be able to create Text, specifically tlf, as part of the instances of the Buttons, so that when I mouseOver the text is grows and shrinks proportionally with the Button. I'm stumped, and exhausted my knowledge of AS3. I tried to make a separate array with TLFTextFields, and things just got funky. I am using TLFTextField, because there is an option to make them read-only. Somehow I need to make them inside the Buttons.

View 0 Replies

ActionScript 3.0 :: Making Movieclip Change Colour?

Aug 1, 2011

i have a movie clip on the stage called block, which is just a grey cube and i copied it so there are multiple blocks. i have another movie clip called player and i want the block movie clip to change to a random colour when the player movie clip hits it, but i want it to do this to each block individually and for each block to be a different colour. how would i go about doing something like this?

View 6 Replies

ActionScript 2.0 :: Making MovieClip Fade Out On Stage?

Apr 13, 2006

I have on my stage different sub menues which Id like to have fade out when I press a certain button. Thought I could do with _alpha, but I only fades a certain procentage. Not all the way.

ActionScript Code:
on (press) {</p>
<p>_root.contact._alpha -= 5;</p>
<p> if (_root.contact._alpha<10) {</p>
<p> _root.contact._alpha = 0;</p>
<p> }}

Which I thought would work, but it only fades it 5% add a time. How do I make it fade completely?

View 5 Replies

ActionScript 2.0 :: Making Movieclip Alpha = 0 And Move?

May 26, 2003

I'm trying to make a movie clip move a small bit to the right and slowly (or quickly) dim until you can't see it. I've tried 2 different methods. The first was my original so that once you had the mouse in the original location of the movie, you just have to keep it there, you don't have to move the mouse with the clip. The 2nd was one i got after searching the forums. I've debugged out the for statement and tried just seeing if i could make a different movie's alpha change, and it didn't. So I believe the problem is either in the if (of the first) or onRollOver (of the 2nd).

[AS]onClipEvent(load){
xspot = _root._xmouse;
yspot = _root._ymouse;

[code]......

View 5 Replies

ActionScript 2.0 :: Making External Movieclip Loader?

Dec 13, 2006

How do I put a global loader into this code, so that it loads every movieclip before it shows, so that the user wont wonder why the sections is not showing upp until 20 seconds after the click.... ?

Code:
getSwf.loadMovie("Startsida.swf");
this.btnLunch.onRelease = btnLunchRelease;
this.btnMiddag.onRelease = btnMiddagRelease;

[Code]....

View 6 Replies

ActionScript 3.0 :: Flash Making A Movieclip Blink

Apr 22, 2012

I'm creating a game which has a healthbar. I want the health bar to blink couple of times when it goes over a certain amount or goes below a certain amount. How could I achieve this in AS3? I have a bar, which is a movie clip. Say it is called

[Code]...

View 2 Replies







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