the_Flasher
01-29-2003, 10:28 AM
Dear all,
need help in building something of a chat client in Flash and PHP. i've got everything pretty much figured out, but what i hope to find out here is what method is best used for refreshing the chat area?
i'm really in over my head here, trying to figure how to do this. before i go on, allow me to brief you on how this thing works.
i have a backend PHP script that reads/grabs from a text file, all the chat-contents. this PHP script obtains the contents, and outputs it into a flash variable:
eg: &transcript=blah blah blah blah
then i use 'loadVariables' to display the contents into a dynamic text field in the movie.
to refresh the chat area, i use 'setInterval' to invoke loadVariables to the PHP script again, thus, refreshing the '&transcript' variable.
however, i don't think this is the best method, because after loadVariables in invoked a number of times, my Flash player increases CPU usage, and hangs after awhile. i'm thinking that each time 'setInterval' is used, it's filling up a memory buffer somewhere.. until it gets full, and explodes. :-(
so i'm seeking help from any experienced fellows out there who has done a chat thinggie.. and advise me on how i can refresh the chat area of my chat client.
any help is appreciated!!
let me know if anything is not clear!! Thanks a ga-zillion!
need help in building something of a chat client in Flash and PHP. i've got everything pretty much figured out, but what i hope to find out here is what method is best used for refreshing the chat area?
i'm really in over my head here, trying to figure how to do this. before i go on, allow me to brief you on how this thing works.
i have a backend PHP script that reads/grabs from a text file, all the chat-contents. this PHP script obtains the contents, and outputs it into a flash variable:
eg: &transcript=blah blah blah blah
then i use 'loadVariables' to display the contents into a dynamic text field in the movie.
to refresh the chat area, i use 'setInterval' to invoke loadVariables to the PHP script again, thus, refreshing the '&transcript' variable.
however, i don't think this is the best method, because after loadVariables in invoked a number of times, my Flash player increases CPU usage, and hangs after awhile. i'm thinking that each time 'setInterval' is used, it's filling up a memory buffer somewhere.. until it gets full, and explodes. :-(
so i'm seeking help from any experienced fellows out there who has done a chat thinggie.. and advise me on how i can refresh the chat area of my chat client.
any help is appreciated!!
let me know if anything is not clear!! Thanks a ga-zillion!