Create two .fla's called SizeParent.fla and SizeChild.fla.
In SizeChild draw a box of anysize and set it's y to anywhere but 0.
Publish SizeChild.swf and place this code on frame 1 in SizeParent
Shouldn't height be the value of your box's y plus its height? I keep getting just the height of the box.Code:import flash.display.*; import flash.events.*; import flash.net.URLRequest; var l:Loader = new Loader(); l.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete); l.load(new URLRequest("SizeChild.swf")); function onComplete(e:Event):void{ addChild(l); trace(l.content.height); }
What gives?




Reply With Quote