topical media & game development
professional-flex-code-15-GlowingTextInput.mx
professional-flex-code-15-GlowingTextInput.mx
[swf]
flex
<?xml version="1.0"?>
<mx:TextInput xmlns:mx="http://www.adobe.com/2006/mxml"
focusIn="dispatchEvent(new Event('glowOn'))"
focusOut="dispatchEvent(new Event('glowOff'))">
<mx:Metadata>
<!-- Define the events and effect triggers using the Event and Effect metadata tags -->
[Event(name="glowOn", type="flash.events.Event")]
[Event(name="glowOff", type="flash.events.Event")]
[Effect(name="glowOnEffect", event="glowOn")]
[Effect(name="glowOffEffect", event="glowOff")]
</mx:Metadata>
<mx:Script>
<![CDATA[
import flash.events.Event;
public function set glow(on:Boolean):void{
if(on){
dispatchEvent(new Event('glowOn'));
} else {
dispatchEvent(new Event('glowOff'));
}
}
]]>
</mx:Script>
</mx:TextInput>
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.