GetDotted Domains

Viewing Thread:
"Help me test something..."

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Sun 24/07/05 at 10:23
Regular
"Pouch Ape"
Posts: 14,499
Yo gang.

[URL]http://www.pocketmonkey.co.uk/chat/[/URL]

Very, very simple 'live' Flash chat room I knocked up as an experiment last night whilst drunk or something. It basically loops at an interval, picks up the 'last message' file and compares that one stored in a Flash variable to see if there's been a change, then it updates depending. I know of one potential flaw with this design, and that's if two people post at exactly the same time. It only updates every half second, so you can see how that would occur. (it can be improved by giving each new message a unique id, then looping and returning each one, but for efficiency - even though I have unlimited webspace - I'll leave this method for another time perhaps)

I'm interested to see if it affects your system resources, performance, etc. It doesn't on mine, but slower machines may suffer - although I don't think they will, like I said it's very, very simple. You'll notice on the connection status thing in the system tray that it's always receiving packets. This is because of what I said above with the looping. It's only receiving one small data file every half second (the last message), it doesn't store message history so there's no need for it to load more than that one file, for the sake of efficiency.

So there you go, enjoy.

(I'll post the code here if anyone's interested, but there's hardly anything involved - the Flash/PHP integration is pretty interesting and useful though, if anyone wants to know how to do that)

EDIT: clearly there's an issue with the font being too small. It's a nice pixel-font here, but Flash hasn't loaded it for some reason. Will sort out for next update, you'll have to zoom-in for now, sorry.

Oh, and the username box is a multiline one by accident - press 'connect', not return to continue.
Sun 24/07/05 at 21:58
Regular
Posts: 5,848
It works, but the page is a little small and not exactly aesthetically pleasing; it's too sparse and a theme wouldn't go amiss

Good for something you 'knocked up when drunk' (like that lad ... Marvin) although really it took you painstaking hours :p
Sun 24/07/05 at 21:52
Regular
"8==="
Posts: 33,481
down wrote:
> (to zoom in, right click the white bit and click zoom in)

Yeah 'the white bit' is the rest of the page background surrounding the chat bit.
Sun 24/07/05 at 19:54
Regular
"Pouch Ape"
Posts: 14,499
Nah, I just copied and pasted sometihng quickly.
Sun 24/07/05 at 19:52
Regular
"NULL"
Posts: 1,384
m_m: I notice you've used the hack to get around global variables. Is there any reason for this? It's not at all hard just to write: $_POST['message'] or whatever.
Sun 24/07/05 at 18:53
Regular
"Captain to you."
Posts: 4,609
thanks
Sun 24/07/05 at 18:38
Regular
"Pouch Ape"
Posts: 14,499
For Chippxero...

First scene - "Username", button pressed which writes username input to variable:

on(release)
{
if(_root.username.text != "")
{ gotoAndPlay("main"); _global.username = _root.username.text; }
}

Next scene: "main"...

In first frame of timeline in Flash:

stop();
_root.local.username.text = _global.username;
_global.maincontent = "Never give out your details on the internet.";
setInterval(loadstuff, 600);
function loadstuff() {
id = Math.random() * 1000;
loadVariables("file_convo.data?uniq=" + id, _root);
if(_root.newcontent != _global.content && _root.newcontent != "" && _global.content != "") {
_global.maincontent = (_root.newcontent + "\n--------------------------\n") + _global.maincontent;
_global.content = _root.newcontent; }
}

Elsewhere on a clip...

onClipEvent(enterFrame)
{ _root.maincontent.text = _global.maincontent; }

In the 'Post This' button - this sends a form (forms in Flash are MC names with input boxes as the field and POSTed variable name)

on(release)
{
if(_root.local.content.text != "")
{ _root.local.loadVariables("update.php", "POST");
_root.local.content.text = "";
runid = 2; }
}

Then in the 'update.php' file which was called by the button - same as
for HMTL:

foreach($_GET as $a=>$b)
{ $$a=$b; $$a = stripslashes($$a); }
foreach($_POST as $a=>$b)
{ $$a=$b; $$a = stripslashes($$a); }
$file = "file_convo.data";
$fp = fopen($file,"w");
fwrite($fp, "newcontent=".$username." says:\n".$message);
fclose($fp);
?>

Bit jumbled, but quite self-explanatory. The receiving textboxes need the corresponding names, but all the variables are loaded into the root so they can be used anywhere. lol thx!
Sun 24/07/05 at 14:53
Posts: 4,686
(to zoom in, right click the white bit and click zoom in)
Sun 24/07/05 at 12:15
Regular
"Pouch Ape"
Posts: 14,499
ok, few more changes. Not going to go overboard - you have to press the button to post still, that'll stay. All you have to do is press tab to go across, and I think it's better that way.
Sun 24/07/05 at 10:51
Regular
"Pouch Ape"
Posts: 14,499
I'll change the font size when I update it next. And all the other stuff.
Sun 24/07/05 at 10:50
Moderator
"Are you sure?"
Posts: 5,000
You're a clever little monkey MM !

Tip for new testers. Right click to get the Flash controls up and click Show All to get a better display size.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Thank you very much for your help!
Top service for free - excellent - thank you very much for your help.
My website looks tremendous!
Fantastic site, easy to follow, simple guides... impressed with whole package. My website looks tremendous. You don't need to be a rocket scientist to set this up, Freeola helps you step-by-step.
Susan

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.