ActionScript 2.0 :: Use A MC That Will Rotate In The Center Of The Stage?

Apr 15, 2005

I am curious abut two things... 1. Instead of a Bar at the bottom I wanna use a MC that will rotate in the center of the stage... With one half acting as a paddle, and the other side being a game over or life over side...

2. Also with the MC in the middle i want to use the arrays to make a pattern or whatnot *grid* around the middle move clip, so there is only one way to die and that is from the ball MC hittin ghte backside of the middle mc?

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Rotate Mc From Center

May 20, 2010

I am using the following script in AS3 in order to rotate an MC around its center:[code]Works great, only rather than a CLICK, I would like the mouse to cause the MC to rotate in response to the mouse's movement up and down the y-axis of the MC I want to rotate. How can I write a script so that the mouse location in relation to the y-axis of a specific MC will trigger something?

View 1 Replies

ActionScript 3.0 :: Rotate From Center In 3d?

Apr 24, 2010

How can i rotate in 3d form the center?[code]....

View 1 Replies

ActionScript 2.0 :: CS3 Center And Rotate With PrintJob

Jul 1, 2008

I am looking to add a print job to my flash presentation. I have the basic code and can get it to print, but I have to manually set the printer to print landscape and the image is in the top left corner. If it was just for me it wouldn't be a big deal, but a lot of our presentations go to lawyers and judges so we would like to streamline their results as much as possible. Is there a way to tell it to rotate 90 degrees and center itself on the page. Below is the code I am using. I tried to use some parameters to set it for landscape, but they don't seem to work. My doc size is 720x540.[code]

View 4 Replies

Rotate Object Around Center Axis?

Oct 4, 2010

I'm using CS3 with ActionScript 3.0. What I want is simple, and I've done some searching but nothing that can get me the right results.I'm going to post a link that does exactly what I want: http:[url]......This rotates the circular object around a center point in a way that you can distort the object yet is still remains turning in a circular motion. A simple motion tween rotating the image will only work if the object is perfectly round, so distorting the object to make it more straight or curved won't work with a simple tween. I want to do exactly what is happening here (with my own object), is there some AS3 behind the scenes here making this turn on a center point?

View 3 Replies

ActionScript 2.0 :: Rotate A Movieclip From Its Center?

Dec 3, 2009

I want to rotate a movieclip depending upon the mouse movement. Rotation is working also but I want to rotate it from the center of the movieclip. The registration point of the movieclip is top - left

