Thanks Zeh - much appreciated.

Best,
Mike D


.............................................
Mike Dunlop
// Droplab
[ e ] [EMAIL PROTECTED]


On Dec 28, 2006, at 7:49 PM, Zeh Fernando wrote:



Mike Dunlop wrote:
function loadMyVars(url,type) {
(...)
}
This always returns false

You are creating events and expecting them to run at the same time; they won't. They're just skipped and it goes straight to "return false" after creating them.

When creating your onLoads, you're just telling what code should be run *when* the onLoad occur, not running it. For your code to work, it would have to halt all code execution on flash until onLoad runs for the return to work they way you expect it to. Either way, "return" inside of onLoad would also return from the onLoad, not from your function. So it would never work one way or the other.

So you can't have a function try to load something and reply with results. They're asynchronous; you'd have a function that does the call and goes back with no result at all, then something else that handles results accordingly. That's why there are events.

Also, use "var xml = (...)" when creating your xml object (the same way you did with LoadVars) or else you'll have scope issues in the future.


Zeh
_______________________________________________
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

Reply via email to