This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0"?> | |
| <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" initialize="init();"> | |
| <mx:Script> | |
| <![CDATA[ | |
| import mx.collections.*; | |
| [Bindable] | |
| private var myCursor:IViewCursor; | |
| [Bindable] | |
| public var myXMLC:XMLListCollection; | |
| public var myXML:XML =<book> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| groupspec.ipMulticastMemberUpdatesEnabled = true; | |
| groupspec.addIPMulticastAddress("225.225.0.1:30303"); | |
| private function connect():void{ | |
| nc = new NetConnection(); | |
| nc.addEventListener(NetStatusEvent.NET_STATUS, netStatus); | |
| nc.connect("rtmfp:"); | |
| } | |
| private function netStatus(event:NetStatusEvent):void{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package | |
| { | |
| import flash.geom.ColorTransform; | |
| public class ColorUtil | |
| { | |
| /** | |
| * RGBColorTransform Create an instance of the information. | |
| * @ Param rgb RGB integer value that indicates (0x000000 - 0xFFFFFF) | |
| * @ Param amount of fill adaptive value (0.0 - 1.0) | |
| * @ Param alpha transparency (0.0 - 1.0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package | |
| { | |
| public class NumberUtil | |
| { | |
| //Usage: trace(NumberUtil.converToWords(numbers.text)); | |
| private static const THOUSANDS:Array = ['','Thousand','Million','Billion','Trillion']; | |
| private static const DECADES:Array = ['Twenty','Thirty','Forty','Fifty','Sixty','Seventy','Eighty','Ninety']; | |
| private static const TENS:Array = ['Ten','Eleven','Twelve','Thirteen','Fourteen','Fifteen','Sixteen','Seventeen','Eighteen','Nineteen']; | |
| private static const DIGITS:Array = ['Zero','One','Two','Three','Four','Five','Six','Seven','Eight','Nine']; | |
| private static const HUNDRED:String = 'Hundred '; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private function xmlToObject( xml:XML ):Object { | |
| var xmlStr:String = xml.toString(); | |
| var xmlDoc:XMLDocument = new XMLDocument( xmlStr ); | |
| var decoder:SimpleXMLDecoder = new SimpleXMLDecoder( true ); | |
| var obj:Object = decoder.decodeXML( xmlDoc ); | |
| return obj; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected function rjText_changeHandler(event:TextOperationEvent):void | |
| { | |
| var switchCount:int =0 | |
| var rjCount:int = parseInt(rjText.text); | |
| if(rjCount == 0) return; | |
| switchCount++; | |
| if(rjCount>=4){ | |
| rjCount=rjCount-4; | |
| switchCount = switchCount + Math.ceil(rjCount/3); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static function createRandomPassWord(strHash:String = "abchefghjkmnpqrstuvwxyz0123456789", hashLen:Number = 5) : String | |
| { | |
| var maskPick:Number = NaN; | |
| var count:Number = 0; | |
| var result:String = ""; | |
| var maskLen:* = strHash.length; | |
| while (count<= hashLen) | |
| { | |
| maskPick = Math.round(Math.random() * maskLen); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package { | |
| public class MathParser { | |
| private var f1Array:Array=["sin","cos","tan","ln","sqrt", "abs", "acos","asin", "atan" ,"ceil", "floor", "round"]; | |
| private var f2Array:Array=["max","min","plus","minus","mul","div","pow"]; | |
| private var iserror:Number; | |
| private var errorMes:String; | |
| private var tokenvalue:String; | |
| private var tokentype:String; | |
| private var tokenlength:Number; | |
| private var nums:String="0123456789."; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private function assignEvolutiveProducts():void | |
| { | |
| _boxColl.removeAll(); | |
| //add rj45 | |
| for ( var i:int= 1;i<=totalNumberofRJ45;i++ ) { | |
| var rjPlug:PlugType = new PlugType(); | |
| rjPlug.plugTypeName = "R_"+i; | |
| rjPlug.modules = 1; | |
| //add first coax if required at first row | |
| if(totalColumns-ENumUtils.FOUR == i-1 ){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AbstractFactory(){ | |
| public function doStuff():void | |
| { | |
| var product:IProduct = this.factoryMethod(); | |
| product.manipulate(); | |
| } | |
| protected function factoryMethod():IProduct | |
| { | |
| // ABSTRACT Method (must be overridden in a subclass) | |
| return null; |