Sounds like you are negating the whole purpose of classes.
How about a little reengineering of the buttons. Build your single class and have multiple instances of the button on screen. Part of the class would be to load in the proper animation MC for display. Thus you have the single class that is applied to all buttons and each button has an independent animation associated with it. Or if you wanted, you could do as you listed in your first e-mail and extend a single base class and make specialized classes for each button. But again, that is sort of defeating the purpose of classes and OOP. Charles P. On 3/12/07, Andrei Thomaz <[EMAIL PROTECTED]> wrote:
hello Janis, the problem is that I don't want several instances of same symbol in the stage. Imagine a menu for the sections of a site: you have a button, with some animations, for each section. So, I cann't use several instances of a same symbol. What I want, and what it was done with AS 2, was to have a symbol for each button, and associate the symbols with the same class, what, I am afraid, it is not possible in AS 3. What I am doing is similar with the buttons in Gugga framework (you can read about the buttons in GuggaFF here, http://www.gugga.com/flashblog/) []'s andrei On 3/12/07, Janis Radins <[EMAIL PROTECTED]> wrote: > > Create simgle clas definition which holds functionality of your "selection > state" and add several instances of same class to stage > > 2007/3/11, Andrei Thomaz <[EMAIL PROTECTED]>: > > > > hello list, > > > > With AS2, I could associate the same class with several movieclips. This > > was > > useful, for example, to create buttons for a menu, when all the buttons > > were > > associated with the same class (some kind of button, that implemented > the > > 'selected' state, rollout and rollover animations, and so on). > > > > Now, I am trying to migrate the code to AS3, and I am having problems to > > share the same class with more than one movieclip. When I try to do > this, > > I > > get this error: "You must specify a unique classname to export this > > symbol". > > > > Can I make this, in some way? The only thing i can think is not very > > elegant; it would be to create empty classes for each button, like that: > > > > class MyButton extends MovieClip > > { > > // code here > > } > > > > class MyButton01 extends MyButton > > { > > // nothing > > } > > > > class MyButton02 extends MyButton > > { > > // nothing > > } > > > > > > thank you, > > andrei > > _______________________________________________ > > [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 > > > _______________________________________________ > [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 > _______________________________________________ [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
_______________________________________________ [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

