вот код в кадре:
Код AS3:
import flash.utils.Timer;
import flash.display.MovieClip;
import flash.events.Event;
var timer_club:Timer = new Timer (1,10)
var BOXES:Array = [new box1(), new box2(), new box3(), new box4()]
var BOXES_ITEM:MovieClip
var CLUBS_ITEMS
var MAX_BOXES_ITEM:Number
timer_club.addEventListener(TimerEvent.TIMER_COMPLETE, CLUB_TIMER)
timer_club.start()
function CLUB_TIMER (e:TimerEvent):void
{
for (var CLUB_ITEM:Number = 0; CLUB_ITEM < CLUBS.length; CLUB_ITEM++)
{
if (String (CLUBS[CLUB_ITEM]) == String (NAME_ROOM[0]))
{
with(addChild(new floorCLUB50x50)){x = CLUBS[CLUB_ITEM].x; y = CLUBS[CLUB_ITEM].y;}
BOXES_ITEM = BOXES[Math.floor( Math.random() * BOXES.length )]
trace (BOXES_ITEM)
with(addChild(BOXES_ITEM)){x = CLUBS[CLUB_ITEM].x +10; y = CLUBS[CLUB_ITEM].y -4;}
}
if (String (CLUBS[CLUB_ITEM]) == String (NAME_ROOM[1])) // ПРОБЛЕМЫ ЗДЕСЬ!!!
{
with(addChild(new floorCLUB100x50)){x = CLUBS[CLUB_ITEM].x; y = CLUBS[CLUB_ITEM].y;}
ddd()
function ddd ():void
{
BOXES_ITEM = BOXES[Math.floor( Math.random() * BOXES.length )]
if (BOXES_ITEM == BOXES[0])
{
MAX_BOXES_ITEM +=10
with(addChild(BOXES_ITEM)){x = CLUBS[CLUB_ITEM].x +10; y = CLUBS[CLUB_ITEM].y -4;}
}
else if(BOXES_ITEM == BOXES[1])
{
MAX_BOXES_ITEM +=10
with(addChild(BOXES_ITEM)){x = CLUBS[CLUB_ITEM].x +10; y = CLUBS[CLUB_ITEM].y -4;}
}
else if(BOXES_ITEM == BOXES[2])
{
MAX_BOXES_ITEM +=10
with(addChild(BOXES_ITEM)){x = CLUBS[CLUB_ITEM].x +10; y = CLUBS[CLUB_ITEM].y -4;}
}
else if(BOXES_ITEM == BOXES[3])
{
MAX_BOXES_ITEM +=10
with(addChild(BOXES_ITEM)){x = CLUBS[CLUB_ITEM].x +10; y = CLUBS[CLUB_ITEM].y -4;}
}
if(MAX_BOXES_ITEM >= 100)
{
MAX_BOXES_ITEM = 0
}
else
{
ddd()
}
}
}
if (String (CLUBS[CLUB_ITEM]) == String (NAME_ROOM[2]))
{
with(addChild(new floorCLUB150x50)){x = CLUBS[CLUB_ITEM].x; y = CLUBS[CLUB_ITEM].y;}
}
}
}
при выполнении того куска кода который я пометил как "// ПРОБЛЕМЫ ЗДЕСЬ!!!" выдает ошибку в выводе:
Код AS3:
Error: Error #1023: Переполнение стека.
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
at MethodInfo-157()
в чём ошибка?