Code:
var radiance:Number = 180/Math.PI;
_root.onEnterFrame = function()
{

[code]...

View 8 Replies

ActionScript 2.0 :: Rotate MovieClip About It's Center?

Oct 12, 2006

I need to rotate my movieClip about it's center. I would like to do this with a small button attached to the corner of the movieClip.

View 2 Replies

ActionScript 2.0 :: Rotate A Movieclip From Its Center

Dec 3, 2009

I want to rotate a movieclip depending upon the mouse movement. Rotation is working also but I want to rotate it from the center of the movieclip. The registration point of the movieclip is top - left

[Code].....

View 10 Replies

Professional :: Rotate A Object Around Center Axis?

Oct 4, 2010

I'm using CS3 with ActionScript 3.0.  What I want is simple, and I've done some searching but nothing that can get me the right results.  I'm going to post a link that does exactly what I want:This rotates the circular object around a center point in a way that you can distort the object yet is still remains turning in a circular motion  A simple motion tween rotating the image will only work if the object is perfectly round, so distorting the object to make it more straight or curved won't work with a simple tween.  I want to do exactly what is happening here (with my own object), is there some AS3 behind the scenes here making this turn on a center point??

View 5 Replies

Flex :: Rotate A Centered Container From It's Center

Nov 23, 2009

I am trying to rotate a centered container from it's center. The problem with this code is when I use the rotatePicture method, it doesn't rotate from the center, instead it rotates from the box's top-left corner. Here's the code...

[Code]....

View 3 Replies

Flex :: Math - Rotate Point From A Given Center?

Jan 30, 2012

I'm trying to rotate a point in my Canvas from a given point (center). In my MouseDown handler, I save the point where user click (oldPos), and in my MouseMove handler, I'm doing this:

private function onMouseMove(event:MouseEvent):void
{
// Where the user pointer right now

[code]......

View 1 Replies

ActionScript 3.0 :: Flash Rotate Around Center Of Object?

Aug 9, 2010

I am making a small tool for making simple T-Shirts designs. Everything is perfect except that I don't manage to rotate an item the way I want. I am makeing everything from ActionScript. When I load an image on the design it is added to the stage. I have an object called "ImageView" that extends MovieClip. It has some properties and some methods (ex kill() that removes the object and all associated listeners). In this object I also add the image that is loaded from a location. When I click on the item another object "Transformer" is added on the stage. It surrounds the ImageView and adds some controls for rotating and scaling the image.

My problem is when I rotate the ImageView. It rotate according to (0,0) (obviously). What I want is to be able to rotate it according to the center of the ImageView. A solution is to set the picture inside the ImageView in such a way that (0,0) is the center of the picture. But I try to avoid this since it will cause some problems (that will requiere more coding) at "TextView" (a class that has text instead of an image).

View 3 Replies

ActionScript 3.0 :: Rotate Object Around Center Axis?

Oct 4, 2010

using CS3 with ActionScript 3.0. What I want is simple, and I've done some searching but nothing that can get me the right results. I'm going to post a link that does exactly what I want:This rotates the circular object around a center point in a way that you can distort the object yet is still remains turning in a circular motion. A simple motion tween rotating the image will only work if the object is perfectly round, so distorting the object to make it more straight or curved won't work with a simple tween. I want to do exactly what is happening here (with my own object), is there some AS3 behind the scenes here making this turn on a center point?

View 3 Replies

ActionScript 3.0 :: Flash - Center The Rotate Points?

Mar 15, 2011

Im working on a racegame Actionscript 3. When the car is moving I want it to rotate the wheels. The problem is, is that I have 2 movie clips in 1 movieclip (front wheel and backwheel). Is there a way to code 2 center rotate points?

View 1 Replies

ActionScript 3.0 :: Press And Drag Movieclip To Rotate It Around It's Center

Oct 23, 2010

I have a round movieclip ( like a ring or clock ) and i want to press and drag it to rotate it around it's center ( AS3 ). I tried hundreds of ways but none of them works perfectly. I think i miss something in trigonometry and flash's rotation concept.

View 8 Replies

ActionScript 2.0 :: Change Rotate Center Object To Counterclockwise

Aug 16, 2010

I'm not the swiftest when it comes to math, but usually I can figure out through trial & error how to modify AS. For the life of me I can not figure out where this AS gets it clockwise rotation, so that I can change it to counterclockwise.

Code:
onClipEvent(load){
this.rotation_speed = 2;
function origin(){

[Code].....

View 3 Replies

ActionScript 3.0 :: Rotate Dynamically Added Movieclip From Origin (0,0) And Not Center?

Jun 10, 2010

I've got this simple code here:

this["recipe"+i] = new recipelistname();
this["recipe"+i].buttonMode = true;
this["recipe"+i].recipeid = i;

[Code]....
 
The problem is that the movieclip rotates around the center. The textfield inside the movieclip is starting at 0,0. But it still rotates around the center, how can I make it rotate at 0,0?

View 5 Replies

Actionscript :: Make A MovieClip Rotate Around It's Center Point To The Left Or Right?

Jun 27, 2011

I need to make a MovieClip rotate around it's center point to the left or right depending on mouse drag. I got some basic semblance of what i want going, but it's pretty hackish. Normally i calculate the angle and such but i only really need to use the distance the mouse travels and apply it to the movieclip and for flavor add some nice easing when you let go.

public function Main()
{
var wereld:MainScreen = new MainScreen();
addChild( wereld );

[Code]....

View 1 Replies

ActionScript 2.0 :: Change The Focus Of An Object So It Would Rotate Around The Center Of The Screen?

Dec 22, 2003

What code would I use to change the focus of an object so it would rotate around the center of the screen like for a car game with a scrolling ground that moved based on key presses?

View 1 Replies

ActionScript 3.0 :: Change Registration Point Dynamically / Rotate Any DisplayObject By It's Center?

Jun 15, 2009

The Rotations3DUtility is writed by myselft to make any DisplayObject rotate by its horizontal center, but the effect isn't perfect.[code]...

View 2 Replies

Flex :: Rotate MXML Component Round Its Center Like A Wheel Respectfully To Mouse?

Jun 16, 2010

So I have that panel or any other mxml component. I want somehow to rotate it around like a wheel of a car with which you drive it... loke a Racing wheel... sow like when mousebutton is down it captures pont of component... when you move mouse component rotates (not moves) according to new mouse position... How to rotate MXML component round its center like a wheel respectfully to mouse?

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

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 :: Rotate The Frames When The Movie Is On Stage?

Nov 1, 2009

I am just getting back into AS after about 4 years so bear with me. I have a movie that I show and remove as needed on my stage. The movie just shows leader board details and consists of 2 frames of content. I simply want to rotate the frames when the movie is on stage. This is what I have inside my move on frame 1....

stop();
var myLearderDelay:Timer = new Timer(5000);
myLearderDelay.addEventListener(TimerEvent.TIMER, showNext);
myLearderDelay.reset();

[Code]....

The third frame is just a catch from so it knows to loop back to frame one. I am wondering if there is a better way to loop these frames and have a delay on each one.

View 2 Replies

ActionScript 2.0 :: Object Rotate With Mouse On Stage

Apr 29, 2003

I want a ship or something in the center of the stage and to be able to click and the thing will shoot at the mouse. I know how to get it to shoot at the angle. I just don't know how to get the rotation with the mouse. I can do it with keys but not with the mouse. What I need object rotates pointing to mouse...

View 2 Replies

ActionScript 2.0 :: Realistic Drag + Rotate MC Around The Stage?

Jun 29, 2007

Been working on this for days and can't quite get it. Place a standard playing card or something similar on your desk in front of you. Lightly press your finger onto a random point on that card and drag it around your desk. See how it rotates towards the direction you are moving and such? I want to simulate that behavior.

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

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