RE: [Flashcoders] how to write a class that loads XML?
>>[mailto:[EMAIL PROTECTED] On Behalf >>Of hidayath q >>Im from Chennai and im working as a flash programmer here. >>Can u just explain me what the role of the *Delegate Class* >>here in this. I keep getting "buddy" type spam every 2-3 months or so in my personal inbox from someone with your exact same name and extremely similar style of english, so I'm probably not in the mood to assist with your question. Maybe it's a different person alltogether and just an unfortunate coincidence, but "hidayath q" is not all that common in the websphere that I have noticed. If it is you, please remove me from your "friends" list or whatever. Thanks, and apologies if I'm making a bad assumption. Jason Merrill Bank of America GT&O Learning & Leadership Development eTools & Multimedia Team ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to write a class that loads XML?
If you're working from a network drive, make sure its clock runs in synch with your working machine. On windows, you can click the clock in the system tray, go to the last tab (Time) and synchronize it with "time.windows.com". Do that for both machines. You shouldn't get any errors after that (at least for a while untill they run out of synch again). Muzak - Original Message - From: "sebastian chedal" <[EMAIL PROTECTED]> To: Sent: Friday, April 27, 2007 2:53 PM Subject: Re: [Flashcoders] how to write a class that loads XML? > ok i was able to solve the issue, has to do with working from a network > drive... how annoying!!! > > http://www.epresenterplus.com/blog/archives/30.html > > :-P > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to write a class that loads XML?
ok i was able to solve the issue, has to do with working from a network drive... how annoying!!! http://www.epresenterplus.com/blog/archives/30.html :-P XML is loading now just fine too, thanks everyone!! :D seb. On 4/27/07, sebastian chedal <[EMAIL PROTECTED]> wrote: Hi Thanks for that tip, delegate seems to work when I pass a variable, but its still not passing the XML object. However, I'm also having a problem which is stopping me from figuring out the issue... intermitently I get the error message: **Error** {...}/Flash/work/core/XMLoader.as: Line 3: The name of this class, 'XMLoader', conflicts with the name of another class that was loaded, 'XMLoader'. class XMLoader { I get this for different classes once in a while, and if I just recompile a few times, eventually the error goes away... huh? Its a very weird issue. I don't have any objects in the library with the same name... has anyone ever had this issue? Thanks! On 4/27/07, Danny Kodicek <[EMAIL PROTECTED]> wrote: > > > Hello Flash coders. > > :) > > > > Could anyone help me to fix my class code? I can't find any > > reference anywhere that will help me... I'm trying to load > > XML via a generalized class object, but the data in postXML > > never makes it to the parseXML constructor, any help is > > greatly appreciated! > > > > Thanks! > > > > Sebastian. > > > > [CODE] > > > > class XMLoader { > > > > private var postXML:XML; > > > > private function parseXML () { > >//do something with postXML > > } > > > > public function XMLoader (__file) { > > postXML.ignoreWhite = true; > > postXML.load(__file); > > postXML.onLoad = parseXML(); > > } > > } > > You can use the Delegate class to send the onLoad function back to your > object: > > postXML.onLoad = mx.utils.Delegate.create(this, parseXML ); > > Best > Danny > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to write a class that loads XML?
Hi Thanks for that tip, delegate seems to work when I pass a variable, but its still not passing the XML object. However, I'm also having a problem which is stopping me from figuring out the issue... intermitently I get the error message: **Error** {...}/Flash/work/core/XMLoader.as: Line 3: The name of this class, 'XMLoader', conflicts with the name of another class that was loaded, 'XMLoader'. class XMLoader { I get this for different classes once in a while, and if I just recompile a few times, eventually the error goes away... huh? Its a very weird issue. I don't have any objects in the library with the same name... has anyone ever had this issue? Thanks! On 4/27/07, Danny Kodicek <[EMAIL PROTECTED]> wrote: > Hello Flash coders. > :) > > Could anyone help me to fix my class code? I can't find any > reference anywhere that will help me... I'm trying to load > XML via a generalized class object, but the data in postXML > never makes it to the parseXML constructor, any help is > greatly appreciated! > > Thanks! > > Sebastian. > > [CODE] > > class XMLoader { > > private var postXML:XML; > > private function parseXML () { >//do something with postXML > } > > public function XMLoader (__file) { > postXML.ignoreWhite = true; > postXML.load(__file); > postXML.onLoad = parseXML(); > } > } You can use the Delegate class to send the onLoad function back to your object: postXML.onLoad = mx.utils.Delegate.create(this, parseXML ); Best Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to write a class that loads XML?
Hi Arul, Im from Chennai and im working as a flash programmer here. Can u just explain me what the role of the *Delegate Class* here in this. Thanks and Regards S.Hidaayth On 27/04/07, Arul Prasad M L <[EMAIL PROTECTED]> wrote: 1. May be coz you never really created the XML object. You'll need to define the XML object as well, not just declare the variable. 2. Try using the Delegate class. Its pretty useful in avoiding confusions. Now the code: import mx.utils.Delegate; class XMLoader { private var postXML:XML; private function parseXML () { //do something with postXML } public function XMLoader (__file) { postXML = new XML(); postXML.ignoreWhite = true; postXML.load(__file); postXML.onLoad = Delegate.create(this, parseXML);; } } Hope that helps, -- Arul Prasad http://arulprasad.blogspot.com On 4/27/07, sebastian chedal <[EMAIL PROTECTED]> wrote: > > Hello Flash coders. > :) > > Could anyone help me to fix my class code? I can't find any reference > anywhere that will help me... I'm trying to load XML via a generalized > class > object, but the data in postXML never makes it to the parseXML > constructor, > any help is greatly appreciated! > > Thanks! > > Sebastian. > > [CODE] > > class XMLoader { > > private var postXML:XML; > > private function parseXML () { >//do something with postXML > } > > public function XMLoader (__file) { > postXML.ignoreWhite = true; > postXML.load(__file); > postXML.onLoad = parseXML(); > } > } > > [/CODE] ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Thanks and Regards, S.Hidayath ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] how to write a class that loads XML?
1. May be coz you never really created the XML object. You'll need to define the XML object as well, not just declare the variable. 2. Try using the Delegate class. Its pretty useful in avoiding confusions. Now the code: import mx.utils.Delegate; class XMLoader { private var postXML:XML; private function parseXML () { //do something with postXML } public function XMLoader (__file) { postXML = new XML(); postXML.ignoreWhite = true; postXML.load(__file); postXML.onLoad = Delegate.create(this, parseXML);; } } Hope that helps, -- Arul Prasad http://arulprasad.blogspot.com On 4/27/07, sebastian chedal <[EMAIL PROTECTED]> wrote: Hello Flash coders. :) Could anyone help me to fix my class code? I can't find any reference anywhere that will help me... I'm trying to load XML via a generalized class object, but the data in postXML never makes it to the parseXML constructor, any help is greatly appreciated! Thanks! Sebastian. [CODE] class XMLoader { private var postXML:XML; private function parseXML () { //do something with postXML } public function XMLoader (__file) { postXML.ignoreWhite = true; postXML.load(__file); postXML.onLoad = parseXML(); } } [/CODE] ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] how to write a class that loads XML?
> Hello Flash coders. > :) > > Could anyone help me to fix my class code? I can't find any > reference anywhere that will help me... I'm trying to load > XML via a generalized class object, but the data in postXML > never makes it to the parseXML constructor, any help is > greatly appreciated! > > Thanks! > > Sebastian. > > [CODE] > > class XMLoader { > > private var postXML:XML; > > private function parseXML () { >//do something with postXML > } > > public function XMLoader (__file) { > postXML.ignoreWhite = true; > postXML.load(__file); > postXML.onLoad = parseXML(); > } > } You can use the Delegate class to send the onLoad function back to your object: postXML.onLoad = mx.utils.Delegate.create(this, parseXML ); Best Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com