# LoadVariablesNum into

**URL:** https://forum.kirupa.com/t/loadvariablesnum-into/23467
**Category:** flash
**Created:** [June 18, 2003, 11:40am UTC](https://forum.kirupa.com/t/loadvariablesnum-into/23467 "2003-06-18T11:40:54Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![spartacus](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@spartacus](https://forum.kirupa.com/u/spartacus)
#### Post date: [June 18, 2003, 11:40am UTC](https://forum.kirupa.com/t/loadvariablesnum-into/23467/1 "2003-06-18T11:40:54Z")

</div>

I am fairly new to actionscript and think i may be trying something above my station here!  
I have a main .swf file and when a button is clicked I am loading a new .swf into a blank movie clip instance on the main stage. This works fine.🙂  
The problem is that this new .swf is pulling text from a .php file. When I load the .swf on its own the text displays fine, however when I click the button and the .swf loads in the main movie, the dynamic text does not appear.  
Can anyone out there stop me from pulling out what little hair I have!!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 18, 2003, 1:00pm UTC](https://forum.kirupa.com/t/loadvariablesnum-into/23467/2 "2003-06-18T13:00:41Z")

</div>

It has been a year ago when I last worked with php and flash. Although the mistake I usually made was that I wanted to load the content too fast from the database which gave me an empty content because it was not loaded.

But I can’t judge at this point. Could you post the .fla?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 18, 2003, 1:11pm UTC](https://forum.kirupa.com/t/loadvariablesnum-into/23467/3 "2003-06-18T13:11:39Z")

</div>

Hi

I have tried to post the .fla but it says it is too big - any suggestions?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 18, 2003, 1:29pm UTC](https://forum.kirupa.com/t/loadvariablesnum-into/23467/4 "2003-06-18T13:29:00Z")

</div>

Zip it 😛

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 19, 2003, 8:19am UTC](https://forum.kirupa.com/t/loadvariablesnum-into/23467/5 "2003-06-19T08:19:24Z")

</div>

Sorry for the delay here is the file.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 19, 2003, 10:20am UTC](https://forum.kirupa.com/t/loadvariablesnum-into/23467/6 "2003-06-19T10:20:00Z")

</div>

Okay, I took a peek at it and I saw that the loadVariablesNum only got loaded in the first frame. What I remember from my work was that I used to have a “loop” for the loadVariables and I took the dynamic textfields offscreen but visible (for the developer) and all movie long.

For the loop I created something rather easy in the 3rd frame (makes sure your movie isn’t doing something else it will look rather stupid):  
[AS]If(DateAndTime == “”){  
gotoAndPlay(1);  
}[/AS]  
It has been some time but I think seeing the simplicity it’s worth a try.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 19, 2003, 10:54am UTC](https://forum.kirupa.com/t/loadvariablesnum-into/23467/7 "2003-06-19T10:54:43Z")

</div>

Sorry, its not the date and time that dont work! If you click the button on the left it loads in a new movie into a blank movie clip on the main stage. It is this movie that contains action script to pull in variables, but that show up on their own i.e. when the movie is loaded independantly, but not when pulled in to the other movie if you see what I mean.  
I have attached the other movie too this time!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 19, 2003, 1:48pm UTC](https://forum.kirupa.com/t/loadvariablesnum-into/23467/8 "2003-06-19T13:48:44Z")

</div>

Okay, for an easy answer for now you could catch the text on the root and send it once the user clicks on a button to the ‘about’ page. I have had this once and I think I did it like this. Plain and simple.

I don’t know if it’s the best.

:geek:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 19, 2003, 3:31pm UTC](https://forum.kirupa.com/t/loadvariablesnum-into/23467/9 "2003-06-19T15:31:14Z")

</div>

Do you mean load the text variable on the main movie and get it to display on the about movie?  
I did try this using the same code as is written on the about movie and it still would not pick up the text, but probably I did it wrong. Could you give me a quick rundown of the actionscript in need to use.  
Thankyou!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 20, 2003, 8:47am UTC](https://forum.kirupa.com/t/loadvariablesnum-into/23467/10 "2003-06-20T08:47:36Z")

</div>

Just load the php on the \_root of the movie and fetch the text from your database in an ordinary dynamic text. Then in your about movieclip you could do something simple like:  
[AS]textFieldInAboutmc = \_root.AboutTextField[/AS]

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 20, 2003, 9:30am UTC](https://forum.kirupa.com/t/loadvariablesnum-into/23467/11 "2003-06-20T09:30:37Z")

</div>

🙂 Thankyou for your help (and patience!) I have done the code how you suggested and it all works perfectly - now to repeat the process with some more complicated .php!

Thanks Again!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 20, 2003, 10:03am UTC](https://forum.kirupa.com/t/loadvariablesnum-into/23467/12 "2003-06-20T10:03:58Z")

</div>

No problem :nerd:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 23, 2003, 12:04pm UTC](https://forum.kirupa.com/t/loadvariablesnum-into/23467/13 "2003-06-23T12:04:24Z")

</div>

Okay! I couldn’t bare with my solution so I did a little bit of examination. In your about movieClip change the loadVar line into: [AS]loadVariables (“[http://www.pso.org.uk/SITE\_PAGES/flash/php/about\_us.php](http://www.pso.org.uk/SITE_PAGES/flash/php/about_us.php)”, this);[/AS]

This works better :geek:
