'프로그래밍 언어/FLASH, FLEX'에 해당되는 글 17건

xml 값 가져오기 중....


<info>
    <data value="1" />
    <data value="2" />
<info>

.@value 로 가져오기


<info>
    <data>
        <value>1</value>
    </data>
    <data>
        <value>2</value>
    </data>
</info>

.value 로 가져오기

'프로그래밍 언어 > FLASH, FLEX' 카테고리의 다른 글

AIR 인스톨시 다운로드 에러  (0) 2008.05.09
FLEX2 to FLEX3 changes  (0) 2008.05.09
textarea auto scroll  (0) 2008.05.06
Application.application  (0) 2008.05.06
챗소스?  (0) 2008.04.27
블로그 이미지

용병

,

FLASH AIR 를 설치할 경우 부 네트워크일 경우 접속 에러가 발생할 수 있다.
외부와 연결된 곳에 설치파일을 놓는다...?

'프로그래밍 언어 > FLASH, FLEX' 카테고리의 다른 글

@value 와 value 의 차이?  (0) 2008.06.11
FLEX2 to FLEX3 changes  (0) 2008.05.09
textarea auto scroll  (0) 2008.05.06
Application.application  (0) 2008.05.06
챗소스?  (0) 2008.04.27
블로그 이미지

용병

,

'프로그래밍 언어 > FLASH, FLEX' 카테고리의 다른 글

@value 와 value 의 차이?  (0) 2008.06.11
AIR 인스톨시 다운로드 에러  (0) 2008.05.09
textarea auto scroll  (0) 2008.05.06
Application.application  (0) 2008.05.06
챗소스?  (0) 2008.04.27
블로그 이미지

용병

,
private function addText(s:String):void
{
   textbox.text += s;
   autoscroll();
}
private function autoscroll():void
{
   setTimeout(function():void{textbox.verticalScrollPosition = textbox.maxVerticalScrollPosition;},100);
}

from : http://www.gotoandlearnforum.com/viewtopic.php?f=33&t=17347

'프로그래밍 언어 > FLASH, FLEX' 카테고리의 다른 글

AIR 인스톨시 다운로드 에러  (0) 2008.05.09
FLEX2 to FLEX3 changes  (0) 2008.05.09
Application.application  (0) 2008.05.06
챗소스?  (0) 2008.04.27
datagrid itemrenderer 사용시 progressbar 문제  (0) 2008.04.15
블로그 이미지

용병

,
import mx.core.Application;

Application.application.foo;

'프로그래밍 언어 > FLASH, FLEX' 카테고리의 다른 글

FLEX2 to FLEX3 changes  (0) 2008.05.09
textarea auto scroll  (0) 2008.05.06
챗소스?  (0) 2008.04.27
datagrid itemrenderer 사용시 progressbar 문제  (0) 2008.04.15
DataGrid Data 입력  (0) 2008.04.11
블로그 이미지

용병

