PLEASE HELP .php Chat Room
I have set up a chat room with PHP and its not working. It works fine when its on the main timeline, but when I put it inside a MC thats inside a MC it doesen't post the messages. It writes the message in the .txt file fine, but it doesn't post it in the Flash dynamic text where all of the posts go. ARG!!!!!
In another words, how do I set up a chat room that was originally set up to for the _root level (main timeline). Here is the PHP script that is suppose to load the .txt info.:
PHP Code:
<? header("Expires: ".gmdate("D, d M Y H:i:s")."GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); ?> <?
/* Modified for Flashkit by swissLyons: [url]http://www.flashbuilder.ch[/url] based on the [url]http://www.peopleforfun.com[/url] version */ /* Original script by Nicola Delbono <key5@key5.com> */ ?>
<? $nickname = str_replace (""," ", $nickname); $nickname = str_replace ("<", " ", $nickname); $nickname = str_replace (">", " ", $nickname); $nickname = stripslashes ($nickname); ?>
&output= <? $chat_file = "chat.txt"; $chat_lenght = 40; $max_single_msg_lenght = 100000; $max_file_size = $chat_lenght * $max_single_msg_lenght; $file_size= filesize($chat_file); if ($file_size > $max_file_size) { $lines = file($chat_file); $a = count($lines); $u = $a - $chat_lenght; for($i = $a; $i >= $u ;$i--){ $msg_old = $lines[$i] . $msg_old; } $deleted = unlink($chat_file); $fp = fopen($chat_file, "a+"); $fw = fwrite($fp, $msg_old); fclose($fp); } $msg = str_replace (""," ", $message);
$msg = stripslashes ($msg); if ($msg != ""){ $fp = fopen($chat_file, "a+"); $fw = fwrite($fp, "$nickname : $msg"); fclose($fp);} $lines = file($chat_file); $a = count($lines); $u = $a - $chat_lenght; for($i = $a; $i >= $u ;$i--){ echo $lines[$i]; }
?>
Thanks!
FlashKit > Flash Help > Flash General Help
Posted on: 08-25-2004, 01:48 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Chat Room Help
I have been trying to get a chatroom developed in Flash 5 up and running but it can't conect to the server? Can anyone send me actionscripts for a chatroom. This is being developed for YouthBank a local charity in Tyne & Wear. Hope you can help.
Thanks
Darren
Chat Room
Hey everyone is it possible to have a chat room in flash (of course it is) BUT HOW DO YOU DO IT....... i got a server and a database everything you need, now what do i do in actionscript???
Chat Room
is it possible to make a chat room using flash? one that evryone sees wen ppl are on it at the same tiime, u know, just like a chat room???
oh, and does anyone know how you make a bullet come out a gun in the direction the gun is pointing (and th gun moves)
Cheers
Your Friendly Neighbourhood PlugDude
PLEASE HELP .php Chat Room
I have set up a chat room with PHP and its not working. It works fine when its on the main timeline, but when I put it inside a MC thats inside a MC it doesen't post the messages. It writes the message in the .txt file fine, but it doesn't post it in the Flash dynamic text where all of the posts go. ARG!!!!!
In another words, how do I set up a chat room that was originally set up to for the _root level (main timeline). Here is the PHP script that is suppose to load the .txt info.:
PHP Code:
<?
header("Expires: ".gmdate("D, d M Y H:i:s")."GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
?>
<?
/* Modified for Flashkit by swissLyons: [url]http://www.flashbuilder.ch[/url] based on the [url]http://www.peopleforfun.com[/url] version */
/* Original script by Nicola Delbono <key5@key5.com> */
?>
<?
$nickname = str_replace ("
"," ", $nickname);
$nickname = str_replace ("<", " ", $nickname);
$nickname = str_replace (">", " ", $nickname);
$nickname = stripslashes ($nickname);
?>
&output=
<?
$chat_file = "chat.txt";
$chat_lenght = 40;
$max_single_msg_lenght = 100000;
$max_file_size = $chat_lenght * $max_single_msg_lenght;
$file_size= filesize($chat_file);
if ($file_size > $max_file_size) {
$lines = file($chat_file);
$a = count($lines);
$u = $a - $chat_lenght;
for($i = $a; $i >= $u ;$i--){
$msg_old = $lines[$i] . $msg_old;
}
$deleted = unlink($chat_file);
$fp = fopen($chat_file, "a+");
$fw = fwrite($fp, $msg_old);
fclose($fp);
}
$msg = str_replace ("
"," ", $message);
$msg = stripslashes ($msg);
if ($msg != ""){
$fp = fopen($chat_file, "a+");
$fw = fwrite($fp, "$nickname : $msg
");
fclose($fp);}
$lines = file($chat_file);
$a = count($lines);
$u = $a - $chat_lenght;
for($i = $a; $i >= $u ;$i--){
echo $lines[$i];
}
?>
Chat Room
hello all
was wondering if anybody knows how to create a chat room using flash and php??
thanks in advance
shrav
Chat Room
im not really a nOOb as such just not very good at php (yet) so anyway....
How do you make a chat room? preferbly one with a login so it would be able to remeber people. If you have any links/tutiriols that could me much appreciated.
Thank you
Please Help, Chat Room ?
OK, so I've followed a tutorial on how to build a simple chat client, but it's way too basic for what I'm trying to do.
I want to build a chat room that recognizes users profile statisitics and displays them with a profile picture in the corner of the chat box.
Also would like to throw in webcam cababilities.
Does anyone know where I can dig up some advanced tutorials or books for this? All the literature shows how to set up the "simple" chat client.
Thanks
Chat Room
I have a website,but i'd like a flash chatroom.
Where do i start?
Chat Room?
i saw a chatroom somewhere made out of flash, and maybee php... is there ne1 out there who would maybee be able to provide a code for this? i really need help with my flashing (program, not nakid [duh])
Chat Room Help Please
Can anyone show me how to make a chatroom with php and that shows the people that are online and automatically erases previous messages when a user logs on.
Chat Room....
any ideas on how i could find out how to create a chat room? i downloaded ElectroServer 3 which will allow me a multiplayer socket but i dont now how to go from there. With the server you can have a example chat which i could use but its very hard to understand, i really need to make it connect to this server so i can have my other parts of the game multiplayer to. any ideas?
Thanks
Jay
Chat Room Help Please
Can anyone show me how to make a chatroom with php and that shows the people that are online and automatically erases previous messages when a user logs on.
Chat Room....
any ideas on how i could find out how to create a chat room? i downloaded ElectroServer 3 which will allow me a multiplayer socket but i dont now how to go from there. With the server you can have a example chat which i could use but its very hard to understand, i really need to make it connect to this server so i can have my other parts of the game multiplayer to. any ideas?
Thanks
Jay
Chat Room
Does anyone now how (if possible) to build a chat room in flash? Doesn't require user information, just a basic chat room? Thanks in advance
Chat Room
I'm creating a chat room, and i've figured out alot of it. But the problem is that everytime i enter a line of text, i can't figure out how to put a space between the previous line and the new line. help!! please!!!
Chat Room
Whats the best way to do a chat room in flash?
I have made a chat room the only way I know how but its far from perfect. I submit text to a database when [submit] is pushed and have the flash movie load the text from the database on 10 second intervals.
Obviously this is not the best way to do this as it keeps checking the database every 10 seconds even if there hasn't been a change. It really sucks up my bandwidth
Does antone know any other way this could be done? I don't need a full explanation just a point in the right direction
There used to be a chat room on ultrashock (with little robots you could control) Anyone know how that was done?
Cheers
-Rob
Flash Chat Room
I really want to understand how to build a flash chatroom. As far as i know the flash part is the EZ part, its the CGI that has me a little nervous, and then integrating the two.....is there any resources that I could start to study, or someone willing to provide a quick walk through of the concept? I would greatly appreciate any input in helping me in this adventure.
Chat Room In Flash Using ASP
Hey:
I wanna make a chatting room in flash using ASP!!
Any example files..tutorials..etc??
plz help ..i need it fast
!!!
thanx in advance
Flash Chat Room
Does anybody know how to make a chat room in Flash 5? Cause I am making a fan site and I don't know how to make a chat room in flash. Thanks!
Chat Room Construction
I want to build a chat room using flash 5 does anyone have any ideas how I can do this? or recomend any good websites that deal with chat room construction
HELP FLASH CHAT ROOM ?
I am currently working on a project that will involde server side but i dont know a thing about server side and it will involve a flash chatroom could someone please help me make one please?
thanks in advance
Flash Chat Room
Is it possible to make a Flash Chat Room? If so, does anyone have a Fla or Zip so I can see how it works? Thanks.
Chat Room In Flash Mx
does any 1 kno how to make a chat room in flash mx if they do please send me a fla file to adilzaheer@msn.com or a turotial please -e-mail be that to or give me a link to wher the tutorial is thanks
Make A Chat Room
Make a Chat Room
Or even get one from someone else that works!
Please Help
If you do it for me ill pay or somthing.
Chat Room Problem
I put up a chat room from a tutorial I found on flashkit.
Problem is that while typing every once in a while the chat room goes on a lag: the screen get erased of all typing and people get boot off ...
I am not an expert... I am trying to figure out what is wrong and how I can fix it! Any idea? (I started with flash 5 and resaved the fla file in MX later, could it be the problem?!)
chatroom.zip
Flash Chat Room
Thats right I want to script a chat room in my flash MX game. I know, you gotta have a server, well i do...and a website for it also at www.street-warz.com If anyone has any idea how to add a chat room to a flash game PLEASE PLEASE show me. Thank you for your time.
Flash Chat Room
Does anyone know how to build a chatroom like the one on this website :: www.fernandovargas.com ::
Flash Chat Room
Can anyone help me make a flash chat room using java or perl. Or give me a url 2 a site which helps you make a flash chat room.
Thanks
Required Chat Room
Hi dose any one have chat system i required source code in action scripting..
Help Simple Chat Room
HI there,
i'm looking for a sample code of a simple chatting application which connects locally. just a normal login, and a chat room.
Chat Room Without SimpleConnect
I have done a chat room with the simpleConnect component and am now trying the same thing doing the connection manually.
The code I have is:
//**************Code start
connections=new NetConnection();
connections.onStatus=function(info){
trace(info.code)
trace(info.application.msg)
if (! connected)
{
light_mc.connect(this)
chat_mc.connect(this)
connected=true
}
};
connections.connect("rtmp:/JWTestConnection","Guest","Guesty"));
//************Code End
It's pretty clear that the connection is successful and the light_mc turns green, but the chat_mc.connect(this) doesn't seem to do anything, so I don't see the chat border , message or send button.
I'm following the O'Reilly Flash Communication Server book and can't see where I'm going wrong.
just for info. The srver side code I have is:
//********************Code Start
load("components.asc");
application.onConnect=function (client,userName,password)
{
application.acceptConnection(client);
}
//*********************Code end
Flash/PHP Chat Room
Hi there!
I want to make a really-really basic chat program integrate in my site; however I need a tutorial since I'm not that good at PHP and whatnot.
I searched these forums, tried some tutorials, but couldn't get them to work
This one was mentioned several times:
http://www.sephiroth.it/tutorials/flashPHP/flash_chat/
Seems decent, but can't get it to work.
So. Do any of you know any good tutorials?
Thanks in advance!
I Need A Chat Room Without Using Servers Or Php
hi...
i need a chat application to work on my site, but the free hoasting does not let me use php or any special server to have an chat.
could i have a chat and maybe run on another site but still have the app on my site,
is it possible?
thanks
Chat Room Issue
I creating a chat room and its work with client "NetConnection.Connect.Success " but I cant connect it on my Server and its give me " NetConnection.Connect.Failed".
I check my Firewall and the ports " 1111 " & " 1935 " on Router and its work too
I check it on localhost and its work and i get it "NetConnection.Connect.Success"
IIs is work good because my client see my chat and its connect with them but i get Error on Internet Explorer "Problems with this Web page might prevent it from being displayed properly or functioning properly.
Line: 156084965
Char: 3
Error: Access is denied
Code: 0
URL: http://www.freewebs.com/bada_bada0/textchat.swf
Are this problem have affect on my chat or another ? sorry if i tired somebody to solve my problem but i try more times to solve it and no way
IPhone Chat Room
Hey, hello to everyone
i am currently figuring out a way to access a shared object from whitin the iPhone, out of FMS
i am thinking of making of developing a kind of web service that connects to the FMS, with BlazeDS
so that way i could fetch the data with a simple webservice connector, is this something that could be done?
or do you guys have a better idea?
Chat Room In Flash Mx
Hi
can any one help to develop or give sample with fla file that how to develop a chat room in Flash, i need idea to comnicate via server side that how can i share message to all client's , i need it for my site www.cmxd.com , you need Msie with 17" monitor or 1023 by 768 screen resolution to view site exactly as i develop.
__________________
Regards
Sajjad
CMXD.studios - CodeMasters & xTreme deZinerz
http://www.cmxd.com
How Do I Make A Chat Room
hi there does anybody know how to make a chat room in flash mx? or is there any better ways of making a chat room. i have the chat component but i dont know how to use it.
thanks in advance
Passwords For A Chat Room?
Hey, i'm doing a project for school. I have a flash chat room made by Colin Moock at www.moock.org, and i'm going to put it into another website so the owner can host scheduled chats. The idea is to sell the passwords so he makes money off of it. Is there a way i can make an if, then statement to check to see if the password is valid and then either let them in or deny access and to only use each password once (so two people coudn't be on the same password at one time)? I was thinking somewhere along the lines of
if (password == //the passwords that he makes up)
then (gotoAndStop(accessGranted))
else (gotoAndStop(accessDenied))
does that sound like it would work? And how would I make Flash know where to look for the passwords and how to read it from the text field etc? I know this is kinda long, but i'm new to actionscript. Thanks!
Chat Room In Flash 5?
Does anyone know how to make a chat room in Macromedia Flash 5? It may require php? If you do, can anyone tell me how or give me a website that does? Thx.
Flash Chat Room
I've been working on a flash chat room for the past couple of weeks. The only thing I can't figure out is how to make flash display who is online, and keep this list refreshed..
Anyone got any Ideas. It's made with flash and php
Help With Flash Chat Room.
this is a cry for help for any one who has suffered defeat time and time again at gettign somethign to work.
----------
flash chat rooms i dont get it.
ive dipped my hand in everything. from digital arts, to C++ to advance photoshop filters, to 3ds max, to html and lingo and ofcourse acctionscript.
but i just dont get it.
i have been trying to make a basic online flash cat room for over a year now (by that i mean i trued doing one a year ago, failed and never tried it again until a few days ago)
but as any of you know a few days trying to make somethign work is hugly frustrating.
a few days ago, i never understood mysql (im no master now) but as soon as (with the users help on this fine forum) i made a mysql database work. i got the concept.
and i kinda get the concept of this flash chat.
now the bottom line is, i am absolutly sick and absolutly tired of trying to get this to work (anyone who has been in a similar situation im sure feels my pain, of constant frustration, confussion and failure).
--------
so to what i am asking for.
<a href="http://www.gotoandplay.it/_articles/2003/12/xmlSocket.php">http://www.gotoandplay.it/_articles/2003/12/xmlSocket.php</a>
thats the tutorial i am doing.
my server is on freehostia.com
so, what am i meant to put on my server. what am i meant to change in the code. i understand the local host should be changed, but i would of thought my localhost would be my website
peaphil.freehostia.com
but that doesnt work.
ive looked at everything, and ive read everything. and i simply dont get it. by everythign, i mean on flash chat rooms and servers, not everything ever concieved or written.
i just want to know exactly what to do, then when it finially works, i can take that information and expand it.
also, i dont know if its my host? does it allow socket connections? it doesnt say. so trying ages to get it to work of freehostia, could only lead to more frustration.
please help me, im very very much comtimplating giving up and never looking in to online interaction and communication (and as a designer i think its becoming more and more important).
How Do I Make A Chat Room
hi there does anybody know how to make a chat room in flash mx? or is there any better ways of making a chat room. i have the chat component but i dont know how to use it.
thanks in advance
Flash Chat Room
I've been working on a flash chat room for the past couple of weeks. The only thing I can't figure out is how to make flash display who is online, and keep this list refreshed..
Anyone got any Ideas. It's made with flash and php
|