Thanks Derek - that's it! Not typing the dataprovider as XML allows to publish for Player 7:
import mx.controls.Tree; class Test{ function Test(){ // Published for Player 7. Error: There is no method with the name 'addTreeNode'. //var myTreeDP:XML = new XML(); // Compiles fine when not typed as XML var myTreeDP = new XML(); myTreeDP.addTreeNode("node", 0); } } Cheers! -------------- Andreas Weber motiondraw.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derek Lords Sent: Donnerstag, 12. Januar 2006 05:11 To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] TreeDataProvider - "There is no method with thename'addTreeNode'" "missing intrinsic class issue" good guess. This happened to me upon upgrading to Flash 8. I had to downgrade each instance to an Object and the problem went away. >From: "Andreas Weber" <[EMAIL PROTECTED]> >Reply-To: Flashcoders mailing list <flashcoders@chattyfig.figleaf.com> >To: "Flashcoders" <flashcoders@chattyfig.figleaf.com> >Subject: [Flashcoders] TreeDataProvider - "There is no method with the >name'addTreeNode'" >Date: Wed, 11 Jan 2006 16:13:26 +0100 > >With a Tree component on stage and this framecode > > var myTreeDP:XML = new XML(); > myTreeDP.addTreeNode("node", 0); > >the TreeDataProvider API works fine. > >However, the same code in a class > > class Test{ > function Test(){ > var myTreeDP:XML = new XML(); > myTreeDP.addTreeNode("node", 0); > } > } > >instantiated from a .fla that has a Tree component on stage, throws a >compiler error: > > "There is no method with the name 'addTreeNode'" > >Is this a missing intrinsic class issue? Workarounds? (don't have any >luck with avoiding the compiler error through Array access syntax: no >error, but no node is added). > >Cheers! > >-------------- >Andreas Weber >motiondraw.com > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders