Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-20-2009, 11:34 PM   #1
dan2684
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,

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

xmlData.(personal == gallery)

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

http://livedocs.adobe.com/flex/3/htm...th_XML_08.html
meshy is offline   Reply With Quote
Reply


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 06:37 PM.

///
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.