使用Flash Develop-循环无法运行,程序停止运行。 除了日文字符之外的普通代码。 i的跟踪没有给出结果 - 其他跟踪给出了输出。 该循环之前的代码在Debug Flash Player上提供图像。
package
{
import adobe.utils.CustomActions;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.KeyboardEvent;
import Tile;
import background;
import tilecarrier;
import Math;
/**
* ...
* @author Michael
*/
public class Main extends Sprite
{
private var hand_current:Array = new Array();
private var tiles:Array = new Array();
private var pool:Array = new Array();
private var baseset:Array=["あ・ア","え・え","い・イ","お・オ","う・ウ","か・カ","け・ヶ","き・キ","く・ク","こ・コ","さ・サ","し・シ","す・ス","そ・ソ","せ・セ","た・タ","て・テ","ち・チ","と・ト","つ・ツ","ら・ラ","れ・レ","り・リ","ろ・ロ","る・ル","だ・ダ","で・デ","ぢ・ヂ","ど/ド","づ・ヅ","ず・ズ","ざ・ザ","ぜ・ゼ","ぞ/ゾ","じ・ジ","な・ナ","に・二","の・ノ","ね・ネ","ぬ・ヌ","じゃ・ジャ","じゅ・ジュ","じょ・ジョ","を/ヲ","ん・ン","しゃ・シャ","しゅ・シュ","しょ・ショ","や・ヤ","ゆ・ユ","よ・ヨ","は・ハ","ひ・ヒ","ふ・フ","へ・ヘ","ほ・ホ","ば・バ","ぶ・ブ","び・ビ","ぼ・ボ","べ・ベ","ぱ・パ","ぴ/ピ","ぷ・プ","ぺ・ペ","ぽ・ポ","ま・マ","み・ミ"," む・ム","め・メ","も・モ","みゃ・ミャ","みゅ・ミャ","みょ・ミョ","きゃ・キャ","きゅ・キュ","きょ・キョ","にゃ・ニャ","にゅ・ニュ","にょ・ニョ","びゃ・びゃ","びゅ・ビュ","びょ・ビョ","ひゃ・ヒャ","ひゅ・ヒュ","ひょ・ヒョ","ぴゃ・ピャ","ぴゅ・ピュ","ぴょ・ピョ","っ・ッ"];
private var startingset:Array=[3,1,2,2,6,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4];
private var altset:Array = ["あ・ア","え・え","い・イ","お・オ","う・ウ","か・カ","け・ヶ","き・キ","く・ク","こ・コ","さ・サ","し・シ","す・ス","そ・ソ","せ・セ","た・タ","て・テ","ち・チ","と・ト","つ・ツ","ら・ラ","れ・レ","り・リ","ろ・ロ","る・ル","だ・ダ","で・デ","ぢ・ヂ","ど/ド","づ・ヅ","ず・ズ","ざ・ザ","ぜ・ゼ","ぞ/ゾ","じ・ジ","な・ナ","に・二","の・ノ","ね・ネ","ぬ・ヌ","じゃ・ジャ","じゅ・ジュ","じょ・ジョ","お・オ","ん・ン","しゃ・シャ","しゅ・シュ","しょ・ショ","や・ヤ","ゆ・ユ","よ・ヨ","は・ハ","ひ・ヒ","ふ・フ","へ・ヘ","ほ・ホ","ば・バ","ぶ・ブ","び・ビ","ぼ・ボ","べ・ベ","ぱ・パ","ぴ/ピ","ぷ・プ","ぺ・ペ","ぽ・ポ","ま・マ","み・ミ"," む・ム","め・メ","も・モ","ま・マ"," む・ム","も・モ","か・カ","く・ク","こ・コ","な・ナ","ぬ・ヌ","の・ノ","ば・バ","ぶ・ブ","ぽ・ポ","は・ハ","ふ・フ","ほ・ホ","ぱ・パ","ぷ・プ","ぽ・ポ","っ・ッ"];
private var basevalue:Array = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 20, 10, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1];
private var altvalue:Array = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 20, 10, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1];
public function Main():void
{ if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init); }
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
var background1:Sprite = new background();
background1.x = 0;
background1.y = 0;
addChild(background1);
var tilebar:Sprite = new tilecarrier();
tilebar.x = 0;
tilebar.y = 480;
addChild(tilebar);
var returncarrier1:Sprite = new returncarrier();
returncarrier1.x = 220;
returncarrier1.y = 480;
addChild(returncarrier1);
createtile();
}
private function createtile():void
{
trace("test");
var lengthbaseset:int;
lengthbaseset = startingset.length;
trace(lengthbaseset);
var i:int;
for (i = 0; i ==90; i=i+1)
{
trace(i);
}
https://www.dropbox.com/s/fhbq1vagrtyqmbs/Doesnot%20process%20loop.png?dl=0
答案 0 :(得分:1)
For循环在第二个参数为true时运行。这里i==90
在第一次尝试时不成立,因此循环退出。如果您希望循环90次,则应将其更改为i<90
。