将 png 嵌入类实例变量时,Flash CS4 编译器出现错误 1120

发布于 2024-08-27 02:11:08 字数 1815 浏览 5 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文