ActionScript 2.0 :: Make Clip Go To The Center Of The Stage And Stop?

Jan 12, 2006

ahoy there me hearties

Ive got a bit of a dilemma...

new Tween(clip,"_x",Bounce.easeInOut,clip._x,Stage.wid th,6,false);
new Tween(clip,"_x",Bounce.easeInOut,clip._x,Stage.hei ght,7,false);

what would be the correct way to write this to make clip go to the center of the stage and stop? At the moment it takes off to the left, never to be seen again..

View 2 Replies


Similar Posts:


ActionScript 3.0 :: If Statement - Make The Clip Stop When It Reaches A Certain X Value On Stage

Sep 20, 2008

I hope the following is pretty self explanatory. There is a ball movie clip "mc1" on stage. The addEventHandler simply starts a tween and the ball rolls from left to right until it's off the stage. I'm simply trying to make the clip stop when it reaches a certain x value on stage. I'm trying to teach myself simple techniques for the if statement and loops.

[Code]...

View 13 Replies

ActionScript 2.0 :: Stop Rotating Around A Common Center When The Mouse Leaves The Stage?

May 4, 2010

[URL]I'm using this code and I made some changes like freezing the rotation when the mouse is over the rotation entities. But I'd like to stop rotation when the mouse leaves the stage. How can I do?This is my code

Code:
import flash.filters.BlurFilter;
import mx.transitions.Tween;
import mx.transitions.easing.*;

[code]....

View 2 Replies

ActionScript 2.0 :: Center A Movie Clip On 100% Stage?

Jan 27, 2006

How i can get a Movieclip centered on a 100% Stage?Stage.align = T; doesnt work :/

and this also not works :/
mc._x = (Stage.width/2)-(mc._width/2);
mc._y = (Stage.height/2)-(mc._height/2);

View 2 Replies

ActionScript 1/2 :: Movie Clip In Center Stage Even Fullscreen?

Mar 2, 2012

how do I get a movie clip in the center of the stage, even if it moves to fullscreen

View 3 Replies

ActionScript 2.0 :: Center A Movie Clip Within Two Other Clips To The Stage?

Jul 30, 2007

I'll start off by saying I'm using Flash 8, Actionscript 2.0, and exporting as FlashPlayer 6.I'm trying to do this long landscape with a movie clip labeled, "mainMovie", let's say it's approximately 3600 x 600, while the stage/document dimensions are 800 x 600 .I have script on it so that moving the cursor to the left or right edge of the stage, the entire movie clip shifts left or right and through the rest of the landscape, similar to the 360 vr tours you see for some real estate sites online.On the main stage, I have that movie clip called, "mainMovie". Inside "mainMovie", is another clip called, "singleStrip", and inside that clip, I have other smaller movie clips through the landscape which are labeled and consist of random stuff, like shapes and items and stuff.

Everything works fine. The extra step that I am attempting is that I want the user to be able to scroll through the clip, "click" on an item, and then that item zooms into the front center stage and plays a small animation about that item. These items that are found throughout the landscape are movie clips themselves with script on them to be recognized as buttons.My problem with that is even though the center of my stage would be x=400, y=300, since my mainMovie on the stage scrolls from left to right, when I put in code to tween the item to a center position, that position is only set to the inside of the movie clip and not the center of the stage. I need to center a movie clip within two other clips to the stage.An example of the path of any of those items would be sort of like,

[code]...

That didn't work. It shifted it to a different position, not being the center of the stage.At another point, I tried to fake it out, placing a movie clip of a red ball on the main timeline in the center of the stage, and changed my code to:

[code]...

This didn't work, either.I do have other code that affects the motion scroll of the mainMovie from left to right, but I don't think this is the problem, I could be wrong.

View 2 Replies

ActionScript 2.0 :: Center A Dynamically Generated Movie Clip On Stage?

Feb 4, 2009

I have created an empty movie clip in the root, I load dynamically some jpg to the empty movie clip, but now I want to center it and I can't I have this code, it centers the movie clip but on the registration point of 0,0 not in the middle of the movie clip so the movie clip will show up nice and centered.

ActionScript Code:
var stageL:Object = new Object ();
stageL.onResize = function () {

[code]....

View 9 Replies

ActionScript 3.0 :: Make A Map To Zoom Around The Center Of The Stage?

Jan 21, 2009

up/down/right/left) except for zooming around the center of thestage. Let me explain, the user can drag the map in any directionany number of times but whenever they zoom in/out whichever pointof the map is in the center of the viewable area should always stayin the center.So for example I have several zones in my map, like Zone 1,Zone 2, Zone 3, etc. Let's say the user wanted to examine Zone 1more closely so they move the map in such a way that Zone1 nowappears in the center of the viewable area. I want when they zoomin/out Zone 1 to always remain in the center.

So I have the Map as a movie clip symbol and as a buttonsymbol. In Scene 1 of my Flash document I've inserted the Map movieclip and inside of the movie clip I have the Map button. In Frame 1of the layer where my map is I have the code for moving and zoomingin/out. Here is what it looks like below.

