PDA

View Full Version : [DHTML + AIM] = Multiplayer Cross Browser Games



magicgavin
10-24-2007, 03:17 PM
1) CODE TITLE: DHTML + AIM = Multiplayer Cross Browser Games

2) AUTHOR NAME/NOTES:

This is done using the web aim (http://developer.aim.com/webaim)
The code is not by me but I modified it. It's original location is (http://slayeroffice.com/arcade/memory-match/)
The above url has extra code because it's implemented in a game already. The demo I provide is the bare minimum of what you need so you can see how it works.

3) DESCRIPTION:

This is the call to send data to the other user

AIM.transactions.sendDataIM(xaim.otheruser,"{nData={dType:'test',data:'This is a test'}}",xaim.cap,"Data");

There are 2 parts.
The case name and the data that will be handle by the case.
In the above the case name is 'test' and the data it will handle is 'This is a test'

the case that handles the data is as follows

case "test":
alert(oData.data)
break;

you can add as many cases as you want to handle the data in different ways

while there is a lot more to the script such as sending invites and apikeys I will try to answer any questions you have.

4) URL TO CODE: http://javag.f2g.net/xaim/xaim.html - Live Demo.
Open it in firefox and IE.
Sign in as different screen names for both and send an request using one of them.

SN: javagtest1 PASS: 123456
SN: javagtest2 PASS: 123456


The chat works and the test button sends an alert to the other user.