i am trying to connect to bigdb. I use client.bigdb.loadmyplayerobject() but what/where exactly is the client?
in my actionscript, i can only use this connect code in the private function handleconnect(client:Client) function because it already has client there.
How can i use or reference client in other places in my code so I can make this call to bigdb wherever i'd like and not be forced to only do it in the handleconnect(client:Client) function?
I am a noob, sorry for my lame question m(_ _)m thank you!
trying to make something like this work?
- Code: Select all
private function loadObjects():void{
client.bigDB.loadMyPlayerObject(function(obj:DatabaseObject):void{
obj.Level = 8; //Modify object
obj.Name = myPlayer.nameThing;
obj.save(); //Save changes
});
}