AS3 LocalToGlobal Example

/ Published in: ActionScript 3
Save to your folder(s)

This demonstrates how to use localToGlobal in AS3.

Copy this code and paste it in your HTML
  1. var targetMc:MovieClip;
  2. targetMc =;
  3. var pt:Point = new Point(targetMc.x, targetMc.y);
  4. pt = targetMc.parent.localToGlobal(pt);
  6. trace("red global x: "+ pt.x);
  7. trace("red global y: "+ pt.y);


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.