SumYungGai
January 23rd, 2010, 06:25 PM
I have a source class that gets data through a site and sends it back to the class. It takes a little bit and my main program responds faster than the site does. I got around this problem...kinda, but I'd like to do it an easier way, by using the Event.COMPLETE listener instead of the Event.ENTER_FRAME one.
authUser is in an external class, while checkAuthorized is part of my main program
ActionScript Code:
var trophyAPI:AS3_API = new AS3_API();
trophyAPI.authUser(gameID, privKey, userName, userToken);
trophyAPI.addEventListener(Event.COMPLETE, checkAuthorized);
Something like this, though it says that addEventListener is an undefined method.
authUser takes like, half a second, but it's still taking too long. I was wondering how I could add the Event.COMPLETE to the trophyAPI to make it checkAuthorized when it was done.
Am I going to have to move a bunch of things around?
authUser is in an external class, while checkAuthorized is part of my main program
ActionScript Code:
var trophyAPI:AS3_API = new AS3_API();
trophyAPI.authUser(gameID, privKey, userName, userToken);
trophyAPI.addEventListener(Event.COMPLETE, checkAuthorized);
Something like this, though it says that addEventListener is an undefined method.
authUser takes like, half a second, but it's still taking too long. I was wondering how I could add the Event.COMPLETE to the trophyAPI to make it checkAuthorized when it was done.
Am I going to have to move a bunch of things around?