<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" verticalScrollPolicy="off" layout="absolute" mouseMove="doHitTests(event)" viewSourceURL="srcview/index.html">
    
    <mx:Script>
        <![CDATA[
            import com.dougmccune.HitTester;
            
            [Bindable]
            private var hitTestPoint1:Boolean = false;
            [Bindable]
            private var hitTestPoint2:Boolean = false;
            
            
            [Bindable]
            private var myHitTest1:Boolean = false;
            [Bindable]
            private var myHitTest2:Boolean = false;
            
            private function doHitTests(event:MouseEvent):void {
                hitTestPoint1 = image1.hitTestPoint(event.stageX, event.stageY, true);
                hitTestPoint2 = image2.hitTestPoint(event.stageX, event.stageY, true);
                
                myHitTest1 = com.dougmccune.HitTester.realHitTest(image1, new Point(event.stageX, event.stageY));
                myHitTest2 = com.dougmccune.HitTester.realHitTest(image2, new Point(event.stageX, event.stageY));
            }        
        ]]>
    </mx:Script>
    
    <mx:VBox width="100%" horizontalAlign="center" paddingTop="10">
        
    
        <mx:HBox>
            <mx:Panel title="Transparent PNG" borderStyle="solid" backgroundAlpha=".5">
                <mx:Image id="image1" source="blog_logo_solo.png" />
            
                <mx:ControlBar>
                    <mx:VBox verticalGap="0">
                        <mx:Label text="hitTestPoint: {hitTestPoint1}" />
                        <mx:Label text="myHitTest: {myHitTest1}" />
                    </mx:VBox>
                    
                </mx:ControlBar>
            </mx:Panel>
            <mx:Panel title="SWF" borderStyle="solid" backgroundAlpha=".5">
                <mx:Image id="image2" source="blog_logo_solo.swf" />
                
                <mx:ControlBar>
                    <mx:VBox verticalGap="0">
                        <mx:Label text="hitTestPoint: {hitTestPoint2}" />
                        <mx:Label text="myHitTest: {myHitTest2}" />
                    </mx:VBox>
                </mx:ControlBar>
            </mx:Panel>
        </mx:HBox>
    
    </mx:VBox>
    
</mx:Application>