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 less strict scoping rules.

A little time spent reading some OOP books will save you hours of
frustration in the long run.  In addition to "Essential AS 2.0", you might
check out "Object-Oriented Actionscript" from New Riders.

By the way, this sort of question is probably more appropriate for the Flash
Newbie board. :)

-Adam

On 7/14/06, Paul Steven <[EMAIL PROTECTED]> wrote:


        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
_______________________________________________
Flashcoders@chattyfig.figleaf.com
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