配列とfor
♥0 |
Line 15 |
Modified 2010-12-13 12:30:24 |
MIT License
archived:2017-03-20 02:06:17
ActionScript3 source code
/**
* Copyright h_sakurai ( http://wonderfl.net/user/h_sakurai )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/BIxH
*/
package {
import flash.display.Sprite;
import flash.text.*;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
var names:Array = ["あいうえお","かきくけこ","たちつてと","さしすせそ"];
for(var i:int=0;i<names.length; i++) {
var t:TextField = new TextField();
t.text = i + ":" + names[i];
t.y = i * 20;
addChild(t);
}
}
}
}