Mailing List
Home
Flash Pro
Extending Flash
Flash Macromedia Developer
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
localToGlobal confusion

localToGlobal confusion

2004-02-19       - By Mendelsohn, Michael

 Back
Hi list...

I have a MC with a registration point located at _x:360, _y:210 (the
center of the MC). In this MC is a child MC whose registration point is
also centered and is located at _x:-191, _y:85. When looking at this
child MC with respect to the stage, it 's at about location _x:150,
_y:300. I can 't seem to figure out how to use localToGlobal to get the
child 's location with respect to the stage. It seems to be giving me
the wrong location. What am I missing?

Thanks,
Michael M.

   theLoc = new Object();
   theLoc.x = childObj._x;
   theLoc.y = childObj._y;
   childObj.localToGlobal(theLoc);
   trace(theLoc.x); // traces -23

In the info panel, the point of reference is the center, not the upper
left.


=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:104741
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)