LoadVariablesNum into

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.:slight_smile:
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!!

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?

Hi

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

Zip it :stuck_out_tongue:

Sorry for the delay here is the file.

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.

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!

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:

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!

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]

:slight_smile: 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!

No problem :nerd:

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”, this);[/AS]

This works better :geek: