ActionScript 3.0 :: Dynamically Setting Transformation Point

Mar 7, 2009

I am creating an interface where a user can pick up "Polaroid" stle photos and shuffle them around a virtual desktop. I want to photo to shift it's transform point to match the point at which the user picked up the photo, to create a "swinging" effect as the photo is dragged.there was an AS2 workaround floating around, but I want to find the AS3 equivalent, and seem to be unable to find it in the Geom/Matrix package/classes.

View 3 Replies


Similar Posts:


Flash 9 :: Reset Transformation Point/Set Transformation Point?

Feb 8, 2008

When I right-click a symbol the options "set transformation point" and "reset transformation point" come up. They don't seem to do anything for me. I thought it would center them or something. This is not the case. I have the white transformation point in one corner in one keyframe and a different corner in another keyframe I click "reset transformation point" on both frames and they don't move.

View 3 Replies

ActionScript 2.0 :: Set Transformation Point In It?

Jul 10, 2009

How would I make this grow from right to left?[code]...

View 1 Replies

IDE :: Change Transformation Point With AS?

Aug 11, 2009

Is there any way to dynamically change the Transformation or registration point of a MC with AS3? I'm trying to dynamically create shadows behind clips that skew to follow the sun.

View 3 Replies

Professional :: Centering Registration And Transformation Point?

Mar 15, 2010

This is giving me such a headache.I have a movie clip and it has a centered registration point but the transformation point is in the top left corner. I want both to be in the center of the MC. I want a little circle with cross-hairs in t in the middle of my MC, if at all possible without moving my MC. But I cannot get that damn cross-hair to budge from the top left corner! When I go into the info window and change the X-Y values of the transformation point, the whole MC just moves to a new position. The infuriating things is, I've done it before but I just can't seem to work out what I did. Please don't tell me to drag the registration point in free transform mode. I can do that, but I cannot drag the transformation point in the same way.

View 9 Replies

ActionScript 3.0 :: Recalculate Point X / Y Value After Matrix Transformation

Jun 16, 2010

I am doing a matrix transformation on a Display Object. I got this function from another site, but basically it scales a display object around any point.
ActionScript Code:
public static function scaleAroundExternalPoint(m:Matrix, x:Number, y:Number, multiplier:Number):void{
m.translate(-x, -y);
m.scale(multiplier, multiplier);
m.translate(x, y);
}

But my problem is that I have to do multiple scales in a sequence and after scaling, the points defined in the XML no longer correspond. Let me first say that all the points being scaled around are located in an XML file. They are all relative to the display object's registration point (0,0) when it is normal, i.e. a scale of 1. Also, I have created a class that retains the target object's original Matrix so that the percentage you pass in is relative to the original scale instead of the scale after each call. But basically, with the scaleAroundExternalPoint function by itself, if I have an object that I scaled to twice it's size, the multiplier would be 2. but say I want it back to it's original size. The multiplier would NOT be 1 since that would just leave it at a scale of 2x. It would have to be .5. The important parts of the class are below.

