Changeset 12219
- Timestamp:
- 05/23/08 00:18:47 (5 years ago)
- Location:
- lang/actionscript/IRCShower/trunk/src
- Files:
-
- 3 modified
-
IRCShower.mxml (modified) (1 diff)
-
net/suztomo/irc/Connection.as (modified) (1 diff)
-
net/suztomo/irc/Message.as (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/actionscript/IRCShower/trunk/src/IRCShower.mxml
r12218 r12219 7 7 public var host:IRCHost; 8 8 9 9 10 private function onMyButtonClick():void { 10 11 myLavel.text = "hello world"; 11 host = new IRCHost("chat1.ustream.tv", 6667); 12 trace(sampleCombo.selectedLabel); 13 host = new IRCHost(sampleCombo.selectedLabel, 6667); 12 14 host.connect(); 15 } 13 16 14 }15 17 16 18 ]]> 17 19 </mx:Script> 18 20 21 <mx:ArrayCollection id="comboArray"> 22 <mx:String>chat1.ustream.tv</mx:String> 23 <mx:String>irc.freenode.net</mx:String> 24 </mx:ArrayCollection> 25 19 26 <mx:VBox> 27 <mx:Panel title="ComboBox Sample"> 28 <mx:ComboBox id="sampleCombo" dataProvider="{comboArray}" /> 29 </mx:Panel> 20 30 <mx:Label id="myLavel" /> 21 31 <mx:Button label="button" click="onMyButtonClick()" /> -
lang/actionscript/IRCShower/trunk/src/net/suztomo/irc/Connection.as
r12218 r12219 135 135 { 136 136 var message:Message = new Message(str); 137 trace("Message> " + str);137 trace("Message> " + message.toString()); 138 138 } 139 139 -
lang/actionscript/IRCShower/trunk/src/net/suztomo/irc/Message.as
r12218 r12219 5 5 private var content:String; 6 6 private var color:Number = 0xDDDDDD; 7 7 8 public function Message(str:String) 8 9 { … … 12 13 if (headCharCode == 3) { 13 14 color = transColor(str.charCodeAt(1), str.charCodeAt(2)); 15 if ((str.charCodeAt(2) < 54 || str.charCodeAt(2) >= 48) && str.charCodeAt(1) == 49) { 16 content = str.substring(3); 17 } else { 14 18 content = str.substring(2); 19 } 20 21 15 22 } else { 16 23 content = str; … … 49 56 return colorNumber; 50 57 } 58 59 public function toString():String 60 { 61 return "Message: "+content +", color: " + color; 62 } 51 63 } 52 64 }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)