Changeset 15420 for lang/actionscript

Show
Ignore:
Timestamp:
07/08/08 00:45:50 (5 months ago)
Author:
suztomo
Message:

lang/actionscript/IRCShower : As FPuzzle is submitted, I continue IRCShower.

Location:
lang/actionscript/IRCShower/trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/actionscript/IRCShower/trunk/src/IRCShower.mxml

    r13824 r15420  
    11<?xml version="1.0" encoding="utf-8"?> 
    2 <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> 
     2<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init();"> 
     3        <mx:ArrayCollection id="comboArray"> 
     4            <mx:String>chat1.ustream.tv</mx:String> 
     5            <mx:String>irc.freenode.net</mx:String> 
     6            <mx:String>irc.tokyo.wide.ad.jp</mx:String> 
     7        </mx:ArrayCollection> 
     8 
     9        <mx:VBox> 
     10                <mx:VBox> 
     11                        <mx:Label text="Select Server" /> 
     12                        <mx:HBox> 
     13                        <mx:ComboBox id="sampleCombo" dataProvider="{comboArray}" /> 
     14                                <mx:Button id="serverButton" label="Connect" click="connectServer();" />                         
     15                        </mx:HBox> 
     16                </mx:VBox> 
     17                <mx:VBox id="channelPanel"> 
     18                        <mx:Label text="Input Channel Name" /> 
     19                        <mx:HBox> 
     20                                <mx:TextInput id="channelName" styleName="input" /> 
     21                                <mx:Button id="channelButton" label="Join" click="joinChannel();" /> 
     22                        </mx:HBox> 
     23                         
     24                </mx:VBox> 
     25        </mx:VBox> 
     26 
     27 
    328        <mx:Script> 
    429                <![CDATA[ 
     
    1136                        private var connection:IRCConnection; 
    1237 
     38                        private function init():void 
     39                        { 
     40                                nicoScreen = new NicoScreen(); 
     41                        } 
     42 
    1343                        private function connectServer():void { 
    1444                                host = new IRCHost(sampleCombo.selectedLabel, 6667); 
     
    1646                                connection.addEventListener(IRCConnection.MESSAGE_EVENT, onMessage); 
    1747                                connection.addEventListener(IRCConnection.CONNECT_EVENT, onConnect); 
    18                                 nicoScreen = new NicoScreen(); 
    1948                        } 
    2049 
     
    3867        </mx:Script> 
    3968 
    40         <mx:ArrayCollection id="comboArray"> 
    41             <mx:String>chat1.ustream.tv</mx:String> 
    42             <mx:String>irc.freenode.net</mx:String> 
    43             <mx:String>irc.tokyo.wide.ad.jp</mx:String> 
    44         </mx:ArrayCollection> 
    45  
    46         <mx:VBox> 
    47                 <mx:Panel title="Select Server" styleName="main"> 
    48                         <mx:HBox> 
    49                         <mx:ComboBox id="sampleCombo" dataProvider="{comboArray}" /> 
    50                                 <mx:Button id="serverButton" label="Connect" click="connectServer();" />                         
    51                         </mx:HBox>                       
    52                 </mx:Panel> 
    53  
    54                 <mx:Panel title="Select Channel" id="channelPanel" enabled="false"  styleName="main"> 
    55                         <mx:HBox> 
    56                                 <mx:TextInput id="channelName" styleName="input" /> 
    57                                 <mx:Button id="channelButton" label="Join" click="joinChannel();" /> 
    58                         </mx:HBox> 
    59                 </mx:Panel> 
    60         </mx:VBox> 
    6169        <mx:Style source="IRCShower.css"/> 
    6270</mx:WindowedApplication> 
  • lang/actionscript/IRCShower/trunk/src/net/suztomo/irc/IRCConnection.as

    r12525 r15420  
    8787                this.dispatchEvent(new IRCEvent(IRCConnection.CONNECT_EVENT)); 
    8888                         
    89                         tryNick("suztomoo"); 
     89                        tryNick("IRCShower"); 
    9090                } 
    9191 
     
    153153                        } 
    154154                        if (tryNickCount < 1) { 
    155                         sendLine("Nick " + nick); 
    156                         sendLine("User " + "suzukitomohiro 0 * :すずとも"); 
     155                                sendLine("Nick " + nick); 
     156                                sendLine("User " + "suzukitomohiro 0 * :すずとも"); 
    157157                        } else { 
    158                                 sendLine("Nick " + nick + tryNickCount); 
     158                                sendLine("Nick " + nick + tryNickCount.toString()); 
    159159                        } 
    160160                        tryNickCount++;