i have a UI widget that loads its own layout info from an XML file.
is there a way to set the xml.onLoad to a useful function?
I would like to have the xml.onLoad callback to initialize the object
itself, like this:
class MyWidget {
function myWidget(xmlFile) { // constructor
xmlData = new XML();
xmlData.load( xmlFile );
xmlData.onLoad = this.init(xmlData); // doesnt work
}
function init(xmlData) {
/// do layout stuff here
}
}
it seems the xml.onLoad will only take a function with a single
boolean parameter? eg
xmlData.onLoad = function(success) { // ...
is there another pattern for doing this?
thanks!
/dc
_______________________________________________
David "DC" Collier
[EMAIL PROTECTED]
skype: callto://d3ntaku
http://www.pikkle.com
+81 (0)80 6521 9559
http://charajam.com 【★キャラ♪ジャム★】
人気キャラとJ-POP最新ヒット曲を自分で組み合わせて
待受Flashや着Flashを作っちゃおう!
_______________________________________________
_______________________________________________
[email protected]
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