본문 바로가기

공부방/Flex

(58)
[Flex] 팝업을 띄우고 데이터 교환하기 플렉스에서 팝업에 관해서 가장 많이 나오는 질문중 하나가 팝업을 띄울때 어플리케이션의 데이터를 보내고 싶다거나 팝업이 닫힐때 데이터를 받아서 특정 함수를 실행시키고 싶다거나 하는 것이다. 이전에 쓴글 2010/02/17 - [Flex] - 커스텀이벤트 (Custom Event) 만들기 / 사용하기 를 보면 어느정도 알수 있지만 정확하게 팝업을 위해서 쓴 글이 아니기 때문에 실제 사용에 힘들어 하는 사람들을 보게 된다. 그래서 간단한 예제로 구현을 해보고자 한다. 예제를 보면 보낼 데이터에 rinn.kr 이 들어있고 팝업 띄우기를 클릭하면 팝업이 뜨면서 보낸 데이터가 보여진다. 팝업에 보낼데이터 필드에 들어있는 값이 어플리케이션에도 반영된다. 팝업으로 데이터를 보낼때에는 팝업컴포넌트의 public 변수에 ..
[Flex] 팝업 예제 Popup 창을 호출하는 함수의 예.
[Flex] 엑셀 연동하기 출처 : http://active.tutsplus.com/tutorials/flex/using-as3xls-with-the-flex-framework-excel-import/ AS3XLS API를 통해서 엑셀 파일을 읽어오는 방법! 전에도 한번 이작업을 했었는데, 역시 원리를 완벽하게 알지 못하니 다시 할수 없더라 ㅠㅠ 이번 기회에 확실하게 이해하고 넘어가야겠다고 생각했다. 예제 파일 첨부. #Get up to speed the Quick-and-dirty way Reading You need to get the Excel file into a ByteArray of some sort, whether by hook, crook, or Embed. Now you need to load it up like ..
[Flex] NumberFormatter 사용 천단위 컴마(,) 표시하기 private function test() : void { var numberFormatter:NumberFormatter = new NumberFormatter(); numberFormatter.useThousandsSeparator = true; //numberFormatter.format(value:Object):String trace( numberFormatter.format( 10000000 ) ); } 오브젝트로 받기 때문에 인자형이 int나 number가 아니라도 상관이 없다.
[Flex] 프린터 사용하기 Using the FlexPrintJob class Was this helpful?YesNo Build and send a print job Print containers with a transparent background You use the FlexPrintJob class to print one or more Flex objects, such as a Form or VBox container. For each object that you specify, Flex prints the object and all objects that it contains. The objects can be all or part of the displayed interface, or they can be compone..
[Flex] 천단위로 콤마 삽입하기 // 천단위 콤마 추가 public function makeCurrency(str:String):String{ var arr:Array = str.split(""); var len:uint = arr.length; for(var i:int=len-1, cnt:int=1; i>0; i--, cnt++){ if((cnt % 3)==0){ arr[i] = "," + arr[i]; } } str = arr.join(""); return str; } //천단위 콤마 삭제 private function deleteCurrency(string:String):Number{ var num:Number; var replace:String = string; while(replace.indexOf(",") != -1){ re..
[Flex] spark datagrid haeader 숨기기 spark Datagird 는 데이터 그리드 헤더를 없애는걸 찾을수가 없내 ;; 겨우 찾은게 숨기는정도이다 ; 샘플 주소는 http://www.codesofmylife.com/2011/07/07/spark-datagrid-playing-with-custom-header-renderer/ 잘보면 헤더를 숨겼다가 표시하는 버튼이 있다 ㅋ 결국 datagrid의 헤더그룹에 접근헤서 height 를 0으로 해서 숨긴다는 말인데;; mx datagird 같은경우는 헤더를 숨기는 옵션이 따로 있었는데 .. 흠.. 복잡하다 ㅋㅋㅋ *참고로 mx:datagrid 의 경우는 showHeaders 라는 메소드가 따로 있으므로 False 를 설정해주면 헤더를 사용하지 않을 수 있다.
[FlexMobile] Preventing Back Button Default When Navigating Views in Flex Hero Mobile Application Ignore this post! See how to do it better here. I am leaving this post up for reference. Preventing Back Button Default When Navigating Views in Flex Hero Mobile Application Items Covered: Flex Hero Views, Hardware Back Button on Android Devices Flex/AIR Version: 4.5 (Hero), AIR Android 2.5 Difficulty Level: Beginner Prerequisite Knowledge: How Views work in Flex 4.5 Mobile Application Sample Ap..