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" > > > 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/
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" > > > > 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. > > __
RE: [Flashcoders] Tweening Engines for AS3
FlashDevelop In combination with Flex SDK to compile All free and very lightweight, and a very nice auto-completion. It will make your workload much more easy -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Jesse Warden Verzonden: zaterdag 22 maart 2008 21:57 Aan: flashcoders@chattyfig.figleaf.com Onderwerp: [Flashcoders] Tweening Engines for AS3 What are people using nowadays besides Flash CS3's built-in ones and Flex 3's built in ones? Looking for something lightweight and that has no Flash or Flex dependencies. ___ 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/1339 - Release Date: 22-3-2008 16:43 No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 22-3-2008 16:43 No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 22-3-2008 16:43 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Design pattern for conditional Interfaces ?
Hi Thomaz, Wouldn't that be the exact same thing as testing against the interface references that's stored which each analyzer (as I suggested in my post) ? Since there is no compile-time way to check this, i'm going to check all the items with all the analyzers in the analyze() method and give a runtime error if something's wrong. Thanks for thinking with me though! :) On Sun, Mar 23, 2008 at 2:29 AM, Andrei Thomaz <[EMAIL PROTECTED]> wrote: > and if each IAnalyzer implements a function called getAnalyzedProperty(), > returning a string, and if each item (using an IItem interface, for > example) > implements a function called hasProperty(), receiving a string as > parameter? > So, you could check if the item has the "getProperty()" function the > analyzer requires, at runtime, without having runtine errors... You could > also have some getProperty( strProperty:String ):Object function, defined > at > IItem interface. > > interface IAnalyzer > { > getAnalyzedProperty():String; > } > > interface IItem > { > hasProperty( strProperty:String ):Boolean; > getProperty( strProperty:String ):Object; > } > > > just a guess, > andrei > > > > On Sat, Mar 22, 2008 at 11:39 AM, Jeroen Beckers <[EMAIL PROTECTED]> > wrote: > > > Hi list! > > > > Situation: I have a class that analyzes stuff. There are different > > analyzing > > classes, such as "HeightAnalyzer", "WeightAnalyzer", "LevelAnalyzer", > etc. > > You can add an analyzer to the class by using > > 'myClass.addAnalyzer(newAnalyzer:IAnalyzer)'. > > As you can see, there is an IAnalyzer interface which all Analyzer's > > implement. Every time you add an analyzer, it is added to the list using > > the > > Decorator pattern. (Every analyzer must analyze a list and pass it to > the > > next analyzing test) > > > > Now, the analyzer's analyze certain items. Every analyzer requires the > > analyzed item to have a certain set of methods. The HeightAnalyzer > > requires > > a getHeight(), the LevelAnaylzer requires a getLevel(), etc. I want to > > have > > a different interface for each analyzer, so that I can easily add > > analyzers > > (+interfaces). > > > > If I want to analyze a list of items, those items must implement the > > correct > > interface, according to which analyzers you have added to the class. Fe: > > > > var myClass:AnalyzerBundle = new AnalyzerBundle(); > > myClass.addAnalyzer(new HeightAnalyzer()); > > myClass.addAnalyzer(new LevelAnalyzer()); > > myClass.analyze(new Array(item1, item2, item3)); > > > > What I am looking for now, is a way to make sure that item1, item2 and > > item3 > > all implement the IHeightItem and ILevelItem interfaces. > > > > I've found a couple of ways to do this, but none of them seemed really > > good > > to me. One of them was to have every Analyzer keep track of the > interface > > associated with it, and check if they implement the correct interface, > > once > > the analyzer is called. But this would give ugly runtime errors... > > I'm pretty sure that it can't be done at compile time, but if anyone > > happens > > to know some way (hack), or a better way for the runtime errors, please > > tell > > me :-). All ideas are welcome > > > > Ps: I've just made up all these names, my question is about the > technique > > to > > be used, not about the project :) > > ___ > > 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 > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Design pattern for conditional Interfaces ?
Oh, yes, I misunderstood you. When I read "ugly runtime errors", I understood "a runtime action script error", like the ones are reported by flash player debug version. []'s andrei On Sun, Mar 23, 2008 at 7:30 AM, Jeroen Beckers <[EMAIL PROTECTED]> wrote: > Hi Thomaz, > > Wouldn't that be the exact same thing as testing against the interface > references that's stored which each analyzer (as I suggested in my post) ? > > Since there is no compile-time way to check this, i'm going to check all > the > items with all the analyzers in the analyze() method and give a runtime > error if something's wrong. > > Thanks for thinking with me though! :) > > On Sun, Mar 23, 2008 at 2:29 AM, Andrei Thomaz <[EMAIL PROTECTED]> > wrote: > > > and if each IAnalyzer implements a function called > getAnalyzedProperty(), > > returning a string, and if each item (using an IItem interface, for > > example) > > implements a function called hasProperty(), receiving a string as > > parameter? > > So, you could check if the item has the "getProperty()" function the > > analyzer requires, at runtime, without having runtine errors... You > could > > also have some getProperty( strProperty:String ):Object function, > defined > > at > > IItem interface. > > > > interface IAnalyzer > > { > > getAnalyzedProperty():String; > > } > > > > interface IItem > > { > > hasProperty( strProperty:String ):Boolean; > > getProperty( strProperty:String ):Object; > > } > > > > > > just a guess, > > andrei > > > > > > > > On Sat, Mar 22, 2008 at 11:39 AM, Jeroen Beckers <[EMAIL PROTECTED] > > > > wrote: > > > > > Hi list! > > > > > > Situation: I have a class that analyzes stuff. There are different > > > analyzing > > > classes, such as "HeightAnalyzer", "WeightAnalyzer", "LevelAnalyzer", > > etc. > > > You can add an analyzer to the class by using > > > 'myClass.addAnalyzer(newAnalyzer:IAnalyzer)'. > > > As you can see, there is an IAnalyzer interface which all Analyzer's > > > implement. Every time you add an analyzer, it is added to the list > using > > > the > > > Decorator pattern. (Every analyzer must analyze a list and pass it to > > the > > > next analyzing test) > > > > > > Now, the analyzer's analyze certain items. Every analyzer requires the > > > analyzed item to have a certain set of methods. The HeightAnalyzer > > > requires > > > a getHeight(), the LevelAnaylzer requires a getLevel(), etc. I want to > > > have > > > a different interface for each analyzer, so that I can easily add > > > analyzers > > > (+interfaces). > > > > > > If I want to analyze a list of items, those items must implement the > > > correct > > > interface, according to which analyzers you have added to the class. > Fe: > > > > > > var myClass:AnalyzerBundle = new AnalyzerBundle(); > > > myClass.addAnalyzer(new HeightAnalyzer()); > > > myClass.addAnalyzer(new LevelAnalyzer()); > > > myClass.analyze(new Array(item1, item2, item3)); > > > > > > What I am looking for now, is a way to make sure that item1, item2 and > > > item3 > > > all implement the IHeightItem and ILevelItem interfaces. > > > > > > I've found a couple of ways to do this, but none of them seemed really > > > good > > > to me. One of them was to have every Analyzer keep track of the > > interface > > > associated with it, and check if they implement the correct interface, > > > once > > > the analyzer is called. But this would give ugly runtime errors... > > > I'm pretty sure that it can't be done at compile time, but if anyone > > > happens > > > to know some way (hack), or a better way for the runtime errors, > please > > > tell > > > me :-). All ideas are welcome > > > > > > Ps: I've just made up all these names, my question is about the > > technique > > > to > > > be used, not about the project :) > > > ___ > > > 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 > > > ___ > 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
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" > > > > > 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 > > > >
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" > > > > > 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
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]> > > > > >
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"); } > > > > > > > > > >
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 "RegistrationP
[Flashcoders] Calling Event methods and Other Classes methods.
look at this. Main FLA Document Class public class Main extends Sprite { public function Main() { myButton.addEventListener(MouseEvent.CLICK, fun) } public function fun(e:MouseEvent):void { trace("Clicked"); } } Now supposed I need to call the function fun by some other function or object. How? And If i have another Class, How can i reach this function and call it? Thanks in advance. -- 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] Calling Event methods and Other Classes methods.
OK. First of all try to think like this: Every class is a black box and all the other classes do not really need to know what's going on inside. They have to know what to put into it and what to expect out of it in return. If your button is in the Main class it is always available in your whole app. But you have to be clean in your way of declarations. Lets build on the previous example and mail this to eachother so you have a working example. OK?? -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zondag 23 maart 2008 14:28 Aan: Flash Coders List Onderwerp: [Flashcoders] Calling Event methods and Other Classes methods. look at this. Main FLA Document Class public class Main extends Sprite { public function Main() { myButton.addEventListener(MouseEvent.CLICK, fun) } public function fun(e:MouseEvent):void { trace("Clicked"); } } Now supposed I need to call the function fun by some other function or object. How? And If i have another Class, How can i reach this function and call it? Thanks in advance. -- 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/1339 - Release Date: 22-3-2008 16:43 No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 22-3-2008 16:43 No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 22-3-2008 16:43 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Calling Event methods and Other Classes methods.
I noticed I didn't answer your question. In another class file you can trigger the button like this: Main.myButton.whatever... -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Omar Fouad Verzonden: zondag 23 maart 2008 14:28 Aan: Flash Coders List Onderwerp: [Flashcoders] Calling Event methods and Other Classes methods. look at this. Main FLA Document Class public class Main extends Sprite { public function Main() { myButton.addEventListener(MouseEvent.CLICK, fun) } public function fun(e:MouseEvent):void { trace("Clicked"); } } Now supposed I need to call the function fun by some other function or object. How? And If i have another Class, How can i reach this function and call it? Thanks in advance. -- 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/1339 - Release Date: 22-3-2008 16:43 No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 22-3-2008 16:43 No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 22-3-2008 16:43 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Re: Multiple Object Position Logic
Hi All, I'm trying to come up with an efficient concept of animating dynamic objects stacked upon each other. For example. Let's say I dynamically add an object (That would be Object 1). Then I wanted to add another object, I want object1 to move down one row, and the new object (object 2) to fade in. I now want to add a third object ( object 3 ). Object 1 and Object 2 move down a row. Now, I decided to delete Object 2. Object 3, now has to animate back up one row. Anyone know an effective way of executing this? Anthony ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] How to expand import "*" statements?
Hey! I've just found out that MTASC compiles much faster if used classes are imported explicitly. That is import com.togethersoft.util.Time import com.togethersoft.util.Format is much faster than import com.togethersoft.util.*; Provided there are many classes in com.togethersoft.util package. Don't ask, I don't know why. Because I'm a lazy programmer I always used "*" notation in my sources. So now I have a lot of classes with "*" imports. And because I want my code to compile fast, I wish to substitute "*" imports to fully qualified class name imports. Do you know any tool to help me to convert import statements in all the sources? This is Action script 2.0. The only way I could think about is to use FDT Eclipse plugin. FDT is able to detect classes used by the given one and add fully qualified class name imports. Unfortunately it does not support a batch mode. So I have to open each class in the editor to convert imports. And there are around 500 classes in the project. Any ideas? Pasha. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Can Flash (AS2) import .rtf files and display in textbox?
Can Flash (AS2) import .rtf files and display in textbox so the doc appears like the original?? Where would I look to find the procedure? Thanks, -Boyd ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Calling Event methods and Other Classes methods.
Even if myButton is not static? and even so, if in main myButton.addEventListener(MouseEvent.CLICK, fun); and in other Class Main.myButton. << now what? On Sun, Mar 23, 2008 at 3:52 PM, Cor <[EMAIL PROTECTED]> wrote: > I noticed I didn't answer your question. > > In another class file you can trigger the button like this: > > Main.myButton.whatever... > > -Oorspronkelijk bericht- > Van: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Namens Omar Fouad > Verzonden: zondag 23 maart 2008 14:28 > Aan: Flash Coders List > Onderwerp: [Flashcoders] Calling Event methods and Other Classes methods. > > look at this. > > Main FLA Document Class > > public class Main extends Sprite { > public function Main() { > myButton.addEventListener(MouseEvent.CLICK, fun) > } > > public function fun(e:MouseEvent):void { > trace("Clicked"); > } > } > > Now supposed I need to call the function fun by some other function or > object. How? > > And If i have another Class, How can i reach this function and call it? > > > Thanks in advance. > > -- > 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/1339 - Release Date: 22-3-2008 > 16:43 > > > No virus found in this incoming message. > Checked by AVG. > Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 22-3-2008 > 16:43 > > > No virus found in this outgoing message. > Checked by AVG. > Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 22-3-2008 > 16:43 > > > ___ > 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 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" 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
[Flashcoders] Variable scope within for loops: reusing iterator variables
I was hoping someone could explain why I get "Warning: 3596: Duplicate variable definition." warnings when I reuse an iterator variable. Example: for (var i:int = 0; i < someArray.length; i ++) { // do something cool } for (var i:int = 0; i < someOtherArray.length; i ++) { // do something even cooler } I had always thought that the scope of variables declared in the initialization part of the for loop were local to the loop block, not the block containing the loop. So I guess that is not true... does this mean the second time I use the loop I have to omit the declaration? Or is there a keyword I can use to keep the instantiation local to the for block? Seems like it would be clunky if I was cutting and pasting blocks of code in different orders, I'd have to keep track of who was the first for loop of any code block (an admittedly minor annoyance, since I don't have stacks and stacks of loops, but still...) Thanks in advance, -jonathan -- -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, 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" > 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] Variable scope within for loops: reusing iterator variables
jonathan howe wrote: > I was hoping someone could explain why I get "Warning: 3596: Duplicate > variable definition." warnings when I reuse an iterator variable. > Example: > > for (var i:int = 0; i < someArray.length; i ++) { > // do something cool > } > > for (var i:int = 0; i < someOtherArray.length; i ++) { > // do something even cooler > } The first time you declare the var i, it is in scope for the rest of the function, not the loop. Think of it this way: function someFunc():void { . . . var i:int; for (i = 0; i < someArray.length; i ++) { // do something cool } for (i = 0; i < someOtherArray.length; i ++) { // do something even cooler } } Make sense? Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Variable scope within for loops: reusing iteratorvariables
That's easy.only after busting my asss for an hour figuring it out.. ...Variables are only local to the function Jonathan try using j in your second for statementnot the letter i twice Hope that helps... Sent via BlackBerry from T-Mobile -Original Message- From: "jonathan howe" <[EMAIL PROTECTED]> Date: Sun, 23 Mar 2008 20:00:41 To:flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Variable scope within for loops: reusing iterator variables I was hoping someone could explain why I get "Warning: 3596: Duplicate variable definition." warnings when I reuse an iterator variable. Example: for (var i:int = 0; i < someArray.length; i ++) { // do something cool } for (var i:int = 0; i < someOtherArray.length; i ++) { // do something even cooler } I had always thought that the scope of variables declared in the initialization part of the for loop were local to the loop block, not the block containing the loop. So I guess that is not true... does this mean the second time I use the loop I have to omit the declaration? Or is there a keyword I can use to keep the instantiation local to the for block? Seems like it would be clunky if I was cutting and pasting blocks of code in different orders, I'd have to keep track of who was the first for loop of any code block (an admittedly minor annoyance, since I don't have stacks and stacks of loops, but still...) Thanks in advance, -jonathan -- -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 ___ 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