ActionScript Code:
public function ZoomUIComponent(isKeyboardControlled:Boolean = false, disabledAlpha:Number = .25,
max:Number = 2, min:Number = .5, precision:uint = 2,
seconds:Number = 1, step:Number = .1):void{
this.disabledAlpha = disabledAlpha;
this.inControl = InteractiveObject(getChildByName("zoomIn"));
_isKeyboardControlled = isKeyboardControlled;
[Code] .....

It's retaining the original matrix and then calculating based on that EACH TIME. So how would I find the new X and Y values of the original points so that I can scale around them?

View 1 Replies

ActionScript 3.0 :: Set An Object's Transformation / Registration Point Not The IDE?

Jun 3, 2008

This is probably really trivial, but how do I set an object's ransformation/registration point in AS3, not the IDE?

View 12 Replies

ActionScript 2.0 :: FMX Rotate Symbol On Transformation Point

Nov 11, 2002

I have a triangular symbol that I want to rotate on a transformation point (the pointy tip). The effect is supposed to be like Hollywood searchlights panning around (see pic below). I've done basic rotations with actionscript before, but a transformation point wasn't involved. How is this done? Is the transformation point determined manually on the stage or with actionscript?

View 1 Replies

ActionScript 3.0 :: Sprite's Transformation Point And Insertion Origin

Aug 5, 2011

I am making application which will dynamically create sprites via action script and copy the sprite's image to a bitmapdata object via .draw() function. I would like to store the location of the sprite's transformation point and insertion origin (which would be set within the flash editor when the sprite is created/imported.) Is there a way to access the location of the transformation point and the insertion origin via ActionScript? I just want to read it, I do not need to change it.

View 5 Replies

ActionScript 3.0 :: Senocular Transformation Tool - Registration Point

Jun 27, 2010

I am fiddling around with Senocular's Transformation Tool classes, which allow for a MovieClip to be transformed (rotated, resized, skewed, etc) upon click. Just one tiny problem. I need for the MovieClip registration point to always be centered, so that when I do begin transforming in any way, it transforms from that centered registration point. Here is a picture - I need this done in As3 rather than simply creating a new MovieClip symbol and selecting the center for its registration point, as these pictures are loaded dynamically.

View 6 Replies

ActionScript 3.0 :: Setting The Registration Point?

Sep 25, 2007

How do you change the registration point of a TextField or MovieClip?Suppose you want to Twin a zoom in, I need it to happen from the middle, but I found no methods or properties that let you set it in the center.

View 9 Replies

ActionScript 2.0 :: Setting The Rotation Point?

Oct 26, 2004

i'm working on a flash game at the moment, and i would like to know if i am able to set the point that the movieclip rotates around using actionscript.

i don't want to do it by simply moving all of the contents of the movieclip closer or nearer. is there any other way of doing it? i couldn't find any simple functions for it. am i just going to have to use some complicated maths?

[edit] rotation point, aka, registration point.[/edit]

View 3 Replies

Actionscript 2.0 :: Setting Registration Point On EmptyMovieClip

Aug 24, 2008

when you create an empty movie clip, the registration point is 0,0 as default, I read you can change this by defining the X&Y but my movie Clip's position is defined by stage width and height.Is there another way to define the registration point~?

View 8 Replies

ActionScript 3.0 :: Setting 3d Anchor Point In Native 3D?

Feb 12, 2010

I've been playing around with Flash's native 3D in pure AS3 (in FlashDevelop, not the Flash IDE) and am having a heck of a time finding documentation on how to set the 3D "anchor point". (Perhaps it goes by a different name?)

Can anyone tell me the API, Class, or command(s) needed to move the anchor for a given Sprite or Stage?

View 2 Replies

Actionscript 3 :: Setting Anchor Point Of Sprite To Middle?

Mar 29, 2012

I am generating sprites programatically like this:

this.food = new Sprite();
this.food.graphics.beginFill(0xFFFFFF);
this.food.graphics.drawRect(0, 0, 10, 10);
this.food.filters = [new GlowFilter(0xFF6699, .80, 5, 5, 2, 2, false, false)];
this.food.graphics.endFill();

[Code]...

I basically want the food sprite to spin slowly about its center, not its x and y value which is the top left corner of the sprite. How can I make the anchor the center of the sprite?

View 2 Replies

ActionScript 2.0 :: Setting Reg Point - Creating A Border Around Images?

Oct 15, 2006

I have this code for creating a border around images. (partly from the huge thread on resizeBorder here at Kirupa). The image is loading into a containerMC and that I can align top left, but this code I dont know how to align? Anyone?

Code:
//creating the border:
this.createEmptyMovieClip('border', 3);
with (_root.border) {

[code]....

View 1 Replies

ActionScript 3.0 :: Setting Registration Point, And Moving Afterwords?

Mar 14, 2010

how to properly change a displayobject's registration point? changing the transform.matrix.ty / transform.matrix.tx, works, as long as the mc doesnt change x /y itself later. if it does, the matrix is reset.

View 2 Replies

ActionScript 3.0 :: Draw A Rectangle Or Circle Shape With Mouse And Scale By Setting The Point?

May 11, 2009

I want to make an editor like this site. [URL] If you browse this link you will find "Button. If you press this button you will navigate to a editor to design your layout. After draw a rectangle or circle or line you can resize that or can rotate that. When you finish if press the "you will back to the previous page where your desinged layout display. If you press the "" again then you will navigate the editor with the previously designed layout. I want to make a site like this. I want to use the flash cs4 to make the editor. Anybody knows how to draw a rectangle or circle shape with mouse and how to scale by setting the point and how to rotate by setting the rotation point also by using flash cs4 and as3?.

View 3 Replies

Flex :: Setting Skin Class On A Host Component But It Is Giving Null Point Exception?

Apr 19, 2011

ADOBE SYSTEMS INCORPORATED Copyright 2008 Adobe Systems Incorporated All Rights Reserved. NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms of the license agreement accompanying it.

[Code]...

View 1 Replies

ActionScript 3.0 :: Setting MC Name Dynamically?

Feb 5, 2009

I have created a function to load up my movies what I would like to do is two things

(i) change the ldr to a movieclip

(ii) add an extra parameter to add an instance name movieclip when I call the movieclip

loadMyImage('images/headers/logo.png', 80, 20, 'myheader' );

View 5 Replies

ActionScript 3.0 :: Setting Axis Dynamically?

Apr 28, 2010

I would like to set which axis is manipulated dynamically; or rather, I'd like to use a custom dynamic variable to set which proper variable to use.

Kind of like this: my_mc.x=55; or what i want to do is: my_mc.variableAxis=55;

View 2 Replies

Flex - Dynamically Setting Xml By String Concatenation?

Jul 2, 2010

I'm trying to read xml fields (with actionscript 3), but the problem is that I choose which field to read dynamically. For example, I may need to read test19 or test39 or test12 or anything else.

var value:Number = event.result.test19;
var value:Number = event.result.test39;
var value:Number = event.result.test12;

Is there a way to construct that event.result.test19 part dynamically? Something like the code idea below

[Code]...

View 1 Replies

ActionScript 3.0 :: Dynamically Setting AddChild Reference Name?

Feb 10, 2009

I'm trying to dynamically set the addChild linkage identifier, but am having little luck.

Code:
for(i=0;i<6;i++){
if(i==this.myId){
var section:MovieClip = "section"+i
this.addChild(new section);
}}

In AS 2.0 I could simply do this:
Code:
attachMovie("section"+i, "section",0)

View 2 Replies

ActionScript 3.0 :: Dynamically Setting Limits For Random # Gen?

Sep 22, 2009

I need to set limits when generating a random number and this (code below) is just a temporary fix until I can set this limit dynamically.

The number is set to be between (0-4) by running an IF statement which sets a fixed upper limit. This works but I need the limit to update dynamically. My main goal is to use the numChildren property of an XMLList object (passed as argument) to set the maximum limit since the random number will be used by a loader when loading an image from this same XMLList.

Currently there are only 5 images in the XML file so this IF statement works. I would like to have the maximum limit update dynamically when the XML file has images added or subtracted to/from it.

[Code]...

View 3 Replies

ActionScript 3.0 :: Setting Multiple Variables Dynamically?

Nov 10, 2009

I've automated a lot of my script, but cannot automate the very beginning where one sets the variables. I have the following script that I'd like to put in a "for" loop :

private var aliPlane1:Plane3D;
private var aliPlane2:Plane3D;
private var aliPlane3:Plane3D;

[code]......

View 9 Replies

ActionScript 2.0 :: Setting Text Formats Dynamically?

Jan 25, 2011

I have a little issue im trying to resolve. Basically i want to inherit the embedded text format properties from one text field which i have off the stage (empty) to another text field i have on stage. Ive came across the function of getTextFormat(), however when i try to apply this to the other text field it doesnt work:

ActionScript Code:
onStageTextField.getTextFormat(offStageTextField);

Ive embedded italics into my test field which is off stage. I guess im doing this completely wrong?! I know i could simply create a new TextFormat() then apply that to the text field but is there a way of inheriting the format properties of one tex tfield to another on stage?

View 3 Replies

ActionScript 2.0 :: Dynamically Setting Function Type Through Xml?

Jan 16, 2006

I have a number of functions and I want to execute 1 based on the entries in a .xml file

part my xml file reads as follows

<funcType>thisFunc</funcType>

In my .fla I have defined thisFunc along with a number of similar functions

I want to execute the function as follows

chosenFunc=Node.childNodes[0].childNodes[0].nodeValue;//points to thisFunc in the .xml file
chosenFunc(); // This should execute as thisFunc ()

Problem is this doesn't seem to be working. Am I trying the impossible?

View 1 Replies

ActionScript 3.0 :: Draw Line From Any Point A To B Dynamically

Feb 19, 2011

I am trying to make an animation where there are several locations(say A,B,C,D,......) made on a map. If a person clicks on one location A and then another location B, I wanted to draw a dotted line from point A (from destination of the plane) to point B (to destination of the plane) using AS3.

View 15 Replies

ActionScript 3.0 :: Change The Registration Point Dynamically?

May 7, 2010

How to change the registration point dynamically in As3.0

View 2 Replies

Javascript :: Setting Flashvars Parameter Of Swf Object Dynamically

Feb 18, 2012

I have a rquirement where i want to play the song based on the checkbox checked.I mean i want to set the flashvars parameter of swf object on click of checkbox to play respective song.I am using the tag for this is

[Code]..

in my website. Here i want to change the flasvars dynamically on checkbox(function as radion button) checked

View 1 Replies







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