hi, line with the error is the first line that tried to modify the text of the MXML text.
rdata_title.title=rXML.info.thainame; even i put a string or a xml value, it throws that error. i used new cause it's just on the adobe examples...not using new will create a empty and new var where to place my xml? i ask so cause this page will format the content of multiple XMLs, so show be "new" everytime that i ask for the page... thnx for the answer. Tracy Spratt escribió: > > Which is line 75? Debug to find out which reference is null. > > Also, probably not related to your problem, do not use “new” with > XML() . XML is not really a constructor but a top-level function. So > just do: > > var rXML:XML = XML(event.target.data); > > or > > var rXML:XML = event.target.data as XML; > > The second is a cast, and there are subtle differences in behavior > when the object is null. > > Tracy > > ------------------------------------------------------------------------ > > *From:* [email protected] [mailto:[EMAIL PROTECTED] > *On Behalf Of *David Pariente > *Sent:* Thursday, August 28, 2008 7:02 AM > *To:* [email protected] > *Subject:* [flexcoders] asigning text with script error > > Hi all, > > I got an strange error... > > I make some text change through AS3 on my app. > When i test on IE, i see no change at all. > When i test on FireFox, i see the changes. But if i reload the page i > get this error on the browser: > > TypeError: Error #1009: Cannot access a property or method of a null > object reference. > at > thethaichef/rLoaded()[K:\PROJECTS\Personal\thethaichef\src\thethaichef.mxml:75] > at flash.events::EventDispatcher/dispatchEventFunction() > at flash.events::EventDispatcher/dispatchEvent() > at flash.net::URLLoader/onComplete() > > seems it finds an error on the rLoaded function (that starts when an XML > is loaded), when i asign some text to the MXML: > > private function rLoaded(event:Event) : void{ > var rXML:XML = new XML(); > rXML = XML(event.target.data); > > currentState="recipe"; > > rdata_title.title=rXML.info.thainame; > > rdata_by.text='by '+rXML.info.author.name; > > > } > > does anyone knows what i'm doing wrong? > thnx a lot! > > ------------------------------------ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

