ActionScript 3.0 :: Assign A Transform Matrix To An Object

Jan 28, 2009

i want to assign a transform matrix to an object, but i want to assign the values myself (as in, no 'rotate, scale etc'), but for example, set a matrix like

[Code]...

which if applied, would have no effect, but would be valid (actually not exactly that matrix, but you get the idea). i want to set the values of the matrix and the object should be affected by those values that i set by myself, no scale rotate or any predefined operations. how can i set my own matrix?

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Matrix Transform - Rotate Object Around External Point

Oct 14, 2010

I found the function:
rotateAroundExternalPoint(m:Matrix, x:Number, y:Number, angleDegrees:Number)
to rotate an object around an external point. The top of the object will always point at the center point which is exactly what I want.

It works fine but its possible to rotate it in an oval instead of in a perfect circle...I think it should be something with the angleDegrees Parameter but im not sure what to do with it. I also tried to set up an own matrix but I failed. Any right direction to orbit an object in an oval, and where the top of the object always point at the rotation center?

View 2 Replies

ActionScript 3.0 :: Scale - Rotate Or Translate A Display Object Using Its Transform.matrix

Jun 22, 2011

my problem is that if i scale, rotate or translate a display object using its transform.matrix i am not getting the value in the display object but the transform is happening like displayObject.scaleX or displayObject.scaleY etc. i get this new transform value using the dislayobject? as i am using a matrix transform manager which actually changing the transform matrix of the display object.

View 8 Replies

ActionScript 3.0 :: Transform Matrix TopLeft?

Dec 29, 2010

I ran into an issue with an app that I have been working on.The application lets a user draw a rectangle, which base class is UIComponent, on an SVG Canvas. The user can rotate, skew, scale,flip horizontal and flip vertical the rectangle. Then they can drop an image into the rectangle.We just cloned the rectangles matrix and applied it to the image and the image would transform the same as the rectangle. Well now we have changed the way the app works.

Now we don't want the image rotated or flipped on the initial drop, and this is where I'm having trouble.I was wondering if there is a way to always find the true top left of any rectangle no matter what kind of matrix is placed on it. I can find the center of the rectangle but when a user flips the rectangle the center point is outside the rectangle.Instead of finding the center I would like to find the topLeft.I have tried several things. Like transform.pixelBounds, but this gives me big numbers like 2200 instead of 400. I have also looked at senocular.com but not sure that I understand it.I just need a dynamic way to always find the top left.

View 1 Replies

Flash :: Transformation Using MovieClip.transform.matrix ?

Jul 2, 2009

I have problem when dealing with transform in Flash cs4 ....When I rotate my movieclip and trace the output, my movieclip's width also changed....

View 4 Replies

Actionscript 3 :: Override The Transform.matrix Setter?

Aug 13, 2010

I have a class which extends the Sprite object in as3. I need to be able to override the transform.matrix setter in this class but haven't been successful in doing so.

I've tried many things, along with creating my own separate class which extends the Transform class and then overrides its set matrix function, and set my transform = new CustomTransform(). Sadly this didn't work.

In code this is what i tried:

