Re: [Flashcoders] Loading xml in AS 2
If you want to trace out your xmlData then put that trace INSIDE the onLoad function. otherwise you will get nothing back ! don't forget, these are asynchronus functions - load and onLoad HTH Omar Fouad wrote: class LoadXML { function LoadXML() { var xmlData:XML = new XML(); xmlData.ignoreWhite= true; xmlData.onLoad = function (success) { if(success) { trace(loaded); } } xmlData.load(data.xml); trace(xmlData); } } this is not working ___ 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] Loading xml in AS 2
import mx.utils.Delegate; class LoadXML { var xml:XML; function LoadXML() { xml = new XML(); xml.ignoreWhite = true; xml.onLoad = Delegate.create(this, parseXML); xml.load(data.xml); } private function parseXML():Void { trace(parseXML); trace(xml); } } If that doesn't work, I'm a monkey's uncle. ___ 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] Loading xml in AS 2
Assuming the loaded trace is not going through... Try tracing success outside of the conditional. If you aren't getting any traces, make sure the class is importing correctly. Double check your class path and that your class defintion corresponds to the appropriate package. If it's just a matter of success, then your xml doc is flawed or your path is incorrect. On 7/30/07, Omar Fouad [EMAIL PROTECTED] wrote: class LoadXML { function LoadXML() { var xmlData:XML = new XML(); xmlData.ignoreWhite= true; xmlData.onLoad = function (success) { if(success) { trace(loaded); } } xmlData.load(data.xml); trace(xmlData); } } this is not working -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net +2010 - 2346633 - +2012 - 261 ___ 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] Loading xml in AS 2
Your code should trace your XML, when calling new LoadXML(). Have you checked against another XML, Omar? Are you sure your xml-file is in the same folder as your swf? You might also try the onHTTPStatus and onData events the XML class offers. hth, Matthias 2007/7/30, Omar Fouad [EMAIL PROTECTED]: class LoadXML { function LoadXML() { var xmlData:XML = new XML(); xmlData.ignoreWhite= true; xmlData.onLoad = function (success) { if(success) { trace(loaded); } } xmlData.load(data.xml); trace(xmlData); } } this is not working -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net +2010 - 2346633 - +2012 - 261 ___ 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] Loading xml in AS 2
True The question being? It's a scope issue in combination with understanding event handling etc. Try: http://www.google.nl/search?q=Loading+xml+in+AS2 Or: http://www.gskinner.com/blog/archives/69.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Omar Fouad Sent: maandag 30 juli 2007 19:27 To: Flashcoders mailing list Subject: [Flashcoders] Loading xml in AS 2 class LoadXML { function LoadXML() { var xmlData:XML = new XML(); xmlData.ignoreWhite= true; xmlData.onLoad = function (success) { if(success) { trace(loaded); } } xmlData.load(data.xml); trace(xmlData); } } this is not working -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net +2010 - 2346633 - +2012 - 261 ___ 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 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@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] Loading xml in AS 2
aha yes that is working. Thanks in advance, I just made a baracket mistake :D On 7/31/07, Enrique Chávez [EMAIL PROTECTED] wrote: You have to wait for the onLoad Event class LoadXML { function LoadXML() { var xmlData:XML = new XML(); xmlData.ignoreWhite= true; xmlData.onLoad = function (success) { if(success) { trace(loaded); trace(xmlData); } } xmlData.load(data.xml); } } Omar Fouad escribió: class LoadXML { function LoadXML() { var xmlData:XML = new XML(); xmlData.ignoreWhite= true; xmlData.onLoad = function (success) { if(success) { trace(loaded); } } xmlData.load(data.xml); trace(xmlData); } } this is not working -- Enrique Chavez aka Tmeister http://www.klr20mg.com http://www.tmeister.net http://desktoptwo.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 -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net +2010 - 2346633 - +2012 - 261 ___ 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] Loading xml in AS 2
Ok, I'll repost mine again. Either you didn't receive my post or you didn't read my post. -- On 7/30/2007, Steven Sacks wrote: import mx.utils.Delegate; class LoadXML { var xml:XML; function LoadXML() { xml = new XML(); xml.ignoreWhite = true; xml.onLoad = Delegate.create(this, parseXML); xml.load(data.xml); } private function parseXML():Void { trace(parseXML); trace(xml); } } If that doesn't work, I'm a monkey's uncle. --- ___ 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] Loading xml in AS 2
You have to wait for the onLoad Event class LoadXML { function LoadXML() { var xmlData:XML = new XML(); xmlData.ignoreWhite= true; xmlData.onLoad = function (success) { if(success) { trace(loaded); trace(xmlData); } } xmlData.load(data.xml); } } Omar Fouad escribió: class LoadXML { function LoadXML() { var xmlData:XML = new XML(); xmlData.ignoreWhite= true; xmlData.onLoad = function (success) { if(success) { trace(loaded); } } xmlData.load(data.xml); trace(xmlData); } } this is not working -- Enrique Chavez aka Tmeister http://www.klr20mg.com http://www.tmeister.net http://desktoptwo.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] Loading xml in AS 2
You trace before the onLoadis actually triggered Try putting the trace in your in your onLoad Latcho Omar Fouad wrote: class LoadXML { function LoadXML() { var xmlData:XML = new XML(); xmlData.ignoreWhite= true; xmlData.onLoad = function (success) { if(success) { trace(loaded); } } xmlData.load(data.xml); trace(xmlData); } } this is not working ___ 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] Loading xml in AS 2
Matthias and latcho, thanks a lot.. this worked.. the thing is that i made a mistake in closing brackets... I solved this issue 3 days ago. The list went down exactly after i posted this thread three days ago, and of course i didn't get any reply except today Thanks in advance by the way... This list rocks.. On 8/2/07, Latcho [EMAIL PROTECTED] wrote: You trace before the onLoadis actually triggered Try putting the trace in your in your onLoad Latcho Omar Fouad wrote: class LoadXML { function LoadXML() { var xmlData:XML = new XML(); xmlData.ignoreWhite= true; xmlData.onLoad = function (success) { if(success) { trace(loaded); } } xmlData.load(data.xml); trace(xmlData); } } this is not working ___ 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 -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net +2010 - 2346633 - +2012 - 261 ___ 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] Loading xml in AS 2
class LoadXML { function LoadXML() { var xmlData:XML = new XML(); xmlData.ignoreWhite= true; xmlData.onLoad = function (success) { if(success) { trace(loaded); } } xmlData.load(data.xml); trace(xmlData); } } this is not working -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net +2010 - 2346633 - +2012 - 261 ___ 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