Sander,

Probably worth switching these two lines around:
myXML.load (sourceXML);
myXML.onLoad = function (success){
doSomethingWithData (myXML)
};
to become:
myXML.onLoad = function (success){
doSomethingWithData (myXML)
};
myXML.load (sourceXML);

Because then you're sure onLoad is set by the time load() is actually
called. Believe it or not I've actually had this cause me an issue - in at
least one case I've had load happen instantly i.e. onLoad() called before
load() had completed. I think it was loading something from a cached local
file - can't immediately remember.

Ian

On 11/14/05, Sander <[EMAIL PROTECTED]> wrote:
>
> Wicked code dude. Mine would look like this (or better if I didn't
> type AS in Mac Mail)
>
> function loadXML(){
> var myXML:XML = new XML ();
> myXML.ignoreWhite = true;
> myXML.load (sourceXML);
> myXML.onLoad = function (success){
> doSomethingWithData (myXML)
> };
> }
>
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to