ActionScript 2.0 :: Extended Transformation Of A MovieClip

Jul 23, 2004

i am developing a kind of (near-)isometric engine (in Actionscript 2.0), kinda simple, which is using MovieClips as wall or floor textures.This is the Wall texture i have:This is what i would like to have:The height is always 1.5 times the width. Its a simple skew transformation.Currently i have two possibilities:I am creating the finished wall in photoshop, save the file as PNG (because of transparent areas). Because i cant import PNGs at run time, i need to create all possible textured walls. A lot of work if i have a lot of textures (Say, i have about 200? )I am importing the original Texture into Flash, and perform a free transform directly in the MovieClip. I still have a lot of work because i have to do this to each textured wall!I would like to do this transformation in Actionscript, so i could import any texture JPG at the runtime (LoadMovie) and just need to have the File names stored somewhere or retrieve them and so on.

I didnt find any possibility to perform a skew transform to a MovieClip in Actionscript..The transformation is just like this: Rotate by 45 deg. (CW) and reduce the height of the finished transformation to 1/2.i am able to apply the _rotation and _height transformations, but the second transformation is always applied to the root object, which often might be very helpful, but right now its not.

View 2 Replies


Similar Posts:


ActionScript 2.0 :: [MX2004] Extended Transformation Of A MovieClip

Jul 23, 2004

i am developing a kind of (near-)isometric engine (in Actionscript 2.0), kinda simple, which is using MovieClips as wall or floor textures. This is the Wall texture i have: This is what i would like to have: The height is always 1.5 times the width. Its a simple skew transformation.Currently i have two possibilities:

I am creating the finished wall in photoshop, save the file as PNG (because of transparent areas). Because i cant import PNGs at run time, i need to create all possible textured walls. A lot of work if i have a lot of textures (Say, i have about 200? )I am importing the original Texture into Flash, and perform a free transform directly in the MovieClip. I still have a lot of work because i have to do this to each textured wall!I would like to do this transformation in Actionscript, so i could import any texture JPG at the runtime (LoadMovie) and just need to have the File names stored somewhere or retrieve them and so on.

[Code]...

View 2 Replies

IDE :: 3D Transformation Of MovieClip In As2?

Feb 26, 2010

i am looking for script for movie Clip distortion and 3D transformation in action script 2.0

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 2.0 :: Fast Color-transformation Over MovieClip With CacheAsBitmap?

Jun 3, 2009

I have a very complex vector symbol on the Stage - background_mc. I have set background_mc.cacheAsBitmap = true.This turns background to bitmap and makes Stage repaint fast.Every frame the background light changes.I use the following code to alter the light.

(new Color(background_mc)).setTransform(light);

And here is the problem.The code works very slow.I guess because the light is applied to the contents of the background_mc.And then a new cached bitmap is resterized once again.The same code over BitmapData of the same size works much faster!Is there a way to tell Flash to apply color-transformation to the cached bitmap, instead of underlying vector symbols?

Note, that background_mc is scaled when Stage is resized.This is not so fast, but it's good, because the picture quality preserved.If I convert background_mc to BitmapData, bitmap would be scaled.

View 1 Replies

Flash :: Using An Extended Movieclip

Jan 21, 2010

I created a movieclip and extended it with my user defined class. Now if I want to use that movie clip and use the properties from the class how do i go around doing that?

View 1 Replies

ActionScript 2.0 :: LoadMovie In A Extended Movieclip Class?

Oct 15, 2010

i have this class but instancing it nothing appear