public class MyClass extends Sprite
{
public function MyClass()
{

[Code]....

View 1 Replies

ActionScript 3.0 :: Tweening A Zoom Transform Matrix?

Dec 10, 2009

Im using Daniel Gasienica's Zooming in Flash where he uses the transform matrix to calculate the mouse position so the zooming reference point is the same. Its pretty handy, but i need the zoom to more smooth. I've tried almost everything (mainly the TweenLite engine), but with no luck.

[Code]...

View 3 Replies

Actionscript 3.0 :: MC's Transform.matrix Equals Null?

Nov 10, 2010

I am having quite a bit of trouble with one of my classes not working with the custom PixelPerfect-Class. Looking into it I found the error occurring in this line:

Code: Select allbM:Matrix = objB.transform.matrix.clone();

It's throwing a 1009. Playing arounf with trace I have come to the point, that the hero in my little game has no transform.matrix (it's null). This is not related to the CollisionClass, i traced it independently of that.

View 2 Replies

Flex :: Animating A Transformation Based On Transform Matrix?

Oct 18, 2010

I have a UI component that I wish to relocate and scale, but in a rather complex way. I've figured out the necessary transformations using the transform matrix, to which I applied several translate and scale operations. I can set the new transform matrix for this UI component to be the above calculated matrix, and the results are accurate; but I need to animate the transition. I can't use the Scale/Move effects alone because they aren't as powerful when it comes to calculating the necessary transformation as the matrices are.So how can I animate the transition of an object given a source and a target transform matrix?Figured it outUsing a tweener and its onUpdate event to reassign the matrix with each intermediate value:

var animMatrix : Matrix = gi.transform.matrix;
TweenMax.to(animMatrix, 1, {
a : m.a,

[code]......

View 1 Replies

Flash :: Bitmap Data .draw() With Transform Matrix

Jun 29, 2011

I'm working on a project wherein a user can take a snapshot of themselves using their webcam and then edit this image by transforming scale and rotation and save the result.

I've got most of it working, the user can take a snapshot of themselves, transform the object using Senocular's Transform Tool and i'm using .draw() to then save this transformed object. The problem is .draw() is only grabbing data from the top left corner of the stage. It is drawing the transformed object but only from the top left corner.

Why does it only draw from the top left corner and how can i get set the coordinates to only draw from the area where the captured image is set?

You can view the file as is at: [URL]

And i've zipped the FLA and relevant classes at [URL]

import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;

[Code]....

View 2 Replies

Flash :: Zoom Fit A Flex Component With Transform Matrix?

Jul 8, 2011

someone could tell me how I can zoom a Canvas, with transform.matrix, so that the content of the component fits into the parent container (application), either inward or outward

this function is called Zoomfit(), I have this code:

[Code]...

View 1 Replies

Actionscript 3.0 :: Bitmap Data .draw() With Transform Matrix

Jun 29, 2011

Long time since i've been on here. I'm working on a project wherein a user can take a snapshot of themselves using their webcam and then edit this image by transforming scale and rotation and save the result. I've got most of it working, the user can take a snapshot of themselves, transform the object using Senocular's Transform Tool and i'm using .draw() to then save this transformed object. The problem is .draw() is only grabbing data from the top left corner of the stage. It is drawing the transformed object but only from the top left corner. Why does it only draw from the top left corner and how can i get set the coordinates to only draw from the area where the captured image is set?

[Code]....

View 2 Replies

Flex :: Why Does Matrix Transform Snap Child Back To Top Corner Of Parent

Apr 14, 2011

I'm having trouble with Matrix Transforms in Flex.

I have a Flex Canvas with nothing but an Image in it, like so.

<mx:Canvas>
<mx:Image id="img" source="/some/Url" />
</mx:Canvas>

[Code].....

View 5 Replies

ActionScript 3.0 :: Text Is Incorrectly Rendered If The Movieclip Containing The Text Has A 3d Matrix Transform And Quality Is Set To Medium Or Low?

Nov 19, 2010

I have an odd problem in CS4/AS3 with one of my flash files where text is incorrectly rendered if the movieclip containing the text has a 3d matrix transform and quality is set to medium or low. It is easy to reproduce:

[Code]...

View 11 Replies

Flash :: Get Scale Of A Matrix Object?

Mar 14, 2011

Most often, questions are asked about how to scale a DisplayObject, and the answer is usually to use a Matrix.

My question is, how to you GET the scale of a Matrix (scaleX and scaleY)?

There's a Matrix.scale method to set the scaleX and scaleY, but it doesn't return a value, and no other properties exist to read it back.

The reason I ask, I'm using object burried deep down into a Display list, and each may be transformed. So I use the child object's sprite.transform.concatenatedMatrix getter, but am stuck at this point on how to read the scale from it.

View 2 Replies

ActionScript 3.0 :: Rotating A Text Field Using Matrix Object?

Oct 2, 2010

I have a question concerning the use of the matrix objecThe following code works well to rotate the sprite from its center if its x and y properties don't change.However, if I drag and drop the clip somewhere else after having rotated it, and then add a new rotation, it keeps rotating from the previous rotation point. Even if I add point =new oint(myspr.x+myspr.width/2, myspr.y+myspr.height/2); in a function that is called at the end of the drag and drop, the rotation point remains the same.So,how to update the position of the matrix rotation point if the x and the y of the clip change on the scene after a rotation?

Code:
var myspr=new Sprite();myspr.x=100;myspr.y=100;addChild (myspr);var point:Point=new Point(myspr.x+myspr.width/2, myspr.y+myspr.height/2);rotateAroundCenter(myspr,45);

[code].....

View 1 Replies

ActionScript 2.0 :: Matrix Algebra And Matrix Inverse?

Apr 5, 2003

Has anyone here ever developed a function (or general library of relevant functions) that will allow one to find the inverse of a matrix? I've searched the forum archives, as well as the internet more generally, but haven't found anything. If anyone has some leads, I hope you'll pass them along.

If I don't hear anything within the next few days, I might try to develop something on my own, but I'd hate to do so if someone has already done the dirty work.

A solution to this problem would be very useful for 3-D work or anyone doing mathematical programming more generally.

View 14 Replies

Professional :: Transform The Color Of One Object To Another?

Mar 18, 2012

If I brought in a sunburst vector into Flash cs5 and made it an editable object, and made it a Movie Clip (lets name this movieclip, sun1_mc) and than made another (lets call this one sun2_mc) the only thing that changes in between these objects is the color. How would i acess the advanced feature through Actionscript 3.0 so that when the user clicks on a button (lets call this button button_btn) it transforms the color color smoothly from one frame to another. I know i could do it old stlye and make a shape tween and than put sun1_mc on frame 1 and sun2_mc on say frame 15 and just put a motion tween between them. But i was just wondering if there is a way to do this via Actionscript 3.0?

View 1 Replies

ActionScript 3.0 :: Loading In An External Image That Can Transform With The Senocular Transform Tool Class

Jun 26, 2009

I'm having trouble with loading in an external image that I can transform with the Senocular Transform Tool class. I have managed to load in the picture but the transform class doesn't seem want to grab it. Eventually I want to us the FileRef to upload the image but I just need to figure out how it works first. Here my code to load in the external image

[Code]...

The transform class can grab the other movieclips but it doesn't want to grab the new image loaded in from the code above.

View 1 Replies

ActionScript 3.0 :: Creating A Large Grid Matrix Of Clicable Object

Nov 7, 2009

I am working on a project where I need an interactive matrix of 500x500 clickable elements. I thought this would be an easy task in actionscript3 but boy was I wrong. I was able to create a matrix where each element was a Sprite object with attached Mouse click event. But here the performance problems begin. FlashPlayer10 can handle up to 100x100 matrix, but when I increase my matrix I start getting script timeout in browser player... Here is how my "unfinished" matrix looks like.So how should I approach this problem? I was hoping flash will be able to handle so many elements, but I guess I was wrong. I want to have a pan control to pan around for objects off screen and of course zoom in/out control.It's true I'm not very professional in Flahs and actionscript but a friend who is told me this would be no problem implementing in AS3? I need this in flash as the thing needs to be hosted on website.

View 6 Replies

ActionScript 3.0 :: Copying Matrix Rotation From Larger To Smaller Object

Aug 18, 2011

Background: Sorry for the complex title, but can't think of a better way to describe this. So I have an image which is constantly moving and rotating (using matrix rotation around a specific point) on the stage. Problem: So I'm looking for a way that, when the user presses a button, a smaller image (exactly the same as the original one, only 3 times smaller) to position itself so that the smaller image's location is proportional to the the larger one's location. This means that the exact point of the larger image where it is rotating should be the corresponding part of the smaller image, thereby causing a kind of zoom out effect.

The truth is, I'm finding it even difficult to match just the x and y positions so they correspond, ignoring rotation, assuming the position is relative to the rotation point. Even this would be useful.

View 5 Replies

ActionScript 3.0 :: Flash - Inspect A Matrix To See If A Display Object Is Skewed?

Jan 11, 2012

I've been working on an FXG Editor, and I'm using the the senocular transform tool to move, rotate, scale and skew an object.

Is it possible to detect if the the Display object has been skewed just from inspecting the matrix of that DisplayObject? even if said object has been move, scaled and rotated as well.

I want to only serialize the matrix of an object to FXG if has been skewed and not if it has just been rotated, moved, or scaled.

View 1 Replies

Professional :: Transform Object: Resize From Center?

Dec 8, 2010

I am just getting back into using Flash after not using it for about 5 years. I'm having an issue with the simplest thing! I want to be able to type pixel values into the Properties panel to transform/resize an object from the OBJECT CENTER as reference point. If I use the transform tool, it uses the center of the object as the reference. However, if I do as above and type values into the Properties width/height, the object transforms with the top left corner as reference. If I need two or more objects sized exactly the same, or if I want to do a "zoom in" effect, using the transform tool is very ineffecient!

My object seems to be showing that the center is set as the reference point (white circle in center of object). Also, the objects I am working with are jpg's and psd's imported to the library, and made into movie clip symbols.

View 9 Replies

ActionScript 3.0 :: Color Transform And Shared Object?

Feb 9, 2011

i wanna to make some program for save and load color...click button to change button color and click again return to old color and save lase colorwhen run project to show last save color

View 1 Replies

Flash :: Transform Single Channel Of BitmapData Object

Dec 30, 2009

I have a BitmapData object with an alpha channel. I'd like to know the fastet way to offset that alpha channel in ActionScript3 (FlashPlayer10). By offsetting I mean shifting all pixels of that channel in one direction (wrapping around the image borders) while leaving the color channels as they were.Is there a good way to apply a such a transform to one channel only?

View 2 Replies

Flex :: Transform A String In Function And Concatenate With An Object?

Mar 2, 2010

I have the following code in actionscript 3:

var async:AsyncToken;
async = bridge.retornamenu();

The bridge is a remote object, instantiated. The retornamenu() is the function that I want the remote object open in amfphp.

However the retornamenu() is a dynamic function, which turns another function, but I can not run it at runtime,

example

var stringfunction:String = "retornamenu()" // this name is dynamic.
var async:AsyncToken;
async = bridge.stringfunction;

But this way does not work, not perform the function retornamenu();

View 1 Replies

Flex :: Transform A String Into Object Name SelectedItem In The DataGrid?

May 20, 2010

I need to get the value of the item clicked and the name of the columns.[code]But this way it returns 'undefined'.But if I put the name already in function, I can get the correct data, example:Alert.show(''+datagridlist.selectedItem.create); // create is a column name in mysql.But this variable must be created dynamically, example:[code]I'm at it on time and I can not convert the string to column name.

View 2 Replies

ActionScript 3.0 :: Get Object Bounds In Relation To Transform Center?

Jan 15, 2010

I'm building a class at the moment for transforming and scaling content with align, constrain and scaling options.

This is just just fine if the transform center is LEFT or TOP_RIGHT, or what have you, and always within the object bounds, but I haven't yet tackled situations where objects are NOT nicely aligned, or the transform point is outside of the object bounds.

View 3 Replies

ActionScript 3.0 :: Color Transform Class Only Works On One Object At A Time?

Jul 14, 2009

I wrote earlier about this InterpolateColor class that I have just written... now I am wondering about why I seem to only be able to use it on one object at a time and not on two objects at the same time.I want to use it to increase the brightness on my background image, while at the same time decrease the brightness on my navigation link text. It works on either one if done alone but when they are done at the same time, only one executes.

My InterpolateColor class:

ActionScript Code:
package com.bee.utils
{
import fl.motion.Color;

[code]....

The code in my controller class:

ActionScript Code:
InterpolateColor.tweenBrightness( background, .8 );
InterpolateColor.tweenBrightness( footer.navControls, -1 );

View 7 Replies

ActionScript 3.0 :: Assign A Class To An Object?

Jan 2, 2010

Is it possible to automatically assign an object to a class during testing project?  I know you can do so by assigning in a movie clip's property the identifier but I need to know if I'm say creating a game, and it gives the user the ability to choose a player, I need that player/movie clip that the user chose to be assigned to a specific actionscript class.

View 4 Replies







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