SoFunction
Updated on 2025-04-02

Instance code for listening for custom events and processing events in as


<?xml version="1.0" encoding="utf-8"?>
<!--
ADOBE SYSTEMS INCORPORATED
Copyright 2008 Adobe Systems Incorporated
All Rights Reserved.
NOTICE: Adobe permits you to use, modify, and distribute this file
in accordance with the terms of the license agreement accompanying it.
-->
<!--- The default skin class for a Spark SkinnableContainer container.
@see
@langversion 3.0
@playerversion Flash 10
@playerversion AIR 1.5
@productversion Flex 4
-->
<s:Skin xmlns:fx="/mxml/2009" xmlns:s="library:///flex/spark"
xmlns:fb="/flashbuilder/2009" ="0.5">
<fx:Metadata>[HostComponent("")]</fx:Metadata>
<fx:Script fb:purpose="styling">
<![CDATA[
import ;
/**
* @private
*/
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
{
// Push backgroundColor and backgroundAlpha directly.
// Handle undefined backgroundColor by hiding the background object.
if (isNaN(getStyle("backgroundColor")))
{
= false;
}
else
{
= true;
= getStyle("backgroundColor");
= getStyle("backgroundAlpha");
}
(unscaledWidth, unscaledHeight);
}
private function img_mouseOutHandler(event:MouseEvent):void{
// TODO Auto-generated method stub
var e:MyEvent= new MyEvent();
(e);
}
]]>
</fx:Script>
<s:states>
<s:State name="normal" />
<s:State name="disabled" />
</s:states>
<!--- Defines the appearance of the SkinnableContainer class's background. -->
<s:Rect left="0" right="0" top="0" bottom="0">
<s:fill>
<!--- @private -->
<s:SolidColor color="#FFFFFF"/>
</s:fill>
</s:Rect>
<!--
Note: setting the minimum size to 0 here so that changes to the host component's
size will not be thwarted by this skin part's minimum size. This is a compromise,
more about it here: /jira/browse/SDK-21143
-->
<!--- @copy #contentGroup -->
<s:Group left="0" right="0" top="0" bottom="0" minWidth="0" minHeight="0">
<s:layout>
<s:BasicLayout/>
</s:layout>
<s:Image click="img_mouseOutHandler(event)" source="assert/Conan.jpg">
</s:Image>
</s:Group>
</s:Skin>