2012-06-20 おみくじ ActionScript //「大吉」「中吉」「小吉」「吉」「凶」をランダム var msg:Array=new Array(); var r:Number; //おみくじの種類を入力 msg[0] = "大吉"; msg[1] = "中吉"; msg[2] ="小吉"; msg[3] = "吉"; msg[4] = "凶"; r =Math.floor( Math.random()* msg.length) ; this.msg_txt.text = msg[r]; trace(msg[r]);