I’ve build a flash FLA project which has the class “MyGame” as its document class which all works great.
Now I want to make a slightly different version of it with a few bits of extra functionality, so I’ve got a new FLA, and want it to use an extended version of MyGame as its document class, let’s say it’s called “MySlightlyDifferentGame”.
So the code for MySlightlyDifferentGame looks like this…
package {
import flash.display.*;
public class MySlightlyDifferentGame extends MyGame {
public function MySlightlyDifferentGame(){
super();
// stuff here...
}
}
}
Trouble is, MyGame is now not recognising any objects on the stage of the FLA any more (they’re all in the same place as they were in the original).
So for example I have a button on the first frame called “play_btn”, and when myGame tries to reference it, I get:
1120: Access of undefined property play_btn.
Any ideas???