topical media & game development
professional-flex-code-09-CustomFormatter.mx
professional-flex-code-09-CustomFormatter.mx
[swf]
flex
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundColor="#FFFFFF" width="475" height="175" xmlns:comps="*">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function format():void{
reversetxt.text = reverseFormatter.format(validatetxt.text);
if(reverseFormatter.error != null){
Alert.show(reverseFormatter.error, "Formatter Error");
}
}
]]>
</mx:Script>
<comps:professional_flex_code_09_ReverseFormatter id="reverseFormatter" />
<mx:Panel title="Reverse Formatter" width="100%" height="100%" layout="absolute">
<mx:TextInput id="validatetxt" width="400" change="this.format()" y="30" x="3"/>
<mx:TextInput id="reversetxt" width="400" x="3" y="60" editable="false"/>
<mx:Label width="400" x="3" y="5" text="Type into the field below and see the results"/>
</mx:Panel>
</mx:Application>
(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.