View 1 Replies

ActionScript 2.0 :: Make A Center A Mc Automatically On The Stage?

Oct 21, 2004

How do a make a center a mc automatically on the stage with aS. The script should detect what the stage size is and move the mc to the middle.

Im making smartclip-preloader and want to be as productive as possible later on.

View 4 Replies

ActionScript 2.0 :: Make A Movieclip Push Out From The Center Of The Stage?

Oct 16, 2008

I'm trying to make a movieclip push out from the center of the stage, but I'm having a problem with the math.I made an function, but it pushes out in a diamond shape.

Code:
function newCords(newX:Number, newY:Number, distance){
var centerX = Stage.width/2;
var centerY = Stage.height/2;[code].....

View 7 Replies

ActionScript 3.0 :: Make Image Rotator Align To The Center Of Stage

May 8, 2011

I bought a file, its an image rotator and it has a following code. I was wondering how can I make this image rotator align to the center of my stage.

[Code]....

View 1 Replies

ActionScript 3.0 :: Make Drag And Drop And Catch Page Center To Stage?

Feb 13, 2011

want to make drag and drop and catch page center to stage

View 2 Replies

ActionScript 3.0 :: Can't Stop Clip Dragging When Cursor Goes Off Stage

Aug 28, 2010

I have a movieclip I'm dragging and dropping. When I drag the clip outside of the stage, it gets stuck in drag mode and when I bring the cursor back onto the stage it suddenly snaps back onto the cursors position and it continues to drag (basically screwing up my drag and drop sequence). What I'd like is for the clip to stop dragging and snap back to its original X and Y position whenever you drag it outside the SWFs stage. I tried to achieve this by adding a listener to the stage to listen for a MOUSE_UP event when the drag begins. But its not working and I keep getting errors.[code]
Which I don't understand because dropClip isn't a property its a function. If anyone can explain how I need to modify my code to make the clip stop dragging or if I can constrain the drag so you can't drag it outside the stage in the first place that could perhaps work as well.

View 2 Replies

ActionScript 2.0 :: Make A Movie Clip Slow Down To A Stop?

Apr 12, 2010

I am trying to duplicate this effect here [URL]

In particular how you hover your mouse over a section and a group of images slide left or right, but the move quickly to begin with and then slow down....

This is my movie here [URL]

I have the button areas working correctly..I just want them to slow down when its time to stop?

View 3 Replies

ActionScript 2.0 :: Make The Movie Clip Stop On Rollover?

Jun 26, 2007

Basically I have a flash swf file (main.fla/main.swf) with 4 different movie clips.I figured out how to make the movie clip stop on rollover but now I am stuck on trying to load some xml content in my flash swf file.I have loaded xml in flash before but for some reason I cannot figure this one out. I have included my flash source file for anyone that can help.You can download it here:

[url]

Also Included is a file called "main-1-visual.gif" in a the folder called "What it should look like". I numbered the xml variables that need to be loaded:

1. The logo at the top
2. The title
3. The subtitle
4. The content text
5. Another title
6. Related links (This needs to link to specific URL links)

What I am trying to accomplish is this:

When you rollover one of the molecules (balls) that specific movie clip pauses (This works fines right now). BUT I also need to have a xml file specific to that molecule (ball) to load on the right side (see image "main-1-visual.gif") in it's appropriate movie clip. I also need the loaded xml to stay active until you rollover a different molecule (ball).

View 1 Replies

ActionScript 3.0 :: Make A Movie Clip To Stop And Move To Another One?

Jun 30, 2009

I have a movie clip called Lion Beginning_mc, inside of it I have 3 Key Frames and Inside each and one of them I have different shapes.
For example:

Key Frame number 01 - Dog
Key Frame number 02 - Cat
Key Frame number 03 - Mouse

I want to move this movie clip "Lion Beginning_mc" form Key frame number 1 to Key frame number 20.I want the Dog,Cat and a mouse to change between each other only once while moving from Key Frame number 1 to 20.And then when the movie clip "Lion Beginning_mc" reaches his goal another movie clip or a frame (with a shape) will start.

View 1 Replies

Professional :: Make A Loaded.swf Stop Looping Inside A Movie Clip?

Oct 20, 2010

I have a .swf that loads into a movie clip in a Flash website. The .swf has all necessary stops to play once and stop once loaded. When tested outside of the movie clip, it does what it should, but once loaded, it loops forever and the speed is faster. How do I make this stop looping?  (This only happenes to .swf that were made in CS4, doesn't happen with older .swfs that were made in Macromedia)

View 10 Replies

Make Movie Clip Play On The Over Stage As A Button?

Dec 23, 2009

I have a very simple fla i built, all i need is the hover "over" stage to play this tween. On the keyframe I made it a symbol, movie clip. In there all the tweens are set exactly. It seems if you wanted motion on a stage,you would just put that clip on the over stage. I uploaded the fla file: [URL]

View 6 Replies

ActionScript 2.0 :: Make Pixellation On Clip Disposed To The Stage?

Jun 4, 2007

make pixellation on my clip disposed to the stage. I'm looking for pratice concept how to gat it.

View 2 Replies

ActionScript 2.0 :: Make Movie Clip Same Width And Height Of Stage Using It?

Jul 17, 2003

How can i make a movie clip the same width and height of the stage using actionscript, when the width of the movie isnt known?

View 12 Replies

AS3 :: Draw A Line From The Center Of The Stage Out And Increment Around The Stage?

Jan 31, 2010

I am trying to have flash draw a line from the center of the stage out and increment around the stage. Not sure what math I would use to do this though. So far I have the line going out to a certain point but not sure how to change that point so that it circles around whatever the dimensions of my stage would be.

So far I have this:

var linetox=0;
var linetoy=0;
var _stage=this;[code]...

which obviously moves the destination ending of the line lower and lower, just trying to get it to draw around the screen (like a clock)

View 1 Replies

Professional :: Make A Movie Clip Go Back To The Main Stage Once It Is Clicked

Mar 31, 2011

How do i make a movie clip go back to the main stage once it is clicked.. it has a roll in and out which is inside the movie clip.. i have a door and i want it so when you click the door it goes to another key frame on the main stage

View 1 Replies

Actionscript 2.0 :: Stage.width - Make A Minimum Width And Stop Resize?

May 27, 2009

is there a way to make a minimum width and stop resize? I have a menu I am building that is locked to the bottom of the browser and 3 buttons on the left and a movieClip on the right. When you resize the browser window - currently - you can make the button on the right sink under the three on the left.

[Code]..

View 6 Replies

IDE :: Movieclip - Spaceship Will Fly Across The Screen And Then Stop In The Center

Jan 30, 2009

stop a movie clip..... here is my code:

ship_mc.onEnterFrame = function() {
ship_mc._x += 15;
}

What I need is this clip to move until x = 151, then stop. My spaceship will fly across the screen and then stop in the center...how do I make it happen?

View 1 Replies

CS4: Can't Center The Stage

Apr 20, 2009

I'm having trouble centering the stage on screen, its locked to the top left of my window and nothing will make it move. I remember accidentally pressing something on the keyboard just before this happened, but don't know how to get my stage center again. The hand tool does nothing.

Oh and its only happened in this fla, other fla's are fine.

View 3 Replies

ActionScript 3.0 :: Center A MC On Stage?

Jul 11, 2010

I need to center a MovieClip, and i know how to do this, but the problem is this MC has content in it of different sizes on each frame. So when it goes to say, frame 2, the MC is no longer in the center. This is what i use:

ActionScript Code:
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, resizeHandler);

[code]...

How can that be changed to center this MC when the size of it changes? I would guess the code would need to know when the MC's size has been changed and re-align...

View 0 Replies

ActionScript 3.0 :: Center MC On Stage?

Feb 9, 2009

I have a MC on stage that I dynamically add and remove elements to and from. Since its dimensions vary subject to those changes I's like to "pin-point" it to the center of my (800x600) stage. I thought it would be agood idea to get the dimensions of the MC (it's called container) and set its x and y accordingly, but somehow it won't work as I got the feeling the registration is somewhere else (and I don't get the logic behind where it is).

