Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7758239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:18:27+00:00 2026-06-01T13:18:27+00:00

im very nex to action script but i’ve got a problem with an movieclip.

  • 0

im very nex to action script but i’ve got a problem with an movieclip.

i’ve got 4 coodinates an need to fit a fit movie clip to them, so each corner of the movieclips is on one coordinate.

The only thing i could find it tranforming it with a matrix and angles (see example), but these cant be the best solution for my problem to calculate all the angles etc.

var degX:Number = 0;
var degY:Number = 0.3;

//Get the transform matrix for the object to skew
var m:Matrix = bild.transform.matrix;
m.b = Math.tan(degY *(Math.PI/180));
m.c = Math.tan(degX *(Math.PI/180));

//Apply the matrix to the transform object
var t:Transform = new Transform(bild);
t.matrix = m;

//Apply the skew
bild.transform = t;

i hope you understand my problem and know a solution for it.

i’ve tried distord image as it seems to do exaclty what it need but i cant get it so show my image. the coordinates work, if i un comment the commented part i see white retangles exaclty where they should be, but they don’t get deleted on update, i hope you cann help my. here is my code:

var PointUR:Point = new Point();
PointUR.x = values1[0];
PointUR.y = values1[1];

var PointUL:Point = new Point();
PointUL.x = values2[0];
PointUL.y = values2[1];

var PointBR:Point = new Point();
PointBR.x = values3[0];
PointBR.y = values3[1];

var PointBL:Point = new Point();
PointBL.x = values4[0];
PointBL.y = values4[1];


[Embed(source='MyImage.jpg')]
var MyImage:Class;
var shape:Shape = new Shape();
var bitmap:Bitmap = new MyImage();
var showGrid:Boolean = true;
var myColorTransform = new ColorTransform();
/*myColorTransform.color = 0xFFFFFF;
shape.transform.colorTransform = myColorTransform;
shape.graphics.beginFill(0x000000,1);
addChild(shape);*/
var distortion:DistortImage = new DistortImage(267, 400, 3, 3);
if (showGrid){
            shape.graphics.lineStyle(1, 0x00FF00);
}    
distortion.setTransform(shape.graphics, 
                        bitmap.bitmapData, 
                        PointUR, 
                        PointUL, 
                        PointBR, 
                        PointBL);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T13:18:29+00:00Added an answer on June 1, 2026 at 1:18 pm

    Transforming a movieClip or Sprite into a trapezoid using the matrix is impossible in as3. Check out this link that explains the extent of possibilities

    in short:

    enter image description here

    The way this has been achieved is by breaking up the DisplayObject into smaller triangles, and applying different translation matrix to each. The end result makes the triangles pop out a bit, but if you increase the number of triangles, this effect gets diminished.

    here’s a link for a blog with demo and source

    It is much easier to do this with 3d classes or Mathieu Badimon’s five3d, the distortion part anyway, I’m not sure how you would do it to match a set of control points.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Very simple problem but I'm making no progress so I thought I should ask...
very simple problem, but i want to see how experts look at it. This
very simple problem here... but I can't work it out. I have a simple
Very odd problem as this is working perfectly on our old Classic ASP site.
Very direct question, i need to know if its possible and maybe where to
Very simple question but giving me hard time, I want to replace to \
Very simple I guess but I cannot get what I perceive to be the
Very basic and maybe I missed it, but instead of doing something like sign_up
Very simple, I need to match the # symbol using a regex. I'm working
Very simple, I guess... I need to get a usable variable by adding leading

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.