,

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns2="*" creationComplete="init_fun()" focusIn="text_focus()">
<mx:Script>
 <![CDATA[
  import flash.net.Socket;
  import mx.controls.Alert;
  public var temp_socket:Socket=new Socket();
  public var temp_int:int=1;
  [Bindable] public var user_men_text:String;
  public function text_focus():void
  {
   if(viewstack1.selectedIndex==1)
    input_id_text.setFocus();
  }
  public function init_fun():void
  {
  var time:Date = new Date() ;

    var hours   : uint = time.getHours();
    if(hours<9 || hours>18)
    viewstack1.selectedIndex=2;
   
  }
  public function connect_fun():void
  {
   var temp_str:String;

   configureListeners(temp_socket);
   //temp_socket.connect(ip_text.text,Number(port_text.text));
   temp_socket.connect("118.131.10.26",20203);
  }
  private function configureListeners(dispatcher:IEventDispatcher):void
  {
         dispatcher.addEventListener(ProgressEvent.SOCKET_DATA, socketDataHandler);
         dispatcher.addEventListener(IOErrorEvent.IO_ERROR,ioErrorHandler);
         dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securiteHandler);
  }
  private function securiteHandler(even:SecurityErrorEvent):void
  {
   viewstack1.selectedIndex=2;
  }
  private function ioErrorHandler(event:IOErrorEvent):void
  {
   viewstack1.selectedIndex=2;
  }
  private function socketDataHandler(event:ProgressEvent):void  //데이터 받을때
  {
         var read:ByteArray;
         var temp_str:String;
   read=new ByteArray;
         temp_socket.readBytes(read , 0 , 0);
         temp_str=read.toString();
         if(temp_int)
   {
    temp_socket.writeUTFBytes("mem"+input_name.text);
    temp_socket.flush();
    viewstack1.selectedIndex=1;
    temp_int=0;
   }
         if(temp_str.length>0)
         {
          if(temp_str.substr(0,3)=='<fo')
          {
           text_area.htmlText+=temp_str.substr(0,temp_str.length);
           text_area.htmlText+='\n';
          
           if(snd_checked.selected)
           {
            var request2:URLRequest = new URLRequest("sound_play.mp3");  //사운드 재
            var snd:Sound = new Sound();
         var sndChannel:SoundChannel;
      snd.load (request2) ;
      sndChannel = snd.play() ;
           }
          }
          else if(temp_str.substr(0,3)=='mem')
          {
           user_men_text='';
           user_men_text=temp_str.substr(3,temp_str.length);
           //우측에 접속자수
          }
         }
       

  }
  private function chk_enter(event:KeyboardEvent):void
  {
   if(event.charCode==13)
    on_send();
  }
  public function on_send():void
  {
   var text_str:String=input_id_text.text;
   
   for(var i:int=0;i<100;i++)
    text_str=text_str.replace('<','');
     
   var temp_str:String="<font color='#"+sel_color.selectedColor.toString(16)+"'><b>"+input_name.text+" : "+text_str+"</b></font>"
   try{
    temp_socket.writeUTFBytes(temp_str);
    temp_socket.flush();
    input_id_text.text="";
   }
   catch(e:IOError){
    viewstack1.selectedIndex=2;
   }
  }
  public function exit_function():void
  {
    
  }
 ]]>
</mx:Script>
  <mx:Iris id="irisOut" duration="500" showTarget="true"/>
    <mx:Iris id="irisIn" duration="500" showTarget="false"/>
 <mx:ViewStack x="10" y="78" id="viewstack1" width="605" height="440">
  <mx:Canvas label="View 1" width="100%" height="100%" hideEffect="irisOut">
   <mx:Panel x="124" y="71" width="334" height="251" layout="absolute" title="어서오세용~" fontSize="12">
<!--    <mx:TextInput id="ip_text" x="121.5" y="36" text="118.131.10.26"/>
    <mx:TextInput id="port_text" x="121.5" y="68" displayAsPassword="true"/>-->
    <mx:TextInput id="input_name" x="121.5" y="100" width="160"/>
    <mx:Button x="102" y="145" label="접속하기" width="110" height="40" click="connect_fun()"/>
    <mx:Label x="32.5" y="40" text="접속 IP"/>
    <mx:Label x="32.5" y="72" text="비밀번호"/>
    <mx:Label x="32.5" y="104" text="사용할 대화명"/>
   </mx:Panel>
   <mx:Label x="124" y="330" text="안된다고 막누르지말고 접속하기" width="334" height="35" fontSize="20"/>
   <mx:Label x="124" y="363" text="한번 클릭하고 기다리세요" width="334" height="35" fontSize="20"/>
  </mx:Canvas>

  <mx:Canvas label="View 2" width="100%" height="100%" show="{input_id_text.setFocus()}" showEffect="irisIn" >
   <mx:Panel x="0" y="0" width="100%" height="100%" layout="absolute" title="채팅창" fontSize="12">
    <mx:TextArea id="text_area" x="10" y="10" width="431" height="347" editable="false" fontSize="12" valueCommit="text_area.verticalScrollPosition = text_area.maxVerticalScrollPosition;" cornerRadius="10"/>
    <mx:ColorPicker id="sel_color" x="449" y="367" width="24" height="21"/>
    <mx:TextArea id="member_area" x="449" y="10" width="126" height="290" cornerRadius="10" text="{user_men_text}"/>
    <ns2:fastTextInput id="input_id_text" width="431" height="23" cornerRadius="10" x="10" y="365" borderStyle="solid" keyDown="chk_enter(event)"/>
    <mx:Button x="449" y="308" label="내용지우기" width="126" click="text_area.text=''"/>
    <mx:Button x="449" y="335" label="연결종료" width="126" click='exit_function()' />
    <mx:CheckBox x="486" y="370" label="소리" width="76" id="snd_checked"/>
   </mx:Panel>
  </mx:Canvas>
    <mx:Canvas label="" width="100%" height="100%">
   <mx:Label x="49" y="59" text="서버 오픈시간이 아닙니다" width="483" height="46" fontSize="30"/>
   <mx:Label x="49" y="113" text="9~19시까지만 오픈합니다" width="483" height="46" fontSize="30"/>
   <mx:Label x="49" y="167" text="9~19시인데 이 메세지가 뜨면" width="483" height="46" fontSize="30"/>
   <mx:Label x="49" y="221" text="rezaros@nate.com 네이트 " width="483" height="46" fontSize="30"/>
   <mx:Label x="49" y="275" text="친등한담에 문의하세요" width="483" height="46" fontSize="30"/>
  </mx:Canvas>
 </mx:ViewStack>
