??の代わり? esukei forked:0favorite:8lines:22license : MIT License modified : 2009-10-15 12:32:25 Embed Tweet package { import flash.display.Sprite; import flash.text.TextField; public class FlashTest extends Sprite { public function FlashTest() { // write as3 code here.. var textField:TextField = new TextField(); textField.width = stage.stageWidth; textField.height = stage.stageHeight; textField.text = ''; textField.multiline = true; textField.wordWrap = true; addChild(textField); textField.appendText( hoge() ); textField.appendText('\n'); textField.appendText( hoge('nullじゃないよ') ); } private function hoge(a:String = null):String { return a || 'nullだよ'; } } } Code Fullscreen Preview Fullscreen Laqu paq ep91ckok nakawake : null coalescing operator またはnull結合演算子 clockmaker : メモ selflash : 活用しよう undo : なるほど bkzen : まさにこれ appendText multiline wordWrap text height width TextField addChild String Sprite