Behalf Of Steven Sacks
| BLITZ
Sent: 17 July 2006 20:17
To: Flashcoders mailing list
Subject: RE: [Flashcoders] First attempts at wirting code in AS2
You need to declare your class variables before you use them:
class GameObject extends MovieClip {
var little_stars_mc:MovieClip;
var
You need to declare your class variables before you use them:
class GameObject extends MovieClip {
var little_stars_mc:MovieClip;
var game_number:Number;
function GameObject() {
game_number = 1;
little_stars_mc.gotoAndStop("game" + game_numb
Classes don't share scope with the main timeline. You should pass in
little_stars_mc as an argument to the Constructor when you create your
Class, then store it as a member variable so all your methods have access to
it. The fact that it worked before with AS 1.0 was merely a side-effect of
the
3 matches
Mail list logo