View Full Version : contest game can be made by electroSerever?
vinacora
02-22-2005, 08:05 AM
Hi all, I'm a beginer in multi-programe.And I have a question.Wish you can help me.
Im going to make a contest game like this.
My computer will have many computer connect to(clients). My commputer runs a flashfile that show the question (only the question), the clients run a flashfile that they can see the question from my computer and they have a form for answer the question. The answer will be sent back to my computer and then be shown as a list for each client....
Can the game be make with ElectroServer. And if yes can you show me how or any idea.
Thanks.
crusader
02-22-2005, 03:25 PM
Hello vinacora.
What you're describing sounds very doable.
What you'll have to do is this:
You need to create something like a Lobby, so that all users
can connect and be in the same room. Obviously, you wouldn't
want them to be able to chat with each other, so that they do not
pass the answers along each other. And probably you woulnd't want
them to see who else is in the room - I don't know.
But you should be able to see who is in. So you will need a userlist
like the one found in the "Basic Chat" example that comes along with
the server.
The questions and answers should be stored somewhere and be easily
fetched. I suggest you use an XML file with all the questions and answers inside.
As soon as the program loads flash will read that XML file, parse it and store
the data localy (prefferably to an object). Then you can have a data Flash component
like DataGrid or maybe a simple List where this data will show - only for you. This will
easily let you select a question and send it to everyone in the room so that they can answer.
When you select a question, you'll press a button "Send" or something and the question will be sent
to everyone, along with the possible answers. You could do that with es.sendMove().
The question and possible answers will appear on everyone's screen and they will be able
to choose one answer and send it back to you (via es.sendMove() again) along with their
username.
Every answer you receive will be stored in an object or an array together with the username.
The ES method you should use here is es.moveReceived().
Well, that's more or less.
I hope this helps. Good luck!
webgeek
02-23-2005, 03:00 AM
Thanks for providing an answer, crus! You could also use a plugin that will tabulate results, etc. This would be a way to run automatic contests without a "host" being there. Either way should work fine. Thanks!
marklar
05-05-2005, 06:01 PM
If you want to start simple with you hosting it, the host can use the example chat program unmodified and the contestants can use the example chat with a small modification, their send button needs to be changed so that it sends the host a private message rather than sending the whole room a message.
All the code you need for the private message is in the popup movie clip (you should also disable normal private messages to stop contestants talking privately to eachother).
By the way, some of the www.camfrog.com chatrooms have a running quiz as people chat, you just type the answer for all to see and the bot gives a point to the first correct answer. It's quite a nice feature, I might add that to mine. I think the option to ignore it would be good too though, maybe I'll just put it in one room. If I do it I'll post the source (don't hold your breath though :) ).
Powered by vBulletin® Version 4.1.6 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.