----- Original Message ----

> From: Jared <jared.stan...@gmail.com>
> To: Flash Coders List <flashcoders@chattyfig.figleaf.com>
> Sent: Fri, April 30, 2010 6:16:37 PM
> Subject: Re: [Flashcoders] Template w/ XML?
> 
> Try root.loaderinfo.parameters.varname

That got me on the right track. I have one little wrinkle to work out of this 
first attempt. Here's my code:

package
{
imports here

class suchandsuch extends MovieClip
{
        var pageDetails:String = new String();
        var urlXMLLoader:URLLoader;

function suchandsuch()
{
            XMLLoader();
            Text();
        }
        
        function XMLLoader()
        {
            var urlXMLRequest:URLRequest = new URLRequest('pageDetails.xml');
            urlXMLLoader = new URLLoader();
            urlXMLLoader.addEventListener(Event.COMPLETE, completeXMLListener);
            urlXMLLoader.load(urlXMLRequest);
        }
        
        function completeXMLListener(e:Event):void
        {
            var xmlData:XML = XML (e.target.data);
            pageDetails = xmlData.DETAILS.toString();
        }


function Text()
{
more stuff here
            myText.htmlText = pageDetails;
            myText.htmlText += "Lorem ipsum dolor sitipsum, convallis consequat 
orci.<br /><br />";
more stuff

Now, if I put a trace under this line:

            myText.htmlText = pageDetails;

I get :

[object textField]

which is what I want. But it doesn't print anything to screen. If I put the 
following trace under this line:


            pageDetails = xmlData.DETAILS.toString();
trace(pageDetails);

it traces out what I want. No errors. Please advise.
TIA,
John



      
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to