将 png 嵌入类实例变量时,Flash CS4 编译器出现错误 1120
我有一个 Flash CS4 (Flash 9 ActionScript 3.0) 项目,可以在我的机器上完美编译和运行。 然而,它是我想在另一台(更快的)机器上编译的一大批 fla 的一部分。当我将项目(fla 以及所有动作脚本和资源文件)复制到更快的机器时,Flash CS4 编译器给出编译器错误 1120“访问未定义的属性 ButtonPause_PauseNormal”。
属性“PauseNormal”是一个嵌入的 png。 PNG 可用。没有转码器错误。 这是“ButtonPause”类的 ActionScript;
package nl.platipus.NissanESM.buttons
{
import flash.display.*;
import flash.events.*;
public class ButtonPause extends Sprite
{
[Embed(source="../../../../player/pause.png")]
private var PauseNormal:Class;
[Embed(source="../../../../player/pause_mo.png")]
private var PauseMouseOver:Class;
private var stateNormal:Bitmap;
private var stateMouseOver:Bitmap;
public function ButtonPause()
{
stateNormal = new PauseNormal();
stateNormal.width = 29;
stateNormal.height = 14;
stateNormal.alpha = 1;
addChild(stateNormal);
stateMouseOver = new PauseMouseOver();
stateMouseOver.width = 29;
stateMouseOver.height = 14;
stateMouseOver.alpha = 0;
addChild(stateMouseOver);
width = 29;
height = 14;
addEventListener(MouseEvent.MOUSE_OVER, handleMouseOver);
addEventListener(MouseEvent.MOUSE_OUT, handleMouseOut );
}
private function handleMouseOver(evt:MouseEvent):void
{
stateNormal.alpha = 0;
stateMouseOver.alpha = 1;
}
private function handleMouseOut(evt:MouseEvent):void
{
stateNormal.alpha = 1;
stateMouseOver.alpha = 0;
}
}
}
(两台机器都运行完全相同的 Flash CS4 Professional Version 10.0.2 安装,并且都具有完全相同的发布设置和 ActionScript 3.0 设置。)
发生了什么事?
I have a Flash CS4 (Flash 9 ActionScript 3.0) project that compiles and runs perfectly on my machine.
However it is part of a big batch of fla's that I want to compile on another (faster) machine. When I copy the project (the fla and all actionscripts and assets files) to the faster machine, it's Flash CS4 compiler gives me compiler error 1120 "Access of undefined property ButtonPause_PauseNormal".
The property "PauseNormal" is an embedded png. The PNG is available. No transcoder errors.
Here's the ActionScript for class "ButtonPause";
package nl.platipus.NissanESM.buttons
{
import flash.display.*;
import flash.events.*;
public class ButtonPause extends Sprite
{
[Embed(source="../../../../player/pause.png")]
private var PauseNormal:Class;
[Embed(source="../../../../player/pause_mo.png")]
private var PauseMouseOver:Class;
private var stateNormal:Bitmap;
private var stateMouseOver:Bitmap;
public function ButtonPause()
{
stateNormal = new PauseNormal();
stateNormal.width = 29;
stateNormal.height = 14;
stateNormal.alpha = 1;
addChild(stateNormal);
stateMouseOver = new PauseMouseOver();
stateMouseOver.width = 29;
stateMouseOver.height = 14;
stateMouseOver.alpha = 0;
addChild(stateMouseOver);
width = 29;
height = 14;
addEventListener(MouseEvent.MOUSE_OVER, handleMouseOver);
addEventListener(MouseEvent.MOUSE_OUT, handleMouseOut );
}
private function handleMouseOver(evt:MouseEvent):void
{
stateNormal.alpha = 0;
stateMouseOver.alpha = 1;
}
private function handleMouseOut(evt:MouseEvent):void
{
stateNormal.alpha = 1;
stateMouseOver.alpha = 0;
}
}
}
(Both machines run the exact same Flash CS4 Profesional Version 10.0.2 installation and both have the exact same publish settings and ActionScript 3.0 settings.)
What's going on?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论