But wouldn´t be easier to have composition over extension ?
if you have one generic class that has the country movieclip like an
property of this class
class Country
{
var mcCountry: MovieClip;
var nameCountry:String;
function Country( mc: MovieClip, name:String)
{
..........................
......................
}
}
----- Original Message -----
From: "Meinte van't Kruis" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Wednesday, July 05, 2006 8:17 AM
Subject: Re: [Flashcoders] AS3 - Missing
I'm not sure if it's entirely impossible to assign one class to multiple
movieclips, but if that's true than the easiest way to overcome that problem
is make a baseclass 'Country' and have Brazil extends Country.
You still have the silly task of assigning all your countries to a
different class, but at least your code will be easy to manage.
good luck
-Meinte
On 7/4/06, Marcos Neves <[EMAIL PROTECTED]> wrote:
Is this the place to talk about AS3? If not, where would be?
The concept of any movieClip be a class is very powerfull, given the
ability to do new ClassName to create a copy of any clip. But the Auto
Generated class and the fact that you can´t have two movieclips with
the same class is something that is limiting flash capabilities.
Example:
I have a A world map where each country is a movieclip. And every one
will have the same behavior. Before flash 9, what I did is assign a
class called Country to each movie clip. This way, I can easy update
the behavior of all at the same time.
With Flash 9, I can´t assign a class with the same name and can´t
specify a base class to the Auto Generated extends.
My suggestion is to do something like this:
http://neves.bs2.com.br/flex/preview.jpg
When ask for AutoGenerate, a check box would enable an different base
class, and I would write on the textbox. So a movieClip called Brazil,
would have a autoGenerated class called Brazil that extends the class
Country, witch would be my base class.
I´m shure no one can deny that this feature is essential.
_______________________________________________
[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