본문 바로가기

Flex

(37)
Creating a dynamically resizing TextArea without scrollbars ------------------------------------- DynamicTextArea.as ------------------------------------- package components { import flash.events.Event; import mx.controls.TextArea; public class DynamicTextArea extends TextArea{ public function DynamicTextArea(){ super(); super.horizontalScrollPolicy = "off"; super.verticalScrollPolicy = "off"; this.addEventListener(Event.CHANGE, adjustHeightHandler); } p..
한글수에 따라서 다이나믹하게 늘어나는 MultilineText 4) ? 2 : 1; } totalNum = byte; if(byte > 720){ num = 0; num = ((totalNum - 720) / 120); MT.height = ( 96 ) + ( 16 * (num + 1) ); }else{ MT.height = 96; } return byte; } ]]> MultilineText.as package comp { import flash.events.FocusEvent; import mx.controls.TextArea; public class MultilineText extends TextArea { public function MultilineText(){ super(); addEventListener(FocusEvent.FOCUS_IN, onFocu..
DataGrid checkbox itemEditor [CDATA[ import mx.events.CollectionEvent; import mx.events.DataGridEventReason; import mx.collections.ArrayCollection; import mx.events.DataGridEvent; import mx.events.ListEvent; [Bindable]–> private var myAC:ArrayCollection = new ArrayCollection([ {id:89, Contact: ‘Bob Jones’, FollowUp: true }, {id:5, Contact: ‘Jane Smith’, FollowUp: true }, {id:7, Contact: ‘Doug Johnson’, FollowUp: false }, {i..
MENU - Flex Example: simple slide out menu using effects [CDATA[ [Bindable] private var bPanelStartX:Number = 0; private var bPanelEndX:Number = 0; //set position values for back panel private function init():void { bPanelStartX = frontPanel.x - 25; bPanelEndX = frontPanel.x - 100; } public function movePanel():void { //set target of move transition panelMover.target = backPanel; //determine direction of panel based on position if (backPanel.x == bPan..
Change Background Color of the Preloader Phase To accomplish change the default background of the Flash application during the preloader phase the HTML code needs to be changed. This can be done through two methods. The first method is to use the -default-background-color argument of mxmlc. In Flex Builder: Open/Create Flex Project Select Project > Properties > Flex Compiler Add -default-background-color #336699 to the "Additional compiler a..
[PDF] Flex2 Framework Diagram
[PDF] ActionScript 3.0 Class diagram
XML구조를 ArrayCollection 구조로 바꾸는 메소드. var myXML:XML = burger 1. 95 burger 2. 95 burger 3. 95 ; private function XmlToArrayCollection(xml:XMLList):ArrayCollection{ var result:ArrayCollection = new ArrayCollection(); var xmlLength:int = xml.length(); for(var i:int = 0; i < xmlLength; i++){ var row:XMLList = xml[i].children(); var rowChildLength:int = row.length(); var resultRow:Object = {}; for(var j:int = 0 ; j < rowChildLength; j++)..