> It's not a bug. Loaded SWFs may be under security restrictions
> and may not show up in the list of objects returned by
> getObjects under point. From the docs:
> "Any child objects that are inaccessible for security reasons are
> omitted from the returned array. To determine whether this security
> restriction affects the returned array, call the
> areInaccessibleObjectsUnderPoint() method."
Sure but areInacessibleObjectsUnderPoint returns false for me so it
should not be the cause of my problem? See below, by clicking on the
circle you have an object that is found, by clicking on the symbol,
you have no object found and areInnacessibleObjects returns false!
(well, at least for me ;) ).
package test
{
import mx.core.UIComponent;
import mx.core.FlexShape;
import mx.core.MovieClipAsset;
import flash.geom.Point;
import flash.events.MouseEvent;
import mx.core.IFlexDisplayObject;
import mx.controls.Alert;
public class UITest extends UIComponent
{
[Bindable]
[Embed(source="/assets/symbol.swf")]
private var symbolClass:Class;
public function UITest():void
{
addEventListener(MouseEvent.CLICK, mouseHandler);
}
protected function mouseHandler(event:MouseEvent):void
{
var p:Point = new Point(event.localX, event.localY);
var a:Array = getObjectsUnderPoint(p);
if (a.length == 0) {
var b:Boolean =
areInaccessibleObjectsUnderPoint(p);
Alert.show("no object under mouse and are
inacessible objects
returns: "+b, "", Alert.OK);
} else
Alert.show("object under mouse");
}
protected override function createChildren():void
{
super.createChildren();
var s1:FlexShape = new FlexShape();
s1.graphics.beginFill(0xFF0000);
s1.graphics.drawCircle(30,30,5);
s1.graphics.endFill();
addChild(s1);
var s2:MovieClipAsset =
MovieClipAsset(new symbolClass());
s2.move(50, 50);
s2.setActualSize(30,30);
addChild(s2);
}
}
}
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcomponents/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/flexcomponents/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/