Forum Moderators: open

Message Too Old, No Replies

Load vars into a dynamic text field

dynamic text, loadvars

         

diegomh7

1:39 pm on Mar 13, 2007 (gmt 0)

10+ Year Member



hmm,
ive loaded variables from a php file into flash and they work on the top level text box, if I call it question one for example, the problem is, i have a movie clip called box1 which inside it has a text field called question1 (variable name not instance name, instance is blank).

The info wont show up, im having touble targeting it.

thing is ,
1. Need to load info from page.php (done that)
2. Got a mc on stage (done that) mc_box1
3. load question one into a text field inside mc_box1 (stuck)

trouble targetting it,

ideas,

mind is blank for such a simple task all of a sudden.

diegomh7

2:47 pm on Mar 13, 2007 (gmt 0)

10+ Year Member



OK, ive gone down the road of giving the textfield an instance name and trying to use LoadVars('File'); still with no joy,

Personally, I think im outta practice in flash and could do with a luvly looking piece of actionscript posting, hint hint,

Ill buy you dinner at mcdonalds?

diegomh7

diegomh7

3:34 pm on Mar 13, 2007 (gmt 0)

10+ Year Member



anyone?

diegomh7

4:21 pm on Mar 13, 2007 (gmt 0)

10+ Year Member



done it for all those who may need it,

actionscript, inside mc frame 1

MyQuestions = new LoadVars();
MyQuestions.load('http://www.example.com/games/exam/questions.php?game=pre&q=12');
MyQuestions.onLoad = function() {
question12 = this.question12;
};

text box has a variabe name

question12

the result is it works.