for文の中のfor文で「continue label」は使えなかった。。。 fmak forked:0favorite:0lines:52license : MIT License modified : 2010-01-24 04:09:37 Embed Tweet package { import flash.text.TextField; import flash.display.Sprite; import flash.events.MouseEvent; public class Main extends Sprite { private var _i:uint; private var _j:uint; private var _count:uint; private var _countChecker:Boolean; private var _countArray:Array = []; /** * @Constructor */ public function Main() { // 5 x 5 for ( _i = 0; _i < 5; _i++ ) { label: for ( _j = 0; _j < 5; _j++ ) { var sp:ExtendedSprite = new ExtendedSprite(); var tf:TextField = new TextField(); sp.graphics.beginFill(Math.random()*0xFFFFFF); sp.graphics.drawRect(0,0,50,50); sp.x = tf.x = sp.width * _i; sp.y = tf.y = sp.height * _j; _count = Math.random()*25; for each ( var k:uint in _countArray ) { if ( _count == k ) { _countChecker = true; /** * continue label is not work... */ //continue label; continue; } } if ( _countChecker ) { _countChecker = false; _j--; continue; } _countArray.push(_count); sp.id = _count; tf.text = String(_count); sp.addEventListener(MouseEvent.CLICK, clickFunc); addChild(sp); addChild(tf); } } } public function clickFunc(e:MouseEvent):void { trace(e.currentTarget.id); } } } import flash.display.Sprite; dynamic class ExtendedSprite extends Sprite { } Code Fullscreen Preview Fullscreen as3 continue for label height width addEventListener MouseEvent.CLICK addChild trace TextField MouseEvent push text Boolean String uint Math.random Array Sprite