The code I am using at the moment is the following

Code:
var dimensions:Rectangle = container.getBounds(stage);
container.x = 400 - dimensions.width/2;
container.y = 300 - dimensions.height/2;

View 3 Replies

IDE :: Can't Center The Stage On Screen

Apr 20, 2009

I'm having trouble centering the stage on screen, its locked to the top left of my window and nothing will make it move. I remember accidentally pressing something on the keyboard just before this happened, but don't know how to get my stage center again. The hand tool does nothing. Oh and its only happened in this fla, other fla's are fine. See attached image for screenshot

View 1 Replies

Center Component In Movie Clip?

Feb 18, 2011

I'm try to build a photo gallery using the flash components SlideShowPro and ThumbGrid. I have put ThumbGrid inside a movie clip called thumbs_mc that slides in and out when you mouse over it to show or hide the thumbs. That part is working, but I would like to have the stage and thumbs_mc resize to the browser width with ThumbGrid centered inside thumbs_mc.

Resize and scaling the stage and movie clips is not a problem, but I can't figure out how to keep ThumbGrid centered inside the containing movie clip. ThumbGrid is a fixed width component, and the only way I can get it to work is to have the mc the same width as the component. Here's the part of the AS that I'm using to control the positioning now:

Code:
thumbs_mc.x = (sw/2) - (thumbs_mc.my_tg.width/2);
thumbs_mc.y = sh-25;

View 7 Replies

ActionScript 2.0 :: Zoom From Center Of Stage?

Jun 2, 2007

I have a big movieClip which the user can zoom by click on a 'zoom-in' button. Once zoomed the user can click on that movieclip and pan it. Now the center of that movieClip is displaced and no longer where it was before. However, if the user click on 'zoom-in' now again, the movieClip should zoom from the center of the stage and not from the movieClip's center.

To put it simply, I want a formula which will zoom a movieClip from the center of the stage and not from its registration point, no matter where the registration point is.

View 3 Replies







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