Forum Moderators: coopster
i know this is more of an ActionScript question than a PHP question, but this is the closest forum on this site that know of.
the PHP script is at
http://site.com/streams/update.php
How do I do this?
In Flash:
frame 1:
done=false;
frame 2:
LoadVariables("mysite.com/mypage.php");
frame 3:
if (!done){
gotoAndPlay(_currentframe-1);
}
Then in your PHP script "mypage.php":
1) do all your hidden stuff,
2) echo "done=true"
This example makes your Flash wait in a loop until the server has finished its tasks.
Experiment with that technique, and I'm sure you'll find some way to accomplish your goal.
good luck!
You'll need to look up the proper syntax, here:
h**p://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary425.html
The other frames in my example are only necessary if you want Flash to loop until the data is loaded (i.e. if subsequent frames need the returned data). If you are not passing any data into Flash, then just use the one command LoadVariables().
That method works when the SWF is embedded on a page, shown with the browser plugin. It just takes some tinkering to get everything connected right.
FYI - the EXE projector does not have all the capabilities that the browser plugin has, especially requesting and loading URLs. You might need to experiment with a Flash wrapper like SWF Studio (from Northcode).