Copy link to clipboard
Copied
Riddle me this. Here's my Flex app:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
creationComplete="cc();">
<fx:Script>
<![CDATA[
import spark.core.SpriteVisualElement;
protected function cc():void
{
var outer:Sprite = new Sprite();
var inner:Sprite = new Sprite();
inner.graphics.beginFill(0);
inner.graphics.drawRect(-10, -10, 20, 20);
outer.addChild(inner);
inner.x = inner.y = 100;
var spriteVisual:SpriteVisualElement = new SpriteVisualElement();
spriteVisual.addChild(outer);
addElement(spriteVisual);
trace(inner.getBounds(outer));
}
]]>
</fx:Script>
</s:Application>
<?xml version="1.0" encoding="utf-8"?><s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"xmlns:s="library://ns.adobe.com/flex/spark"xmlns:mx="library://ns.adobe.com/flex/mx"creationComplete="cc();"><fx:Script><![CDATA[import spark.core.SpriteVisualElement;protected function cc():void{var outer:Sprite = new Sprite();var inner:Sprite = new Sprite();inner.graphics.beginFill(0);inner.graphics.drawRect(-10, -10, 20, 20);outer.addChild(inner);inner.x = inner.y = 100;var spriteVisual:SpriteVisualElement = new SpriteVisualElement();spriteVisual.addChild(outer);addElement(spriteVisual);trace(inner.getBounds(outer));}]]></fx:Script></s:WindowedApplication>
Copy link to clipboard
Copied
Looks like this has already been reported as a bug: http://bugs.adobe.com/jira/browse/FP-5143 I cannot believe this issue actually made it into any AIR release build.
Copy link to clipboard
Copied
Hi Aaron,
This bug (internal bug #2667566) should be fixed with the AIR 2.5 SDK and runtime release. Please let me know if you find that isn't the case.
Thanks,
Chris