• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 437
  • Last Modified:

Actionscript 3 XML data for Textboxes in Movieclip

Hello all, I am working on a advent calendar and I know that I have a specific number of days (Nov 26th - Dec 26th) I have a XML document that will pull data from a database and each day will fill out the contents of the XML. Anyways I have built a calendar that has all the days in it and assigned a generic instance name of ad22, ad23, ad24 etc... I did this because I can take the day in the query and just get the numeric value 22,23,24 etc.. The XML file will bring that value in a variable called listdaynum.

Then I want to ad something like:
var xday = ["add"+listdaynum];

What I want to then be able to do is this in a loop
xday.message.text  = txtmessage;

I get error's when trying this approach. Most blogs say to create an array and  but this gets more complicated. Any helpe would be greatly appreciated.
0
smart2009
Asked:
smart2009
  • 2
1 Solution
 
CyanBlueCommented:
You could try something like this...
   var xday = this["add"+listdaynum];
or
   var xday = objectThatHasYourVariables["add"+listdaynum];

CyanBlue
0
 
deepanjandasCommented:
Is this solved, if not can you pls re-explain?

Warm Regards
Deepanjan Das
http://deepanjandas.wordpress.com/
0
 
smart2009Author Commented:
Sorry I have been slammed and was forced to put this project on the back burner.
0
 
smart2009Author Commented:
Thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now