Solved

Actionscript 3 XML data for Textboxes in Movieclip

Posted on 2010-11-26
4
406 Views
Last Modified: 2012-05-10
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
Comment
Question by:smart2009
  • 2
4 Comments
 
LVL 37

Accepted Solution

by:
CyanBlue earned 500 total points
Comment Utility
You could try something like this...
   var xday = this["add"+listdaynum];
or
   var xday = objectThatHasYourVariables["add"+listdaynum];

CyanBlue
0
 
LVL 17

Expert Comment

by:deepanjandas
Comment Utility
Is this solved, if not can you pls re-explain?

Warm Regards
Deepanjan Das
http://deepanjandas.wordpress.com/
0
 

Author Comment

by:smart2009
Comment Utility
Sorry I have been slammed and was forced to put this project on the back burner.
0
 

Author Closing Comment

by:smart2009
Comment Utility
Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now