【发布时间】:2012-07-14 23:51:34
【问题描述】:
我知道网上有一百万个关于 AS3 编译器错误1120: Access of undefined property <property> 的问题,但这种情况很奇怪。
我正在为 Flex 4.6 中的 <s:Application> 组件蒙皮,并且我在蒙皮 MXML 文件中。 super.addEventListener(Event.ADDED_TO_STAGE, positionObjects); 这行给我的问题是:1120: Access of undefined property positionObjects。然而positionObjects 被声明在它的正下方。知道有什么问题吗?
<fx:Script>
<![CDATA[
/**
* @private
*/
override protected function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number) : void
{
bgRectFill.color = getStyle('backgroundColor');
bgRectFill.alpha = getStyle('backgroundAlpha');
super.updateDisplayList(unscaledWidth, unscaledHeight);
}
//Listen for when objects are added to the stage, before positioning them
[Bindable]
private var logoX:Number = 0;
super.addEventListener(Event.ADDED_TO_STAGE, positionObjects);
private function positionObjects(e:Event):void {
this.logoX = stage.stageWidth / 3;
}
]]>
</fx:Script>
感谢您的宝贵时间。
【问题讨论】:
标签: actionscript-3 flash apache-flex flex4 compiler-errors