Jump to content
xisto Community
Sign in to follow this  
iGuest

PHP in Flash

Recommended Posts

Hi there, im just trying to use php in macromedia flash. to start easy, ive defined a variable in php

$Hello="Hello";
Then I wrote
echo "&variable=$Hello&";

when i try the php file, it prints on the screen : "&variable=Hello&" which is fine.

on my flash file, ive written:
c= new loadVars();c.onLoad = function () {	v = this["variable"];}c.load ([i]my php file[/i]);

v being a dynamic text field.

but it writes in my textbox: $Hello and not Hello.
Anyone could help?
Thanx!
[/code]

Share this post


Link to post
Share on other sites

i managed to find out how it works, so maybe some would like to know if they have had the same problems.when u test the movie in flash, with [control]+enter, the movie does not use the server, so when you load the php file, instead of writingc.load("myfile.php");you have to writec.load("LOCALHOST/myfile.php") where localhost can be changed by the url of your server.thats it!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.