class myclass extends MovieClip
{
var mc:MovieClip;

[code].....

View 0 Replies

ActionScript 2.0 :: Flash Cannot Create Extended MovieClip

Sep 15, 2011

Why Flash creates regular MovieClip object, not instance of extending class? So, I've written a class "test" and put it into "n/test.as" file (as shown on the first attachment).
Code:
class test extends MovieClip {
private var flag:int;
public function test() {
trace('!!mover constructor!!');
flag = 56;
} public function Method():Void {
trace('in methdo');
}}

Then I've created symbol in the library, specified it's name and linkage identifier (as shown on the last attachment). Then I've put following code to the first frame:
Code:
import n.*;
var r = this.attachMovie('test', 'test_mc', getNextHighestDepth(), {_x: 40, _y: 0});
trace('ret ' +r);
trace(test_mc.flag);
trace(typeof test_mc.Method);
program_mc.Method();
And I see in output panel that test class property flag and method Method are undefined for test_mc.

View 9 Replies

ActionScript 3.0 :: Find The Class Of An Extended MovieClip When Probing The Stage?

Feb 23, 2012

All my custom classes that extend MovieClip simply trace as "MovieClip" when using stage.getChildIndex(i); I'm trying to search the stage to see what objects have been placed and then add them to the correct array. E.g. if I place 5 "Enemies" on the screen, I want to then add them to an array by searching the stage for the "Enemies" class, without naming each one and adding it manually in the code.

Edit:

Code:
for(var i:int = 0; i < stage.numChildren-1; i++)
{
trace(getQualifiedClassName(stage.getChildAt(i)));

[Code]....

View 6 Replies

ActionScript 2.0 :: Dynamically Creating Instance Of Extended MovieClip Class?

Nov 6, 2006

I have recently started out with flash oop concepts and was wondering how to do create an instance of an extended movie class without dragging and dropping the clip from the library ....I have figured out this method..

for(i = 0;i<100;i++)
{var mc:MovieClip = attachMovie("ball","dasd"+i,_root.getNextHighestDe pth());
mc._x = Math.random() * 600;
mc._y = Math.random() * 600;
}

but this way I cant pass arguments to the constructor function of the ball class..

View 1 Replies

Actionscript 3 :: Accesing Function On The Maintime Line From A Extended Movieclip Class?

Feb 21, 2010

I have some movieclips on my main timeline with a class to extend these movieclips

[code]...

But the I can't 'reach' the testing function. I get this error: "1061: Call to a possibly undefined method testing through a reference with static type flash.display:DisplayObjectContainer."

View 1 Replies

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 3.0 :: Dispatch Event From Class That Isn't Extended Class Of MovieClip?

Oct 20, 2009

Is it possible to dispatch event from class that isnt extended class of MovieClip? I created my own class and put import flash.events.Event; import flash.events.*; but when i call dispatchEvent compiler throws error:"1180: Call to a possibly undefined method dispatchEvent."

View 3 Replies

Flex :: UIComponent Extended Class Isn't Showing UIComponent Extended Class

Aug 18, 2009

I have 1 class (that is extending a UIcomponent) that is representing a component. In that component I create different instances of another class that is also a UIComponent but this class doesn't show up in de first class. I see that it is running and that it has the correct hights but I got the feeling that it doesn't show up with this hights. If I trace I see the width and height is 200 X 200 but there is still nothing visible in my component.

View 1 Replies

IDE :: Faulty 3D Transformation - How To Improve

Jan 31, 2009

I'm playing around with Flash CS4 trial and tried to 'compose' a 3d Box by putting 6 MovieClips as the side elements of the box in one clip which represents the whole box. (only using the Flash Tools, no Actionscript). Within the BoxClip (after doubleclick on the BoxClip on stage), all sides look right, each side is positioned with the correct angles and coordinates. Outside the BoxClip, back on root stage, the box sides are not parallel anymore, the angles are not 90 degrees, there is no 'box' actually. So I guess, one of the problems is the 3D Center point of the objects which is absolute to one point in coordinate space. The other problem is the faulty '3D' display in Flash, that is, changing from inside to ouside a clip changes the view also. So far, the Flash GUI seems quite useless for doing some '3D'. How to improve the workflow?

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

Reverse A Skew Transformation In The Flash IDE?

Sep 6, 2011

Place a 100px by 100px box on the stage (not a movieclip, just a simple shape).

Now apply a vertical skew of 30 degrees. You should get this...

Click outside of the shape to release the transformation data. The degrees for skew resets to 0 (this is expected), see image below

But What skew would you apply to the shape to return it to its original shape. Initially I would've thought it was -30 in the vertical skew, but this seems to return a weird hybrid shape.. See below:

View 2 Replies

ActionScript 3.0 :: Transformation Of TextField Around The Center

Sep 2, 2011

I'm developing a flash product designer... one of it's features is that customers can add their own text to product and they can move it, resize it, rotate it... but I have one problem - text is stored in dynamic TextField with embed fonts, it's created dynamically from Actionscript, but it's registration point is set to upper left corner, is there any way to transform it around center? I mean resizing and rotating around center.

View 4 Replies

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

Scale Transformation Of A Symbol Within A Motion Tween

Nov 29, 2009

I'm making a very simple animated flight plan with 3 airfields and six airplanes as seen from the top. To imitate the effect of take off and landing I want to be able to change the size of the plane when it flies.Only trouble is I can do that only with the Free Transform Tool. Even if I select Modify -> Transform -> Scale I have to change the shape of each object manually and they end up having different sizes. I tried editing the size in the properties box but the fields are greyed out. Any idea how I can change that.

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

Professional :: Motion Editor Transformation Grayed Out

Jun 28, 2010

Why are the scale x and y options grayed out on the motion editor? I tried editing width and height (W&H) in the "properties panel" under "position and size" and all that does is move the position my object diagonally for some reason, not scale the size. Also, when i do this, the Width number does not change, but the x and y position numbers above it change. Strange!

View 3 Replies

Actionscript :: Get Transformations From Transformation Matrix In Flash?

Sep 1, 2010

I have transformation matrix properties (a,b,c,d). How to calculate scaleX, scaleY, scewX, scewY and rotation angle from those values?

When only one type of transformation is applied, I can figure out that:

scaleX = a
scaleY = d
scewX = c
scewY = b
rotation = arccos(a) or -arcsin(c)

But when multiple transformations are applied at once I don't know how to calculate those values.

I need to do this outside of flash so I can't use any flash helper methods.

View 1 Replies

ActionScript 3 :: Transformation Of BitmapData To Triangle Points

Nov 11, 2010

I have a big code, but essentially, this part comes to transformation of a BitmapData to triangle points, using affine transformation. Also - I know that BitmapData is rectangular - the last, fourth point of the transformation is just the first one reflected over the axis defined by the other two points.

A small thing so you can see which point is which one:
1........2
. / / / /|
./ / / /
. / / / |
./ / /
. / / |
./ /
. / |
./
3 - - - -4 - 4th point reflected

This whole process would come to scaling, rotating and skewing the BitmapData based on the angles between the points... But somehow my code still does not work. Looking at a similar thing in PaperVision 3D - still didn't work?

View 1 Replies

Actionscript 3 :: Use Transformation Table In Matrix Class?

Aug 2, 2011

How can I, if it's even possible, use this transformation table provided in my question's accepted answer here in Actionscript 3 in Flash? I understand it might have something to do with Matrix, but I really have no clue if that transformation provided in the answer is possible to implement there. Is it? If so how?

View 1 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 :: Manipulating A Circle, Using Two Transformation Matrices?

Aug 31, 2011

I am having trouble with some code, I am trying to get a circle to rotate around a center point, as well as rotate in a circle. at the same speed as its parent circle. however I am having some trouble, and I know it is from how I am transforming the position of its matrix, however I honestly can not find the mistake. below is the code:

ActionScript Code:
import flash.display.Sprite;
import flash.geom.Matrix;
var outcirc: Sprite= new Sprite();

[Code].....

View 1 Replies

ActionScript 3.0 :: Numeric Transformation - Transform 100 Into The Scale 1 To 20?

Feb 29, 2012

I need to scale numbers. I'm using perlin noise to create a random 2d scrolling map. I'm using Blue channel data with values between 0 and 255 (I believe).Each pixel represent a value of height of a tile. For that reason I have to transform this value into a valid value.For example, If my 2d scrolling map has 20 tiles of maximum height and the pixel in the first position is 100.I have to transform 100 into the scale 1 to 20.

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







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