Flash CS4 compiler Error 1120 when embedding pngs into class instance variables.
Posted
by theolagendijk
on Stack Overflow
See other posts from Stack Overflow
or by theolagendijk
Published on 2010-03-28T22:20:00Z
Indexed on
2010/03/28
22:23 UTC
Read the original article
Hit count: 347
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?
© Stack Overflow or respective owner