2

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?

  • Are you sure the file paths are identical between the FLA and the PNG files on both machines? – Jason Mar 29 '10 at 12:37
  • Yes all the file paths are identical on both machines. (Relative paths and absolute paths.) When I change the png paths I get meaningful compiler errors. When I corrupt the pngs I get meaningful compiler errors. When everything is right the compiler complains with the weird error 1120 "Access of undefined property". I've tried rewriting the class in several ways. Always the same compiler error. It appears as if the compiler succesfully transcodes the png and then somehow decides that it cannot "attach" it to class definition "PauseNormal". – theolagendijk Mar 29 '10 at 16:56

0 Answers0