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]
_______________________________________________
[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
--
Thanks and Regards,
S.Hidayath
_______________________________________________
[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