No,
mSprite.x = 0 refers to the x-position of mSprite in the coordinate space of mSprite's parent (which is (0,0) by default if you never set it). The expected x=15 is the position of the newly drawn rectangle in the coordinate space of mSprite. localToGlobal does not refer to Points per se (as mentioned in your earlier post) but it lets you swap the local coordinate space of an object with the global coordinate space (i.e. the coordinate space of the stage)
Willem

On 25-feb-2010, at 13:28, Lehr, Theodore wrote:

given the following:

var msprite:Sprite = new Sprite();

mSprite.graphics.beginFill(0x000000,.1);
mSprite.graphics.drawRect(15,337,646,207);
mSprite.graphics.endFill();

addChild(mSprite);

trace("mSprite.x = "+mSprite.x);

I would think that I should be tracing "mSprite.x = 15" instead I get "mSprite = 0"

Anyone know why?
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Geografiek is a Dutch, Utrecht-based map and chart design company.
Willem van den Goorbergh can be contacted by telephone: (+31) 30-2719512 or cell phone: (+31)6-26372378
or by fax: (+31)302719687
snail mail: Hooghiemstraplein 89 3514 AX UTRECHT
Visit our website at: http://www.geografiek.nl
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=




_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to