Re: [Flashcoders] Custom MovieClip Classes
Beginners should not be coding AS3. It's really that simple. AS3 requires a whole new level of strict coding practices and is not for beginners. Null pointer exceptions are extremely important to catch because they can cause a Flash app to crash, and the foresight to know where and how those will trip you up requires a lot of coding experience. I've been programming over 13 years and I still get caught by the occasional null pointer. You have to cast everything in AS3 anyway, and understanding why you have to cast requires understanding of OOP and strict coding practices. AS3 is very strict. It's not for everyone, in fact, it's not for most people. There's a reason that AS2 won't be going anywhere for awhile, and it's because it's forgiving and fails gracefully and both non-programmers and lazy programmers appreciate that. I know I miss it sometimes. Writing try catches with nothing in the catch in order to fail gracefully is hacky, but when I've got a deadline looming, I'm glad it's there because there's no way I'm going back to AS2 again. ;) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Custom MovieClip Classes
Here's another reason why I found using that setting to be troublesome. I haven't confirmed it but I believe it interferes with inheritance. For example, let's say I make a symbolA and link it to class SuperClass. Inside symbolA I have a TextField called _txt Then I make a symbolB based on symbolA, and maybe I change something visual but it also has a TextField called _txt Finally, I link symbolB to a class SubClass and then create an as file for that class and in it I declare SubClass extends SuperClass. So my belief is that, because Flash is not smart enough to omit the declaration of the _txt in SymbolB, you'll get the following error: 1152: A conflict exists with inherited definition test:SuperClass._txt in namespace public. There doesn't seem to be a way around this, short of naming it something different in symbolB, which may defeat some of your reasoning for using inheritance. When I discovered this, that was the moment I abandoned the setting for good. For a while, it seemed like a nice feature that resembled code-behind/markup pairings seen in other frameworks like WPF. Nope! -jonathan On Mon, Mar 24, 2008 at 3:02 AM, Steven Sacks [EMAIL PROTECTED] wrote: Beginners should not be coding AS3. It's really that simple. AS3 requires a whole new level of strict coding practices and is not for beginners. Null pointer exceptions are extremely important to catch because they can cause a Flash app to crash, and the foresight to know where and how those will trip you up requires a lot of coding experience. I've been programming over 13 years and I still get caught by the occasional null pointer. You have to cast everything in AS3 anyway, and understanding why you have to cast requires understanding of OOP and strict coding practices. AS3 is very strict. It's not for everyone, in fact, it's not for most people. There's a reason that AS2 won't be going anywhere for awhile, and it's because it's forgiving and fails gracefully and both non-programmers and lazy programmers appreciate that. I know I miss it sometimes. Writing try catches with nothing in the catch in order to fail gracefully is hacky, but when I've got a deadline looming, I'm glad it's there because there's no way I'm going back to AS2 again. ;) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Custom MovieClip Classes
Yeah, and than the cash from Flash is flushed. I also had some issues with this and noticed when restarting Flash (or rebooting system for that matter) it worked fine. So now when I experience odd behavior, I restart Flash. -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 16:15 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Nope. Just Restarted Flash. On Sat, Mar 22, 2008 at 4:13 PM, Cor [EMAIL PROTECTED] wrote: Cleared the cash?? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 14:56 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Hey!!! It worked Now I can Extend the APanel Class.. But how come? I changed Nothing(??) On Sat, Mar 22, 2008 at 12:52 PM, jonathan howe [EMAIL PROTECTED] wrote: Seems like the most important part is when Muzak wrote this: Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip I have found these two settings a little confusing. For example, creating a simple code behind class, when I first started working with Flash, I stumbled into this format: class RegistrationPanel base class: amlak.ui.RegistrationPanel This actually seemed to work. What is the difference behind-the-scenes? In hindsight, this must be creating a duplicate class RegistrationPanel in the global namespace that inherits from the subclass of the same name, right? On Sat, Mar 22, 2008 at 6:23 AM, Muzak [EMAIL PROTECTED] wrote: Works fine here: package amlak.ui { import flash.display.MovieClip; public class APanel extends MovieClip { public function APanel() { trace(APanel ::: CONSTRUCTOR); } } } package amlak.ui { import flash.display.MovieClip; import amlak.ui.APanel; public class RegistrationPanel extends APanel { public function RegistrationPanel() { trace(RegistrationPanel ::: CONSTRUCTOR); } } } Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip regards, Muzak - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, March 22, 2008 2:09 AM Subject: Re: [Flashcoders] Custom MovieClip Classes Nope look at this. package amlak.ui { import flash.text.*; import flash.display.MovieClip; public class RegistrationPanel extends APanel { public function RegistrationPanel(){ } } } 5000: The class 'amlak.ui.RegistrationPanel' must subclass ' flash.display.MovieClip' since it is linked to a library symbol of that type. I thought that RegistrationPanel would inherit also MovieClip since APanal does. But same Error. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1338 - Release Date: 21-3-2008 17:52 No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1338 - Release Date: 21-3-2008 17:52 No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1338 - Release Date: 21-3-2008 17:52 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended
RE: [Flashcoders] Custom MovieClip Classes
I also use Document Class and use FlashDevelop to write my Actionscript I use Flash for compiling but you also could you the Flex SDK. You should check out FlahDevelop, it has a very nice auto-completion!! Be sure to download the latest version and look at the shortcut possibilities. -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 16:16 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Note: I am working with Flash and Document Class. Classes are written in Flex (Actionscript Project). Flash AS Editor Is not that good. On Sat, Mar 22, 2008 at 5:14 PM, Omar Fouad [EMAIL PROTECTED] wrote: Nope. Just Restarted Flash. On Sat, Mar 22, 2008 at 4:13 PM, Cor [EMAIL PROTECTED] wrote: Cleared the cash?? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 14:56 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Hey!!! It worked Now I can Extend the APanel Class.. But how come? I changed Nothing(??) On Sat, Mar 22, 2008 at 12:52 PM, jonathan howe [EMAIL PROTECTED] wrote: Seems like the most important part is when Muzak wrote this: Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip I have found these two settings a little confusing. For example, creating a simple code behind class, when I first started working with Flash, I stumbled into this format: class RegistrationPanel base class: amlak.ui.RegistrationPanel This actually seemed to work. What is the difference behind-the-scenes? In hindsight, this must be creating a duplicate class RegistrationPanel in the global namespace that inherits from the subclass of the same name, right? On Sat, Mar 22, 2008 at 6:23 AM, Muzak [EMAIL PROTECTED] wrote: Works fine here: package amlak.ui { import flash.display.MovieClip; public class APanel extends MovieClip { public function APanel() { trace(APanel ::: CONSTRUCTOR); } } } package amlak.ui { import flash.display.MovieClip; import amlak.ui.APanel; public class RegistrationPanel extends APanel { public function RegistrationPanel() { trace(RegistrationPanel ::: CONSTRUCTOR); } } } Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip regards, Muzak - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, March 22, 2008 2:09 AM Subject: Re: [Flashcoders] Custom MovieClip Classes Nope look at this. package amlak.ui { import flash.text.*; import flash.display.MovieClip; public class RegistrationPanel extends APanel { public function RegistrationPanel(){ } } } 5000: The class 'amlak.ui.RegistrationPanel' must subclass ' flash.display.MovieClip' since it is linked to a library symbol of that type. I thought that RegistrationPanel would inherit also MovieClip since APanal does. But same Error. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1338 - Release Date: 21-3-2008 17:52 No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1338 - Release Date: 21-3-2008 17:52 No virus found
Re: [Flashcoders] Custom MovieClip Classes
yeah I know flash Develop. But I feel More Confortable with Flex. I used to use FlashDevelop and I got the Beta 6 version of it. 1 Issue though, In flex, when I use a Class that is associated to a movieClip in the FLA library, and in this movieClip there are some components like text fields and Other movieClips, and I mention them into the class in flex, flex does not recognize them. for example I have the MovieClip MC with inside a button in the fla, and Its linkage is Class: MC so public class MC extends MovieClip { public function MC() { myButton.addEventListener(MouseEvent.CLICK, fun); // Flex says that myButton is unidentified. } } But The FLA compiles anyways without any problems. I just feel unconfortable when coding beside red warnings in flex. is there some settings I can set to fix this? Thanks vy much. On Sun, Mar 23, 2008 at 10:47 AM, Cor [EMAIL PROTECTED] wrote: I also use Document Class and use FlashDevelop to write my Actionscript I use Flash for compiling but you also could you the Flex SDK. You should check out FlahDevelop, it has a very nice auto-completion!! Be sure to download the latest version and look at the shortcut possibilities. -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 16:16 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Note: I am working with Flash and Document Class. Classes are written in Flex (Actionscript Project). Flash AS Editor Is not that good. On Sat, Mar 22, 2008 at 5:14 PM, Omar Fouad [EMAIL PROTECTED] wrote: Nope. Just Restarted Flash. On Sat, Mar 22, 2008 at 4:13 PM, Cor [EMAIL PROTECTED] wrote: Cleared the cash?? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 14:56 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Hey!!! It worked Now I can Extend the APanel Class.. But how come? I changed Nothing(??) On Sat, Mar 22, 2008 at 12:52 PM, jonathan howe [EMAIL PROTECTED] wrote: Seems like the most important part is when Muzak wrote this: Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip I have found these two settings a little confusing. For example, creating a simple code behind class, when I first started working with Flash, I stumbled into this format: class RegistrationPanel base class: amlak.ui.RegistrationPanel This actually seemed to work. What is the difference behind-the-scenes? In hindsight, this must be creating a duplicate class RegistrationPanel in the global namespace that inherits from the subclass of the same name, right? On Sat, Mar 22, 2008 at 6:23 AM, Muzak [EMAIL PROTECTED] wrote: Works fine here: package amlak.ui { import flash.display.MovieClip; public class APanel extends MovieClip { public function APanel() { trace(APanel ::: CONSTRUCTOR); } } } package amlak.ui { import flash.display.MovieClip; import amlak.ui.APanel; public class RegistrationPanel extends APanel { public function RegistrationPanel() { trace(RegistrationPanel ::: CONSTRUCTOR); } } } Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip regards, Muzak - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, March 22, 2008 2:09 AM Subject: Re: [Flashcoders] Custom MovieClip Classes Nope look at this. package amlak.ui { import flash.text.*; import flash.display.MovieClip; public class RegistrationPanel extends APanel { public function RegistrationPanel(){ } } } 5000: The class 'amlak.ui.RegistrationPanel' must subclass ' flash.display.MovieClip' since it is linked to a library symbol of that type. I thought that RegistrationPanel would inherit also MovieClip since APanal does. But same Error. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman
RE: [Flashcoders] Custom MovieClip Classes
Have you installed the Flex SDK? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zondag 23 maart 2008 13:28 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes yeah I know flash Develop. But I feel More Confortable with Flex. I used to use FlashDevelop and I got the Beta 6 version of it. 1 Issue though, In flex, when I use a Class that is associated to a movieClip in the FLA library, and in this movieClip there are some components like text fields and Other movieClips, and I mention them into the class in flex, flex does not recognize them. for example I have the MovieClip MC with inside a button in the fla, and Its linkage is Class: MC so public class MC extends MovieClip { public function MC() { myButton.addEventListener(MouseEvent.CLICK, fun); // Flex says that myButton is unidentified. } } But The FLA compiles anyways without any problems. I just feel unconfortable when coding beside red warnings in flex. is there some settings I can set to fix this? Thanks vy much. On Sun, Mar 23, 2008 at 10:47 AM, Cor [EMAIL PROTECTED] wrote: I also use Document Class and use FlashDevelop to write my Actionscript I use Flash for compiling but you also could you the Flex SDK. You should check out FlahDevelop, it has a very nice auto-completion!! Be sure to download the latest version and look at the shortcut possibilities. -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 16:16 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Note: I am working with Flash and Document Class. Classes are written in Flex (Actionscript Project). Flash AS Editor Is not that good. On Sat, Mar 22, 2008 at 5:14 PM, Omar Fouad [EMAIL PROTECTED] wrote: Nope. Just Restarted Flash. On Sat, Mar 22, 2008 at 4:13 PM, Cor [EMAIL PROTECTED] wrote: Cleared the cash?? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 14:56 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Hey!!! It worked Now I can Extend the APanel Class.. But how come? I changed Nothing(??) On Sat, Mar 22, 2008 at 12:52 PM, jonathan howe [EMAIL PROTECTED] wrote: Seems like the most important part is when Muzak wrote this: Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip I have found these two settings a little confusing. For example, creating a simple code behind class, when I first started working with Flash, I stumbled into this format: class RegistrationPanel base class: amlak.ui.RegistrationPanel This actually seemed to work. What is the difference behind-the-scenes? In hindsight, this must be creating a duplicate class RegistrationPanel in the global namespace that inherits from the subclass of the same name, right? On Sat, Mar 22, 2008 at 6:23 AM, Muzak [EMAIL PROTECTED] wrote: Works fine here: package amlak.ui { import flash.display.MovieClip; public class APanel extends MovieClip { public function APanel() { trace(APanel ::: CONSTRUCTOR); } } } package amlak.ui { import flash.display.MovieClip; import amlak.ui.APanel; public class RegistrationPanel extends APanel { public function RegistrationPanel() { trace(RegistrationPanel ::: CONSTRUCTOR); } } } Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip regards, Muzak - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, March 22, 2008 2:09 AM Subject: Re: [Flashcoders] Custom MovieClip Classes Nope look at this. package amlak.ui { import flash.text.*; import flash.display.MovieClip; public class RegistrationPanel extends APanel { public function RegistrationPanel(){ } } } 5000: The class 'amlak.ui.RegistrationPanel' must subclass ' flash.display.MovieClip' since it is linked to a library symbol of that type. I thought that RegistrationPanel would inherit also MovieClip since APanal does. But same Error. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo
Re: [Flashcoders] Custom MovieClip Classes
Cor i AM USING Flex 3 Final. And one thing I am trying now a AS3 document class projct with FlasDevelop. I created a FLA new Project in FD and I wrote the Main Document class. But FD is not checking errors. it says error while running AS3 syntax checking... On Sun, Mar 23, 2008 at 2:33 PM, Cor [EMAIL PROTECTED] wrote: Have you installed the Flex SDK? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zondag 23 maart 2008 13:28 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes yeah I know flash Develop. But I feel More Confortable with Flex. I used to use FlashDevelop and I got the Beta 6 version of it. 1 Issue though, In flex, when I use a Class that is associated to a movieClip in the FLA library, and in this movieClip there are some components like text fields and Other movieClips, and I mention them into the class in flex, flex does not recognize them. for example I have the MovieClip MC with inside a button in the fla, and Its linkage is Class: MC so public class MC extends MovieClip { public function MC() { myButton.addEventListener(MouseEvent.CLICK, fun); // Flex says that myButton is unidentified. } } But The FLA compiles anyways without any problems. I just feel unconfortable when coding beside red warnings in flex. is there some settings I can set to fix this? Thanks vy much. On Sun, Mar 23, 2008 at 10:47 AM, Cor [EMAIL PROTECTED] wrote: I also use Document Class and use FlashDevelop to write my Actionscript I use Flash for compiling but you also could you the Flex SDK. You should check out FlahDevelop, it has a very nice auto-completion!! Be sure to download the latest version and look at the shortcut possibilities. -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 16:16 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Note: I am working with Flash and Document Class. Classes are written in Flex (Actionscript Project). Flash AS Editor Is not that good. On Sat, Mar 22, 2008 at 5:14 PM, Omar Fouad [EMAIL PROTECTED] wrote: Nope. Just Restarted Flash. On Sat, Mar 22, 2008 at 4:13 PM, Cor [EMAIL PROTECTED] wrote: Cleared the cash?? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 14:56 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Hey!!! It worked Now I can Extend the APanel Class.. But how come? I changed Nothing(??) On Sat, Mar 22, 2008 at 12:52 PM, jonathan howe [EMAIL PROTECTED] wrote: Seems like the most important part is when Muzak wrote this: Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip I have found these two settings a little confusing. For example, creating a simple code behind class, when I first started working with Flash, I stumbled into this format: class RegistrationPanel base class: amlak.ui.RegistrationPanel This actually seemed to work. What is the difference behind-the-scenes? In hindsight, this must be creating a duplicate class RegistrationPanel in the global namespace that inherits from the subclass of the same name, right? On Sat, Mar 22, 2008 at 6:23 AM, Muzak [EMAIL PROTECTED] wrote: Works fine here: package amlak.ui { import flash.display.MovieClip; public class APanel extends MovieClip { public function APanel() { trace(APanel ::: CONSTRUCTOR); } } } package amlak.ui { import flash.display.MovieClip; import amlak.ui.APanel; public class RegistrationPanel extends APanel { public function RegistrationPanel() { trace(RegistrationPanel ::: CONSTRUCTOR); } } } Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip regards, Muzak - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, March 22, 2008 2:09 AM Subject: Re: [Flashcoders] Custom MovieClip Classes Nope look at this. package amlak.ui { import flash.text.*; import flash.display.MovieClip; public class RegistrationPanel extends APanel { public function RegistrationPanel(){ } } } 5000: The class
RE: [Flashcoders] Custom MovieClip Classes
If you give me some details I will setup a FD project for you. Or I can create a generic example if you like? Let me know -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zondag 23 maart 2008 13:45 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Cor i AM USING Flex 3 Final. And one thing I am trying now a AS3 document class projct with FlasDevelop. I created a FLA new Project in FD and I wrote the Main Document class. But FD is not checking errors. it says error while running AS3 syntax checking... On Sun, Mar 23, 2008 at 2:33 PM, Cor [EMAIL PROTECTED] wrote: Have you installed the Flex SDK? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zondag 23 maart 2008 13:28 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes yeah I know flash Develop. But I feel More Confortable with Flex. I used to use FlashDevelop and I got the Beta 6 version of it. 1 Issue though, In flex, when I use a Class that is associated to a movieClip in the FLA library, and in this movieClip there are some components like text fields and Other movieClips, and I mention them into the class in flex, flex does not recognize them. for example I have the MovieClip MC with inside a button in the fla, and Its linkage is Class: MC so public class MC extends MovieClip { public function MC() { myButton.addEventListener(MouseEvent.CLICK, fun); // Flex says that myButton is unidentified. } } But The FLA compiles anyways without any problems. I just feel unconfortable when coding beside red warnings in flex. is there some settings I can set to fix this? Thanks vy much. On Sun, Mar 23, 2008 at 10:47 AM, Cor [EMAIL PROTECTED] wrote: I also use Document Class and use FlashDevelop to write my Actionscript I use Flash for compiling but you also could you the Flex SDK. You should check out FlahDevelop, it has a very nice auto-completion!! Be sure to download the latest version and look at the shortcut possibilities. -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 16:16 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Note: I am working with Flash and Document Class. Classes are written in Flex (Actionscript Project). Flash AS Editor Is not that good. On Sat, Mar 22, 2008 at 5:14 PM, Omar Fouad [EMAIL PROTECTED] wrote: Nope. Just Restarted Flash. On Sat, Mar 22, 2008 at 4:13 PM, Cor [EMAIL PROTECTED] wrote: Cleared the cash?? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 14:56 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Hey!!! It worked Now I can Extend the APanel Class.. But how come? I changed Nothing(??) On Sat, Mar 22, 2008 at 12:52 PM, jonathan howe [EMAIL PROTECTED] wrote: Seems like the most important part is when Muzak wrote this: Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip I have found these two settings a little confusing. For example, creating a simple code behind class, when I first started working with Flash, I stumbled into this format: class RegistrationPanel base class: amlak.ui.RegistrationPanel This actually seemed to work. What is the difference behind-the-scenes? In hindsight, this must be creating a duplicate class RegistrationPanel in the global namespace that inherits from the subclass of the same name, right? On Sat, Mar 22, 2008 at 6:23 AM, Muzak [EMAIL PROTECTED] wrote: Works fine here: package amlak.ui { import flash.display.MovieClip; public class APanel extends MovieClip { public function APanel() { trace(APanel ::: CONSTRUCTOR); } } } package amlak.ui { import flash.display.MovieClip; import amlak.ui.APanel; public class RegistrationPanel extends APanel { public function RegistrationPanel() { trace(RegistrationPanel ::: CONSTRUCTOR); } } } Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip regards, Muzak - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, March 22, 2008 2:09 AM Subject: Re: [Flashcoders] Custom MovieClip
RE: [Flashcoders] Custom MovieClip Classes
you have to set your class path in FD -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zondag 23 maart 2008 13:45 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Cor i AM USING Flex 3 Final. And one thing I am trying now a AS3 document class projct with FlasDevelop. I created a FLA new Project in FD and I wrote the Main Document class. But FD is not checking errors. it says error while running AS3 syntax checking... On Sun, Mar 23, 2008 at 2:33 PM, Cor [EMAIL PROTECTED] wrote: Have you installed the Flex SDK? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zondag 23 maart 2008 13:28 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes yeah I know flash Develop. But I feel More Confortable with Flex. I used to use FlashDevelop and I got the Beta 6 version of it. 1 Issue though, In flex, when I use a Class that is associated to a movieClip in the FLA library, and in this movieClip there are some components like text fields and Other movieClips, and I mention them into the class in flex, flex does not recognize them. for example I have the MovieClip MC with inside a button in the fla, and Its linkage is Class: MC so public class MC extends MovieClip { public function MC() { myButton.addEventListener(MouseEvent.CLICK, fun); // Flex says that myButton is unidentified. } } But The FLA compiles anyways without any problems. I just feel unconfortable when coding beside red warnings in flex. is there some settings I can set to fix this? Thanks vy much. On Sun, Mar 23, 2008 at 10:47 AM, Cor [EMAIL PROTECTED] wrote: I also use Document Class and use FlashDevelop to write my Actionscript I use Flash for compiling but you also could you the Flex SDK. You should check out FlahDevelop, it has a very nice auto-completion!! Be sure to download the latest version and look at the shortcut possibilities. -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 16:16 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Note: I am working with Flash and Document Class. Classes are written in Flex (Actionscript Project). Flash AS Editor Is not that good. On Sat, Mar 22, 2008 at 5:14 PM, Omar Fouad [EMAIL PROTECTED] wrote: Nope. Just Restarted Flash. On Sat, Mar 22, 2008 at 4:13 PM, Cor [EMAIL PROTECTED] wrote: Cleared the cash?? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 14:56 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Hey!!! It worked Now I can Extend the APanel Class.. But how come? I changed Nothing(??) On Sat, Mar 22, 2008 at 12:52 PM, jonathan howe [EMAIL PROTECTED] wrote: Seems like the most important part is when Muzak wrote this: Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip I have found these two settings a little confusing. For example, creating a simple code behind class, when I first started working with Flash, I stumbled into this format: class RegistrationPanel base class: amlak.ui.RegistrationPanel This actually seemed to work. What is the difference behind-the-scenes? In hindsight, this must be creating a duplicate class RegistrationPanel in the global namespace that inherits from the subclass of the same name, right? On Sat, Mar 22, 2008 at 6:23 AM, Muzak [EMAIL PROTECTED] wrote: Works fine here: package amlak.ui { import flash.display.MovieClip; public class APanel extends MovieClip { public function APanel() { trace(APanel ::: CONSTRUCTOR); } } } package amlak.ui { import flash.display.MovieClip; import amlak.ui.APanel; public class RegistrationPanel extends APanel { public function RegistrationPanel() { trace(RegistrationPanel ::: CONSTRUCTOR); } } } Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip regards, Muzak - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, March 22, 2008 2:09 AM Subject: Re: [Flashcoders] Custom MovieClip Classes Nope look at this. package amlak.ui
Re: [Flashcoders] Custom MovieClip Classes
The issue is that in Flash you are using the terrible awful why-did-Adobe-put-it-in-there publish option of Automatically Declare Stage Instances. It's the worst thing in the world and causes many people headaches. Turn it off. It's the dumbest thing Adobe could have ever made. SHIFT+F12, click on the AS version Settings button, and deselect Automatically Declare Stage Instances. Always always ALWAYS declare your stage instances in your classes. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Custom MovieClip Classes
Just guessing, but I think it's required for the Flex Component Kit, when you create swc's to be used in Flex. Haven't really looked into it in much detail, but so far couldn't get swc's to work if Declare... was disabled. Other than that, I totally agree, most annoying feature ever. - Original Message - From: Steven Sacks [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Sunday, March 23, 2008 11:03 PM Subject: Re: [Flashcoders] Custom MovieClip Classes The issue is that in Flash you are using the terrible awful why-did-Adobe-put-it-in-there publish option of Automatically Declare Stage Instances. It's the worst thing in the world and causes many people headaches. Turn it off. It's the dumbest thing Adobe could have ever made. SHIFT+F12, click on the AS version Settings button, and deselect Automatically Declare Stage Instances. Always always ALWAYS declare your stage instances in your classes. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Custom MovieClip Classes
Yeah, But WHY I have to Always Declare them By Myself? On Mon, Mar 24, 2008 at 1:31 AM, Muzak [EMAIL PROTECTED] wrote: Just guessing, but I think it's required for the Flex Component Kit, when you create swc's to be used in Flex. Haven't really looked into it in much detail, but so far couldn't get swc's to work if Declare... was disabled. Other than that, I totally agree, most annoying feature ever. - Original Message - From: Steven Sacks [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Sunday, March 23, 2008 11:03 PM Subject: Re: [Flashcoders] Custom MovieClip Classes The issue is that in Flash you are using the terrible awful why-did-Adobe-put-it-in-there publish option of Automatically Declare Stage Instances. It's the worst thing in the world and causes many people headaches. Turn it off. It's the dumbest thing Adobe could have ever made. SHIFT+F12, click on the AS version Settings button, and deselect Automatically Declare Stage Instances. Always always ALWAYS declare your stage instances in your classes. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Custom MovieClip Classes
The other thing is that not everyone is an advanced coder. Steven did say something to the effect of when writing classes, but automatic declaration is a backward-compatible feature that allows beginners to code in the timeline the same way they used to. In AS3, whether you use your own document class or not, the Main Timeline is essentially a class. Therefore, the instances must be declared. That means that every user, beginner or not, accustomed to best practices or not, would suddenly have to adjust to yet another change in fundamental coding, even with timeline-only code. I agree and very strongly recommend declaring all your instances in classes--and it wouldn't do any harm to adopt that practice in timeline coding--but that's the reasoning behind the option. So that at least that element of timeline coding would not be broken/radically altered for every user. Rich http://www.LearningActionScript3.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Custom MovieClip Classes
It's a good idea to declare them yourself because both you--and more importantly the compiler--know what every instance is. This may not be 100% on point, but there is a common problem with upcasting, for example, when Strict Mode is on. Here's a scenario. On the stage, you create a movie clip and give it an instance name of mc. Then, in the timeline, you say: var sp:Sprite = new Sprite(); mc.addChild(sp); Then later, relative to the sprite, you say: sp.parent.gotoAndStop(2); The compiler doesn't know that mc is a movie clip, so it gives you an error saying it only understands it to be a DisplayObject. You then have to say something like: MovieClip(sp.parent).gotoAndStop(2); to manually cast the display object because upcasting isn't automatic in Strict Mode. Imagine that in a class, and the confusion could increase. So, the recommended practice is to declare everything yourself. Something like this (pseudocode): var mc:MovieClip = new MyMovieClip(); addChild(mc); var sp:Sprite = new Sprite(); mc.addChild(sp); sp.parent.gotoAndStop(2); Again, this is untested pseudocode just to explain the general idea. I chose a custom linkage class to make this more analogous to using a custom mc created in the IDE. The process is the same but, after creating it, delete it and place it with code--just one of multiple ways of handling a task. On 3/23/08 8:12 PM, Omar Fouad wrote: Yeah, But WHY I have to Always Declare them By Myself? Rich http://www.LearningActionScript3.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Custom MovieClip Classes
Works fine here: package amlak.ui { import flash.display.MovieClip; public class APanel extends MovieClip { public function APanel() { trace(APanel ::: CONSTRUCTOR); } } } package amlak.ui { import flash.display.MovieClip; import amlak.ui.APanel; public class RegistrationPanel extends APanel { public function RegistrationPanel() { trace(RegistrationPanel ::: CONSTRUCTOR); } } } Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip regards, Muzak - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, March 22, 2008 2:09 AM Subject: Re: [Flashcoders] Custom MovieClip Classes Nope look at this. package amlak.ui { import flash.text.*; import flash.display.MovieClip; public class RegistrationPanel extends APanel { public function RegistrationPanel(){ } } } 5000: The class 'amlak.ui.RegistrationPanel' must subclass ' flash.display.MovieClip' since it is linked to a library symbol of that type. I thought that RegistrationPanel would inherit also MovieClip since APanal does. But same Error. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Custom MovieClip Classes
Seems like the most important part is when Muzak wrote this: Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip I have found these two settings a little confusing. For example, creating a simple code behind class, when I first started working with Flash, I stumbled into this format: class RegistrationPanel base class: amlak.ui.RegistrationPanel This actually seemed to work. What is the difference behind-the-scenes? In hindsight, this must be creating a duplicate class RegistrationPanel in the global namespace that inherits from the subclass of the same name, right? On Sat, Mar 22, 2008 at 6:23 AM, Muzak [EMAIL PROTECTED] wrote: Works fine here: package amlak.ui { import flash.display.MovieClip; public class APanel extends MovieClip { public function APanel() { trace(APanel ::: CONSTRUCTOR); } } } package amlak.ui { import flash.display.MovieClip; import amlak.ui.APanel; public class RegistrationPanel extends APanel { public function RegistrationPanel() { trace(RegistrationPanel ::: CONSTRUCTOR); } } } Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip regards, Muzak - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, March 22, 2008 2:09 AM Subject: Re: [Flashcoders] Custom MovieClip Classes Nope look at this. package amlak.ui { import flash.text.*; import flash.display.MovieClip; public class RegistrationPanel extends APanel { public function RegistrationPanel(){ } } } 5000: The class 'amlak.ui.RegistrationPanel' must subclass ' flash.display.MovieClip' since it is linked to a library symbol of that type. I thought that RegistrationPanel would inherit also MovieClip since APanal does. But same Error. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Custom MovieClip Classes
Hey!!! It worked Now I can Extend the APanel Class.. But how come? I changed Nothing(??) On Sat, Mar 22, 2008 at 12:52 PM, jonathan howe [EMAIL PROTECTED] wrote: Seems like the most important part is when Muzak wrote this: Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip I have found these two settings a little confusing. For example, creating a simple code behind class, when I first started working with Flash, I stumbled into this format: class RegistrationPanel base class: amlak.ui.RegistrationPanel This actually seemed to work. What is the difference behind-the-scenes? In hindsight, this must be creating a duplicate class RegistrationPanel in the global namespace that inherits from the subclass of the same name, right? On Sat, Mar 22, 2008 at 6:23 AM, Muzak [EMAIL PROTECTED] wrote: Works fine here: package amlak.ui { import flash.display.MovieClip; public class APanel extends MovieClip { public function APanel() { trace(APanel ::: CONSTRUCTOR); } } } package amlak.ui { import flash.display.MovieClip; import amlak.ui.APanel; public class RegistrationPanel extends APanel { public function RegistrationPanel() { trace(RegistrationPanel ::: CONSTRUCTOR); } } } Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip regards, Muzak - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, March 22, 2008 2:09 AM Subject: Re: [Flashcoders] Custom MovieClip Classes Nope look at this. package amlak.ui { import flash.text.*; import flash.display.MovieClip; public class RegistrationPanel extends APanel { public function RegistrationPanel(){ } } } 5000: The class 'amlak.ui.RegistrationPanel' must subclass ' flash.display.MovieClip' since it is linked to a library symbol of that type. I thought that RegistrationPanel would inherit also MovieClip since APanal does. But same Error. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Custom MovieClip Classes
Cleared the cash?? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 14:56 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Hey!!! It worked Now I can Extend the APanel Class.. But how come? I changed Nothing(??) On Sat, Mar 22, 2008 at 12:52 PM, jonathan howe [EMAIL PROTECTED] wrote: Seems like the most important part is when Muzak wrote this: Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip I have found these two settings a little confusing. For example, creating a simple code behind class, when I first started working with Flash, I stumbled into this format: class RegistrationPanel base class: amlak.ui.RegistrationPanel This actually seemed to work. What is the difference behind-the-scenes? In hindsight, this must be creating a duplicate class RegistrationPanel in the global namespace that inherits from the subclass of the same name, right? On Sat, Mar 22, 2008 at 6:23 AM, Muzak [EMAIL PROTECTED] wrote: Works fine here: package amlak.ui { import flash.display.MovieClip; public class APanel extends MovieClip { public function APanel() { trace(APanel ::: CONSTRUCTOR); } } } package amlak.ui { import flash.display.MovieClip; import amlak.ui.APanel; public class RegistrationPanel extends APanel { public function RegistrationPanel() { trace(RegistrationPanel ::: CONSTRUCTOR); } } } Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip regards, Muzak - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, March 22, 2008 2:09 AM Subject: Re: [Flashcoders] Custom MovieClip Classes Nope look at this. package amlak.ui { import flash.text.*; import flash.display.MovieClip; public class RegistrationPanel extends APanel { public function RegistrationPanel(){ } } } 5000: The class 'amlak.ui.RegistrationPanel' must subclass ' flash.display.MovieClip' since it is linked to a library symbol of that type. I thought that RegistrationPanel would inherit also MovieClip since APanal does. But same Error. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1338 - Release Date: 21-3-2008 17:52 No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1338 - Release Date: 21-3-2008 17:52 No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1338 - Release Date: 21-3-2008 17:52 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Custom MovieClip Classes
Note: I am working with Flash and Document Class. Classes are written in Flex (Actionscript Project). Flash AS Editor Is not that good. On Sat, Mar 22, 2008 at 5:14 PM, Omar Fouad [EMAIL PROTECTED] wrote: Nope. Just Restarted Flash. On Sat, Mar 22, 2008 at 4:13 PM, Cor [EMAIL PROTECTED] wrote: Cleared the cash?? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 14:56 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Hey!!! It worked Now I can Extend the APanel Class.. But how come? I changed Nothing(??) On Sat, Mar 22, 2008 at 12:52 PM, jonathan howe [EMAIL PROTECTED] wrote: Seems like the most important part is when Muzak wrote this: Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip I have found these two settings a little confusing. For example, creating a simple code behind class, when I first started working with Flash, I stumbled into this format: class RegistrationPanel base class: amlak.ui.RegistrationPanel This actually seemed to work. What is the difference behind-the-scenes? In hindsight, this must be creating a duplicate class RegistrationPanel in the global namespace that inherits from the subclass of the same name, right? On Sat, Mar 22, 2008 at 6:23 AM, Muzak [EMAIL PROTECTED] wrote: Works fine here: package amlak.ui { import flash.display.MovieClip; public class APanel extends MovieClip { public function APanel() { trace(APanel ::: CONSTRUCTOR); } } } package amlak.ui { import flash.display.MovieClip; import amlak.ui.APanel; public class RegistrationPanel extends APanel { public function RegistrationPanel() { trace(RegistrationPanel ::: CONSTRUCTOR); } } } Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip regards, Muzak - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, March 22, 2008 2:09 AM Subject: Re: [Flashcoders] Custom MovieClip Classes Nope look at this. package amlak.ui { import flash.text.*; import flash.display.MovieClip; public class RegistrationPanel extends APanel { public function RegistrationPanel(){ } } } 5000: The class 'amlak.ui.RegistrationPanel' must subclass ' flash.display.MovieClip' since it is linked to a library symbol of that type. I thought that RegistrationPanel would inherit also MovieClip since APanal does. But same Error. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1338 - Release Date: 21-3-2008 17:52 No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1338 - Release Date: 21-3-2008 17:52 No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1338 - Release Date: 21-3-2008 17:52 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential
Re: [Flashcoders] Custom MovieClip Classes
Nope. Just Restarted Flash. On Sat, Mar 22, 2008 at 4:13 PM, Cor [EMAIL PROTECTED] wrote: Cleared the cash?? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zaterdag 22 maart 2008 14:56 Aan: Flash Coders List Onderwerp: Re: [Flashcoders] Custom MovieClip Classes Hey!!! It worked Now I can Extend the APanel Class.. But how come? I changed Nothing(??) On Sat, Mar 22, 2008 at 12:52 PM, jonathan howe [EMAIL PROTECTED] wrote: Seems like the most important part is when Muzak wrote this: Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip I have found these two settings a little confusing. For example, creating a simple code behind class, when I first started working with Flash, I stumbled into this format: class RegistrationPanel base class: amlak.ui.RegistrationPanel This actually seemed to work. What is the difference behind-the-scenes? In hindsight, this must be creating a duplicate class RegistrationPanel in the global namespace that inherits from the subclass of the same name, right? On Sat, Mar 22, 2008 at 6:23 AM, Muzak [EMAIL PROTECTED] wrote: Works fine here: package amlak.ui { import flash.display.MovieClip; public class APanel extends MovieClip { public function APanel() { trace(APanel ::: CONSTRUCTOR); } } } package amlak.ui { import flash.display.MovieClip; import amlak.ui.APanel; public class RegistrationPanel extends APanel { public function RegistrationPanel() { trace(RegistrationPanel ::: CONSTRUCTOR); } } } Linkage properties for RegistrationPanel in library: class: amlak.ui.RegistrationPanel base class: flash.display.MovieClip regards, Muzak - Original Message - From: Omar Fouad [EMAIL PROTECTED] To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Saturday, March 22, 2008 2:09 AM Subject: Re: [Flashcoders] Custom MovieClip Classes Nope look at this. package amlak.ui { import flash.text.*; import flash.display.MovieClip; public class RegistrationPanel extends APanel { public function RegistrationPanel(){ } } } 5000: The class 'amlak.ui.RegistrationPanel' must subclass ' flash.display.MovieClip' since it is linked to a library symbol of that type. I thought that RegistrationPanel would inherit also MovieClip since APanal does. But same Error. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1338 - Release Date: 21-3-2008 17:52 No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1338 - Release Date: 21-3-2008 17:52 No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1338 - Release Date: 21-3-2008 17:52 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http
[Flashcoders] Custom MovieClip Classes
List, I have a MovieClip in my Flash Library with Class Name APanel. The class obviously extends MovieClip; Also I have another MovieClip in the library Called RegistrationPanel and It's class also would extend the MovieClip's one. Now I would the like to let RegistrationPanel inherit some behaviours from APanel. But it allready extends MovieClip... How can I do this ? -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Custom MovieClip Classes
I would maybe use Composition to do this. Have RegistrationPanel contain an instance of APanel and call on it: http://www.moock.org/eas2/compositionVSinheritance.html HTH Glen Omar Fouad wrote: List, I have a MovieClip in my Flash Library with Class Name APanel. The class obviously extends MovieClip; Also I have another MovieClip in the library Called RegistrationPanel and It's class also would extend the MovieClip's one. Now I would the like to let RegistrationPanel inherit some behaviours from APanel. But it allready extends MovieClip... How can I do this ? -- Glen Pike 01736 759321 www.glenpike.co.uk http://www.glenpike.co.uk ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Custom MovieClip Classes
Now I would the like to let RegistrationPanel inherit some behaviours from APanel. But it allready extends MovieClip... How can I do this ? You can have RegistrationPanel extend APanel. You need to inherit from MovieClip, but you don't have to do it directly. APanel extends MovieClip, so when RegistrationPanel extends APanel, it will also extend MovieClip. Like a dog is a mammal, and a mammal is an animal, so a dog is an animal, too. Mark On Sat, Mar 22, 2008 at 12:24 AM, Omar Fouad [EMAIL PROTECTED] wrote: List, I have a MovieClip in my Flash Library with Class Name APanel. The class obviously extends MovieClip; Also I have another MovieClip in the library Called RegistrationPanel and It's class also would extend the MovieClip's one. Now I would the like to let RegistrationPanel inherit some behaviours from APanel. But it allready extends MovieClip... How can I do this ? -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Custom MovieClip Classes
Do you want to inherit some or all? If you want to inherit all, have RegistrationPanel extend APanel. If you want to inherit some, have RegistrationPanel instantiate APanel and have proxy methods to just the ones you want. -Steven Omar Fouad wrote: List, I have a MovieClip in my Flash Library with Class Name APanel. The class obviously extends MovieClip; Also I have another MovieClip in the library Called RegistrationPanel and It's class also would extend the MovieClip's one. Now I would the like to let RegistrationPanel inherit some behaviours from APanel. But it allready extends MovieClip... How can I do this ? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Custom MovieClip Classes
Nope look at this. package amlak.ui { import flash.text.*; import flash.display.MovieClip; public class RegistrationPanel extends APanel { public function RegistrationPanel(){ } } } 5000: The class 'amlak.ui.RegistrationPanel' must subclass ' flash.display.MovieClip' since it is linked to a library symbol of that type. I thought that RegistrationPanel would inherit also MovieClip since APanal does. But same Error. On Sat, Mar 22, 2008 at 2:02 AM, Steven Sacks [EMAIL PROTECTED] wrote: Do you want to inherit some or all? If you want to inherit all, have RegistrationPanel extend APanel. If you want to inherit some, have RegistrationPanel instantiate APanel and have proxy methods to just the ones you want. -Steven Omar Fouad wrote: List, I have a MovieClip in my Flash Library with Class Name APanel. The class obviously extends MovieClip; Also I have another MovieClip in the library Called RegistrationPanel and It's class also would extend the MovieClip's one. Now I would the like to let RegistrationPanel inherit some behaviours from APanel. But it allready extends MovieClip... How can I do this ? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders