Re: [Flashcoders] AS3 - Missing
Very thanks to Jens and Nivesh :) On 7/7/06, Jens Halm <[EMAIL PROTECTED]> wrote: > Class names need to be unique. We will support the concept of a > base class for library symbols in the Flash 9 timeframe. These base > classes can be non-unique. Glad to hear that this will be supported. I am really surprised that so far Marcos seems to be the only one here who thinks it's essential. I think it would really be a step backwards without this feature. Maybe the example Marcos used wasn't that obvious. But if we talk about Component classes like CheckBoxes, Buttons etc., I would never want to use composition over inheritance. And in the preview release you wouldn't be able to assign a CheckBox class to more than one MovieClip. So yes, I think that feature is essential. It would also be great if that base class that you can specify is permitted to only extend Sprite and not MovieClip. Even better would be a new symbol type without a timeline for designing Sprites. Jens ___ 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 ___ 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
Re: [Flashcoders] AS3 - Missing
> Class names need to be unique. We will support the concept of a > base class for library symbols in the Flash 9 timeframe. These base > classes can be non-unique. Glad to hear that this will be supported. I am really surprised that so far Marcos seems to be the only one here who thinks it's essential. I think it would really be a step backwards without this feature. Maybe the example Marcos used wasn't that obvious. But if we talk about Component classes like CheckBoxes, Buttons etc., I would never want to use composition over inheritance. And in the preview release you wouldn't be able to assign a CheckBox class to more than one MovieClip. So yes, I think that feature is essential. It would also be great if that base class that you can specify is permitted to only extend Sprite and not MovieClip. Even better would be a new symbol type without a timeline for designing Sprites. Jens ___ 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
RE: [Flashcoders] AS3 - Missing
Hi Marcos, Class names need to be unique. We will support the concept of a base class for library symbols in the Flash 9 timeframe. These base classes can be non-unique. I replied to a similar post in the Flash 9 ActionScript 3.0 Preview forum on Adobe Labs. http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=612&threadid=1168686&enterthread=y If you have issues specific to the AS 3 Preview, feel free to you're your questions at http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=72&catid=612&entercat=y Thanks, Nivesh On 7/5/06, Marcos Neves <[EMAIL PROTECTED]> wrote: > 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. Did you do this in AS2 or via the library linkage properties? > 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. I haven't used Flash 9 alpha so I don't know Auto Generated is. If you specified the class name via library linkage properties and Flash 9 doesn't allow it, it sounds like a bug. > 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. Does the Brazil class redefine any methods of Country? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ___ 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
Re: [Flashcoders] AS3 - Missing
On 7/5/06, Chris Velevitch <[EMAIL PROTECTED]> wrote: On 7/5/06, Marcos Neves <[EMAIL PROTECTED]> wrote: > 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. Did you do this in AS2 or via the library linkage properties? Library linkage > 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. I haven't used Flash 9 alpha so I don't know Auto Generated is. If you specified the class name via library linkage properties and Flash 9 doesn't allow it, it sounds like a bug. Yes, flash 9 doesn´t allow me assign the class Country to more than one MovieClip. > 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. Does the Brazil class redefine any methods of Country? AutoGenerate works like this: If you give a Brazil name to a movieClip and don´t assign a class to it, Flash auto generate a class called Brazil wich you can do new Brazil in your code to create that movieClip. Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ___ 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 ___ 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
Re: [Flashcoders] AS3 - Missing
On 7/5/06, Marcos Neves <[EMAIL PROTECTED]> wrote: 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. Did you do this in AS2 or via the library linkage properties? 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. I haven't used Flash 9 alpha so I don't know Auto Generated is. If you specified the class name via library linkage properties and Flash 9 doesn't allow it, it sounds like a bug. 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. Does the Brazil class redefine any methods of Country? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ___ 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
Re: [Flashcoders] AS3 - Missing
This article explains in some detail what we're trying to say. http://www.javaworld.com/javaworld/jw-11-1998/jw-11-techniques-p2.html In the spirit of KISS, you could skim through most of it (but ensure you get the difference between Inheritance and Composition) then read the stuff at the end of page 2 under " Choosing between composition and inheritance". HTH On 7/5/06, Johannes Nel <[EMAIL PROTECTED]> wrote: i know exactly what the acronym means, i disagree with your idea of what is simple. On 7/5/06, Meinte van't Kruis <[EMAIL PROTECTED]> wrote: > > no I meant kiss=keep it simple stupid > > On 7/5/06, Johannes Nel <[EMAIL PROTECTED]> wrote: > > > > KISS is not inheritance over composition. KISS is the reverse. rule of > > thumb > > always compose rather than extend so that it will be simple later on to > > change things. > > > > On 7/5/06, Meinte van't Kruis <[EMAIL PROTECTED]> wrote: > > > > > > "I draw my Countrys as movieclips without classes. Then create a > > > MovieClip with a Country class and put inside each movieClip > > > (Composition). Inside Country class, I have access to the parent > > > display object using the parent property and do something like an > > > Adapter pattern." > > > > > > Ever heard of KISS ? > > > > > > > > > On 7/5/06, Marcos Neves <[EMAIL PROTECTED]> wrote: > > > > > > > > AS3 is really mature now, what is excellent! But there´s no reason > to > > > > didn´t support it. > > > > Let´s think from other point of view. > > > > Each sprite on the flash screen, is an instance of some class. Flash > > > > ide is locking together View+Behavior, so I can´t have two > differents > > > > Views with the same behavior. > > > > > > > > With Jcarlos tip, I found two ways to workaround this. But it´s > didn´t > > > > seens right to me. > > > > > > > > I draw my Countrys as movieclips without classes. Then create a > > > > MovieClip with a Country class and put inside each movieClip > > > > (Composition). Inside Country class, I have access to the parent > > > > display object using the parent property and do something like an > > > > Adapter pattern. > > > > > > > > The other solution would be put all my countrys inside a MovieClip > > > > called World, and use a World class to access each country and > assign > > > > the behavior. > > > > > > > > I´ll will upload my .fla files so you can understand. > > > > > > > > On 7/5/06, Adrian Park <[EMAIL PROTECTED]> wrote: > > > > > I'm not sure this is really a 'feature' that is missing since the > > > > problem > > > > > really boils down to OOP theory. For example, it could be argued > > that > > > it > > > > is > > > > > incorrect for the country class to extend MovieClip since a > country > > > *is > > > > not* > > > > > a MovieClip but, rather, *uses* a MovieClip for display. By this > > > > rational, > > > > > it makes more sense to extend via composition - i.e. the country > > class > > > > > simply gets a reference to a MovieClip that represents it's visual > > > > > manifestation. This way, the same class is used for many > MovieClips. > > > > > > > > > > If it was possible in AS2 and is no longer possible in AS3, I'd > hope > > > > there > > > > > is a very good reason why and I'd hope that the reason has > something > > > to > > > > do > > > > > with AS becoming a more mature language and doing things in a > better > > > > way. > > > > > > > > > > Am I wrong? > > > > > > > > > > A. > > > > > > > > > > On 7/5/06, Marcos Neves <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > You got the point. But this silly task wasn´t needed on flash 8. > > > > > > That´s the point. > > > > > > Should it be on flash 9? I don´t think so. > > > > > > Isn´t this the time to ask Adobe to include this feature? But I > > need > > > > > > help from others developers to show that this feature is > > essential. > > > > > > > > > > > > On 7/5/06, Meinte van't Kruis <[EMAIL PROTECTED]> wrote: > > > > > > > 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 flas
Re: [Flashcoders] AS3 - Missing
i know exactly what the acronym means, i disagree with your idea of what is simple. On 7/5/06, Meinte van't Kruis <[EMAIL PROTECTED]> wrote: no I meant kiss=keep it simple stupid On 7/5/06, Johannes Nel <[EMAIL PROTECTED]> wrote: > > KISS is not inheritance over composition. KISS is the reverse. rule of > thumb > always compose rather than extend so that it will be simple later on to > change things. > > On 7/5/06, Meinte van't Kruis <[EMAIL PROTECTED]> wrote: > > > > "I draw my Countrys as movieclips without classes. Then create a > > MovieClip with a Country class and put inside each movieClip > > (Composition). Inside Country class, I have access to the parent > > display object using the parent property and do something like an > > Adapter pattern." > > > > Ever heard of KISS ? > > > > > > On 7/5/06, Marcos Neves <[EMAIL PROTECTED]> wrote: > > > > > > AS3 is really mature now, what is excellent! But there´s no reason to > > > didn´t support it. > > > Let´s think from other point of view. > > > Each sprite on the flash screen, is an instance of some class. Flash > > > ide is locking together View+Behavior, so I can´t have two differents > > > Views with the same behavior. > > > > > > With Jcarlos tip, I found two ways to workaround this. But it´s didn´t > > > seens right to me. > > > > > > I draw my Countrys as movieclips without classes. Then create a > > > MovieClip with a Country class and put inside each movieClip > > > (Composition). Inside Country class, I have access to the parent > > > display object using the parent property and do something like an > > > Adapter pattern. > > > > > > The other solution would be put all my countrys inside a MovieClip > > > called World, and use a World class to access each country and assign > > > the behavior. > > > > > > I´ll will upload my .fla files so you can understand. > > > > > > On 7/5/06, Adrian Park <[EMAIL PROTECTED]> wrote: > > > > I'm not sure this is really a 'feature' that is missing since the > > > problem > > > > really boils down to OOP theory. For example, it could be argued > that > > it > > > is > > > > incorrect for the country class to extend MovieClip since a country > > *is > > > not* > > > > a MovieClip but, rather, *uses* a MovieClip for display. By this > > > rational, > > > > it makes more sense to extend via composition - i.e. the country > class > > > > simply gets a reference to a MovieClip that represents it's visual > > > > manifestation. This way, the same class is used for many MovieClips. > > > > > > > > If it was possible in AS2 and is no longer possible in AS3, I'd hope > > > there > > > > is a very good reason why and I'd hope that the reason has something > > to > > > do > > > > with AS becoming a more mature language and doing things in a better > > > way. > > > > > > > > Am I wrong? > > > > > > > > A. > > > > > > > > On 7/5/06, Marcos Neves <[EMAIL PROTECTED]> wrote: > > > > > > > > > > You got the point. But this silly task wasn´t needed on flash 8. > > > > > That´s the point. > > > > > Should it be on flash 9? I don´t think so. > > > > > Isn´t this the time to ask Adobe to include this feature? But I > need > > > > > help from others developers to show that this feature is > essential. > > > > > > > > > > On 7/5/06, Meinte van't Kruis <[EMAIL PROTECTED]> wrote: > > > > > > 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 > > > > > >
Re: [Flashcoders] AS3 - Missing
no I meant kiss=keep it simple stupid On 7/5/06, Johannes Nel <[EMAIL PROTECTED]> wrote: KISS is not inheritance over composition. KISS is the reverse. rule of thumb always compose rather than extend so that it will be simple later on to change things. On 7/5/06, Meinte van't Kruis <[EMAIL PROTECTED]> wrote: > > "I draw my Countrys as movieclips without classes. Then create a > MovieClip with a Country class and put inside each movieClip > (Composition). Inside Country class, I have access to the parent > display object using the parent property and do something like an > Adapter pattern." > > Ever heard of KISS ? > > > On 7/5/06, Marcos Neves <[EMAIL PROTECTED]> wrote: > > > > AS3 is really mature now, what is excellent! But there´s no reason to > > didn´t support it. > > Let´s think from other point of view. > > Each sprite on the flash screen, is an instance of some class. Flash > > ide is locking together View+Behavior, so I can´t have two differents > > Views with the same behavior. > > > > With Jcarlos tip, I found two ways to workaround this. But it´s didn´t > > seens right to me. > > > > I draw my Countrys as movieclips without classes. Then create a > > MovieClip with a Country class and put inside each movieClip > > (Composition). Inside Country class, I have access to the parent > > display object using the parent property and do something like an > > Adapter pattern. > > > > The other solution would be put all my countrys inside a MovieClip > > called World, and use a World class to access each country and assign > > the behavior. > > > > I´ll will upload my .fla files so you can understand. > > > > On 7/5/06, Adrian Park <[EMAIL PROTECTED]> wrote: > > > I'm not sure this is really a 'feature' that is missing since the > > problem > > > really boils down to OOP theory. For example, it could be argued that > it > > is > > > incorrect for the country class to extend MovieClip since a country > *is > > not* > > > a MovieClip but, rather, *uses* a MovieClip for display. By this > > rational, > > > it makes more sense to extend via composition - i.e. the country class > > > simply gets a reference to a MovieClip that represents it's visual > > > manifestation. This way, the same class is used for many MovieClips. > > > > > > If it was possible in AS2 and is no longer possible in AS3, I'd hope > > there > > > is a very good reason why and I'd hope that the reason has something > to > > do > > > with AS becoming a more mature language and doing things in a better > > way. > > > > > > Am I wrong? > > > > > > A. > > > > > > On 7/5/06, Marcos Neves <[EMAIL PROTECTED]> wrote: > > > > > > > > You got the point. But this silly task wasn´t needed on flash 8. > > > > That´s the point. > > > > Should it be on flash 9? I don´t think so. > > > > Isn´t this the time to ask Adobe to include this feature? But I need > > > > help from others developers to show that this feature is essential. > > > > > > > > On 7/5/06, Meinte van't Kruis <[EMAIL PROTECTED]> wrote: > > > > > 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. > >
Re: [Flashcoders] AS3 - Missing
KISS is not inheritance over composition. KISS is the reverse. rule of thumb always compose rather than extend so that it will be simple later on to change things. On 7/5/06, Meinte van't Kruis <[EMAIL PROTECTED]> wrote: "I draw my Countrys as movieclips without classes. Then create a MovieClip with a Country class and put inside each movieClip (Composition). Inside Country class, I have access to the parent display object using the parent property and do something like an Adapter pattern." Ever heard of KISS ? On 7/5/06, Marcos Neves <[EMAIL PROTECTED]> wrote: > > AS3 is really mature now, what is excellent! But there´s no reason to > didn´t support it. > Let´s think from other point of view. > Each sprite on the flash screen, is an instance of some class. Flash > ide is locking together View+Behavior, so I can´t have two differents > Views with the same behavior. > > With Jcarlos tip, I found two ways to workaround this. But it´s didn´t > seens right to me. > > I draw my Countrys as movieclips without classes. Then create a > MovieClip with a Country class and put inside each movieClip > (Composition). Inside Country class, I have access to the parent > display object using the parent property and do something like an > Adapter pattern. > > The other solution would be put all my countrys inside a MovieClip > called World, and use a World class to access each country and assign > the behavior. > > I´ll will upload my .fla files so you can understand. > > On 7/5/06, Adrian Park <[EMAIL PROTECTED]> wrote: > > I'm not sure this is really a 'feature' that is missing since the > problem > > really boils down to OOP theory. For example, it could be argued that it > is > > incorrect for the country class to extend MovieClip since a country *is > not* > > a MovieClip but, rather, *uses* a MovieClip for display. By this > rational, > > it makes more sense to extend via composition - i.e. the country class > > simply gets a reference to a MovieClip that represents it's visual > > manifestation. This way, the same class is used for many MovieClips. > > > > If it was possible in AS2 and is no longer possible in AS3, I'd hope > there > > is a very good reason why and I'd hope that the reason has something to > do > > with AS becoming a more mature language and doing things in a better > way. > > > > Am I wrong? > > > > A. > > > > On 7/5/06, Marcos Neves <[EMAIL PROTECTED]> wrote: > > > > > > You got the point. But this silly task wasn´t needed on flash 8. > > > That´s the point. > > > Should it be on flash 9? I don´t think so. > > > Isn´t this the time to ask Adobe to include this feature? But I need > > > help from others developers to show that this feature is essential. > > > > > > On 7/5/06, Meinte van't Kruis <[EMAIL PROTECTED]> wrote: > > > > 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. > > > > > ___ > > > > > 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 Consu
Re: [Flashcoders] AS3 - Missing
"I draw my Countrys as movieclips without classes. Then create a MovieClip with a Country class and put inside each movieClip (Composition). Inside Country class, I have access to the parent display object using the parent property and do something like an Adapter pattern." Ever heard of KISS ? On 7/5/06, Marcos Neves <[EMAIL PROTECTED]> wrote: AS3 is really mature now, what is excellent! But there´s no reason to didn´t support it. Let´s think from other point of view. Each sprite on the flash screen, is an instance of some class. Flash ide is locking together View+Behavior, so I can´t have two differents Views with the same behavior. With Jcarlos tip, I found two ways to workaround this. But it´s didn´t seens right to me. I draw my Countrys as movieclips without classes. Then create a MovieClip with a Country class and put inside each movieClip (Composition). Inside Country class, I have access to the parent display object using the parent property and do something like an Adapter pattern. The other solution would be put all my countrys inside a MovieClip called World, and use a World class to access each country and assign the behavior. I´ll will upload my .fla files so you can understand. On 7/5/06, Adrian Park <[EMAIL PROTECTED]> wrote: > I'm not sure this is really a 'feature' that is missing since the problem > really boils down to OOP theory. For example, it could be argued that it is > incorrect for the country class to extend MovieClip since a country *is not* > a MovieClip but, rather, *uses* a MovieClip for display. By this rational, > it makes more sense to extend via composition - i.e. the country class > simply gets a reference to a MovieClip that represents it's visual > manifestation. This way, the same class is used for many MovieClips. > > If it was possible in AS2 and is no longer possible in AS3, I'd hope there > is a very good reason why and I'd hope that the reason has something to do > with AS becoming a more mature language and doing things in a better way. > > Am I wrong? > > A. > > On 7/5/06, Marcos Neves <[EMAIL PROTECTED]> wrote: > > > > You got the point. But this silly task wasn´t needed on flash 8. > > That´s the point. > > Should it be on flash 9? I don´t think so. > > Isn´t this the time to ask Adobe to include this feature? But I need > > help from others developers to show that this feature is essential. > > > > On 7/5/06, Meinte van't Kruis <[EMAIL PROTECTED]> wrote: > > > 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. > > > > ___ > > > > 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 > > > > > > > ___ > > > 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.
Re: [Flashcoders] AS3 - Missing
AS3 is really mature now, what is excellent! But there´s no reason to didn´t support it. Let´s think from other point of view. Each sprite on the flash screen, is an instance of some class. Flash ide is locking together View+Behavior, so I can´t have two differents Views with the same behavior. With Jcarlos tip, I found two ways to workaround this. But it´s didn´t seens right to me. I draw my Countrys as movieclips without classes. Then create a MovieClip with a Country class and put inside each movieClip (Composition). Inside Country class, I have access to the parent display object using the parent property and do something like an Adapter pattern. The other solution would be put all my countrys inside a MovieClip called World, and use a World class to access each country and assign the behavior. I´ll will upload my .fla files so you can understand. On 7/5/06, Adrian Park <[EMAIL PROTECTED]> wrote: I'm not sure this is really a 'feature' that is missing since the problem really boils down to OOP theory. For example, it could be argued that it is incorrect for the country class to extend MovieClip since a country *is not* a MovieClip but, rather, *uses* a MovieClip for display. By this rational, it makes more sense to extend via composition - i.e. the country class simply gets a reference to a MovieClip that represents it's visual manifestation. This way, the same class is used for many MovieClips. If it was possible in AS2 and is no longer possible in AS3, I'd hope there is a very good reason why and I'd hope that the reason has something to do with AS becoming a more mature language and doing things in a better way. Am I wrong? A. On 7/5/06, Marcos Neves <[EMAIL PROTECTED]> wrote: > > You got the point. But this silly task wasn´t needed on flash 8. > That´s the point. > Should it be on flash 9? I don´t think so. > Isn´t this the time to ask Adobe to include this feature? But I need > help from others developers to show that this feature is essential. > > On 7/5/06, Meinte van't Kruis <[EMAIL PROTECTED]> wrote: > > 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. > > > ___ > > > 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 > > > > > ___ > > 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 > > > ___ > 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 > ___ Flashcoders@chattyfig.figleaf.com To change your subscri
Re: [Flashcoders] AS3 - Missing
Look at this flash http://adi.idr.org.br/tpl/adi/mapa.tpl.php Did you see that every movieClips have different shapes, but the same behavior. Your suggestion is to drag a Country MovieClip inside each Country and use it to take control of the parent clip? On 7/5/06, jcarlos <[EMAIL PROTECTED]> wrote: 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" 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. > ___ > 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 > ___ 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 ___ 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 ___ 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
Re: [Flashcoders] AS3 - Missing
I'm not sure this is really a 'feature' that is missing since the problem really boils down to OOP theory. For example, it could be argued that it is incorrect for the country class to extend MovieClip since a country *is not* a MovieClip but, rather, *uses* a MovieClip for display. By this rational, it makes more sense to extend via composition - i.e. the country class simply gets a reference to a MovieClip that represents it's visual manifestation. This way, the same class is used for many MovieClips. If it was possible in AS2 and is no longer possible in AS3, I'd hope there is a very good reason why and I'd hope that the reason has something to do with AS becoming a more mature language and doing things in a better way. Am I wrong? A. On 7/5/06, Marcos Neves <[EMAIL PROTECTED]> wrote: You got the point. But this silly task wasn´t needed on flash 8. That´s the point. Should it be on flash 9? I don´t think so. Isn´t this the time to ask Adobe to include this feature? But I need help from others developers to show that this feature is essential. On 7/5/06, Meinte van't Kruis <[EMAIL PROTECTED]> wrote: > 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. > > ___ > > 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 > > > ___ > 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 > ___ 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 ___ 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
Re: [Flashcoders] AS3 - Missing
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" 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. ___ 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 ___ 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 ___ 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
Re: [Flashcoders] AS3 - Missing
You got the point. But this silly task wasn´t needed on flash 8. That´s the point. Should it be on flash 9? I don´t think so. Isn´t this the time to ask Adobe to include this feature? But I need help from others developers to show that this feature is essential. On 7/5/06, Meinte van't Kruis <[EMAIL PROTECTED]> wrote: 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. > ___ > 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 > ___ 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 ___ 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
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. ___ 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 ___ 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