Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 11-20-2009, 11:34 PM   #1
Registered User
Join Date: Oct 2009
Posts: 12
Default Help with loading xml data

Hi all,

I'm loading data into my flash movie from an xml file like this:

ActionScript Code:
var queryStrings = this.loaderInfo.parameters; var gallery = queryStrings.galleryName; var xmlLoader:URLLoader = new URLLoader(); xmlLoader.addEventListener(Event.COMPLETE, loadXML, false, 0, true); xmlLoader.load(xmlURL); function loadXML(evt:Event):void{         var xmlData:XML = new XML(evt.target.data);     images = xmlData.personal.image; }

The problem is; the part that says "personal" is supposed to be dynamic depending on the query string. So effectively, it's meant to be xmlData.gallery.image - but that doesn't work for obvious reasons!

Does anyone know how I would go about doing that?

Thanks in advance,

dan2684 is offline   Reply With Quote
Old 11-21-2009, 11:13 AM   #2
Join Date: Nov 2009
Posts: 53

xmlData.(personal == gallery)

You can dump the xmlData with trace() to see if youre getting the xml you need.

meshy is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 11:19 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.