MongoAS3 is a driver for MongoDb that works without the use of a server side language. The driver is written in pure AS3 so it is usable in both pure AS3/Flash projects as well as Flex projects.
Sample
/* Use a Document object to build the BSON document to save into the database */ const newDocument:Document = new Document(); newDocument.put("name", "Hello from Flash sucka!"); /* Use the insert() method to save. This method does not return anything */ mongo.db("myDatabase").collection("myCollection").insert(newDocument); /* Use a getLastError command to get the status of the last insert attempt. */ mongo.db("myDatabase").runCommand(new Document("getLastError:")).addOnce(onLastError); function onLastError(opReply:OpReply):void { // The command response document will be in the first element // of the documents Array in the OpReply object. The structure // of the document will depend on the command executed. var document:Object = opReply.documents[0]; // The ok property should equal 1 if the insert was a success. if (1 == document.ok) { } }
by @s9tpepper
RT @as3gamegears: New: MongoAS3 (driver for MongoDb that works without server side languages) http://t.co/SiY3vCa7
RT @bioRex21: by @s9tpepper
RT @as3gamegears: New: MongoAS3 (driver for MongoDb that works without server side languages) http://t.co …
RT @as3gamegears http://t.co/cA1odz3R #as3 #flash #gamedev: New: MongoAS3 (driver for MongoDb that works withou… http://t.co/1XxeYY59