I'll post this to my little guide in
viewtopic.php?f=29&t=2370 a little later.
Sorry for errors in English, really have some times problems and as a main reason my English is not perfect
To work with PHP - you will need to instal this program - it is pack of programs Apache / mySQL and etc..
http://www.wampserver.com/When you install it - (as i understand it is free) - run it. Open your browser and type localhost - now you are in the site that you pt on your computer when you install WAMP.
Go to wamp icon and click it. Select the www directory. It is location of your site that you can use when type localhost in browser.
Good - now create directory in that www directory and name it for example 1. It is very comfortable to use it that way.
Now when you type in your browser "localhost/1/" you will be in that folder that you made and can choose what php scripr or any other thing to load. Php will not work with out WAMP or another the same program - it will not start work directly. You must to execute it in broswer like i wright earlier.
It is not as hard as it sounds like
The next steps are even more simple.
Now you know how to execute php files. If you load and try to execute flash that use php this way - it will work. Now we need to understand how to make flash that can execute php files and get information from it. It is not hard. Let us first see it on very very veeeery simple example. Just to show the idea of this.
What is the chat ? It is te little program that can get and send information. It have to check some thing than send it to our server. and reed from server than post in our chat window. How to post the text on screen - i think it is very simple to make
If you have the text variable with some text in it - just put it in the standart flash text field. So the main problem is some how write our text variable on server and reed new date to it
Let us imagine a little. What can be much more simple than chat, but can work us how to send/get variables from server and back ? Yes you re wright - it can be for example flash counter that will count for example how much did flash loaded on our site.
So let me first show you how to make it. There is only nesesary code with out any garbage.
To be continied
... some times i think that i am idiot !!!
I made this example some times ago and delete its *.fla file
So i will post the example soon i need to make new one now
Ok i remade example for counter - first unzip all to your www directory / 1 in wamp - you have to see it in localhost/1
Then try to look how is done Counter example - 111.fla
Then you are ready to look Chat source. It's purpose was not an ordinary chat, it was designed to build in another flash / java and etc. so it is a little not oprimized like ordinary chat. And may be it's structure is a little strange
This is the simple example how to work with out MySQL. If some body is interested i can try to find and post some php scripts - that i made for mysql for this chat. The idea is the same - it is no difference betwen text file or MySQL in this context. But if you want to check forum accounts - you will need it. The same for differente groups of users/better optimization and etc..
But you can not use mysql with out paswords from loK forum and etc. becouse you will need to get some date from it - so only Renara i think can use this option. But it is possible to remake design - and if some body will be interested - he will may be even do not need to change flash chat file. Only optimize php for MySql.
It was made on AS3. I did not made it on AS2 but i think it is the same - but some changes in code like:
/*
myLoadVars = new loadVars();
myLoadVars.name = username;
myLoadVars.age = userage;
myLoadVars.comment = usercomment;
myLoadVars.send("file.php", "_self", "POST");
*/
But not myLoadVars.name i think you will need some thing like myLoadVars.requestCode - or some thing like that. But i did not test it on AS2 so ...