Hi Thanks for that tip, delegate seems to work when I pass a variable, but
its still not passing the XML object.

However, I'm also having a problem which is stopping me from figuring out
the issue... intermitently I get the error message:

**Error** {...}/Flash/work/core/XMLoader.as: Line 3: The name of this class,
'XMLoader', conflicts with the name of another class that was loaded,
'XMLoader'.
    class XMLoader {

I get this for different classes once in a while, and if I just recompile a
few times, eventually the error goes away... huh? Its a very weird issue. I
don't have any objects in the library with the same name... has anyone ever
had this issue?

Thanks!

On 4/27/07, Danny Kodicek <[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();
>         }
> }

You can use the Delegate class to send the onLoad function back to your
object:

postXML.onLoad = mx.utils.Delegate.create(this, parseXML );

Best
Danny

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

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

Reply via email to