Цитата:
Сообщение от alatar
Если так хочется вызвать обработчик без события, тогда так:
 Код AS3:
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, stage_resizeHandler);
stage_resizeHandler();
function stage_resizeHandler(event:Event = null):void
{
ttl.x = 0;
ttl.y = 0;
ttc.x = (stage.stageWidth - ttc.width) / 2;
ttc.y = 0;
ttr.x = stage.stageWidth - ttr.width;
ttr.y = 0;
ccl.x = 0;
ccl.y = (stage.stageHeight - ccl.height) / 2;
}
|
Добавляю этот код вместо старого.
Выдает ошибку Scene 1, Layer 'Layer 1', Frame 1, Line 10 1119: Access of possibly undefined property width through a reference with static type Class.
Прикладываю исходник.