</mx:Application>

'프로그래밍 언어 > FLASH, FLEX' 카테고리의 다른 글

textarea auto scroll  (0) 2008.05.06
Application.application  (0) 2008.05.06
datagrid itemrenderer 사용시 progressbar 문제  (0) 2008.04.15
DataGrid Data 입력  (0) 2008.04.11
parameter 처리  (0) 2008.04.11
블로그 이미지

용병

,
datagrid 안에 itemrenderer 를 만들고...
renderer 안에 progressbar 를 넣고.....

progressbar를 업데이트 하고.. 새 item 을 추가하니 100%인 progressbar 가 보인다...
혹은... item 이 여러개일 경우 progressbar 가 지맘데로 update된다..;;

나중에 찾아봐야지...

'프로그래밍 언어 > FLASH, FLEX' 카테고리의 다른 글

Application.application  (0) 2008.05.06
챗소스?  (0) 2008.04.27
DataGrid Data 입력  (0) 2008.04.11
parameter 처리  (0) 2008.04.11
AIR - screen  (0) 2008.04.10
블로그 이미지

용병

,
private function addDataGridData():void
{
   sData = new ArrayCollection();
   sData.addItem({name: "A", id: "ids1", pw: "pws1"});
   sData.addItem({name: "B", id: "ids2", pw: "pws2"});

   dataGrid1.dataProvider = sData;
}


참고 : http://blog.paranoidferret.com/?p=38

'프로그래밍 언어 > FLASH, FLEX' 카테고리의 다른 글

챗소스?  (0) 2008.04.27
datagrid itemrenderer 사용시 progressbar 문제  (0) 2008.04.15
parameter 처리  (0) 2008.04.11
AIR - screen  (0) 2008.04.10
AIR - tray  (0) 2008.04.10
블로그 이미지

용병

,

InvokeEvent
BrowserInvokeEvent

'프로그래밍 언어 > FLASH, FLEX' 카테고리의 다른 글

datagrid itemrenderer 사용시 progressbar 문제  (0) 2008.04.15
DataGrid Data 입력  (0) 2008.04.11
AIR - screen  (0) 2008.04.10
AIR - tray  (0) 2008.04.10
flex script source 추가  (0) 2008.04.07
블로그 이미지

용병

,
var screenArray:Array = Screen.screens;

for (var i:int = 0; i < screenArray.length; i++) {

 
var screen:Screen = screenArray[i] as Screen;
 trace
(screen.colorDepth);
 trace
(screen.bounds.width);
 trace
(screen.bounds.height);
}

From : http://www.r-stone.net/blogs/satoshi/2008/03/air.html

'프로그래밍 언어 > FLASH, FLEX' 카테고리의 다른 글

DataGrid Data 입력  (0) 2008.04.11
parameter 처리  (0) 2008.04.11
AIR - tray  (0) 2008.04.10
flex script source 추가  (0) 2008.04.07
FLEX 에서 스크롤  (0) 2008.04.04
블로그 이미지

용병

,