I think it's a lot easier to learn normal
PHP and MySQL. I'll assume that you can do that, or already have knowledge of both
PHP and MySQL.
The only problem involved therefore is actually communicating data to Flash.
PHP and MySQL still talk to each other in exactly the same way. There are a few ways to talk to Flash though; you can use
XML or send data directly to Flash using flashvars.
The concept is quite simple and very similiar to using forms or
HTTP get vars on normal
HTML pages.
- Code: Select all
loadVariablesNum ("getdata.php?content=&"+aboutus, 0);
PHP can use the content variable just as it would normally, to retrieve data from MySQL. To return data, all it needs to do is echo (or print) data using the Flashvars notation.
eg:
- Code: Select all
echo "_root.content=We are an interesting company&_root.CheckLog=1";
This sends two variables back to Flash - firstly it sends the variable 'content' and it also sends the variable 'CheckLog'.
Variables are denoted by &
_root. specifies that the variables will be in the root of your Flash movie (and not in a particular movieclip, data structure, etc).
If we wanted we could use:
&content=We are an interesting company&CheckLog=1
but this would place the variables wherever the loadVariablesNum function was called.
Technically, this should be all the information you need, I would however suggest that you checkout what I consider to be quite a
good tutorial.