Hi there

I am finally starting to write my code in AS2 thanks to my client asking me
to program the latest project in Flash 8.

Anyway I am up against the clock as always so do not have time to read my
"Essential Actionscript 2.0" book in order to get the first game up and
running by Monday.

Previously I wrote a "class" to manage most of my game functionality 

e.g

// *****************
// Class Constructor
// *****************

GameObject=function(){
                
        trace ("class constructor");
        this.Game_Number = 0;
}

// -------------------------------------------------------------->
// End Of Class Constructor
// -------------------------------------------------------------->
// ******************************
// Game1_Demo_Initialise Function
// ******************************

GameObject.prototype.Game1_Demo_Initialise=function(){  

                this.Game_Number = 1;   
                little_stars_mc.gotoAndStop("game" + this.Game_Number); 
                                
}

// -------------------------------------------------------------->
// End Of Game1_Demo_Initialise function
// -------------------------------------------------------------->


And the above worked just perfectly.

Anyway now I am trying to do it using AS2 here is what I am trying to do:

class classes.numberGame {

        // -----------
        // Constructor
        // -----------

        public function numberGame() {

                
                trace ("class constructor");
                var Game_Number:Number = 0;
        
        }


        

        // ----------------------
        // Initialise Game 1 Demo
        // ----------------------


        public function Initialise_Game1_Demo():Void {


                
                Game_Number = 1;
                little_stars_mc.gotoAndStop game" + Game_Number);
        }

}


I am getting the following error

There is no method with the name 'little_stars_mc'.

                        little_stars_mc.gotoAndStop("game" + Game_Number);


I presume I am doing something fundamentally wrong here so would appreciate
any advice.

Many thanks

Paul

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to