i have been stuck on this thing for a while now and can’t find the solution anywhere on the internet. I’m working on making a class file for the flash foru i just made and am stuck on the logging in part. The cript works and logs in the user, but i want to be able to know when the data has been loaded from php to flash.
class trpFF {
public var URLString:String;
//Login Variables
public var user:String;
public var pass:String;
public var output:String;
function trpFF(absoluteURLString:String) {
URLString = absoluteURLString;
System.security.allowDomain(URLString);
}
public function loginUser(username_str:String, password_str:String) {
var lv:LoadVars = new LoadVars();
var lo:LoadVars = new LoadVars();
lv.user = username_str;
lv.pass = password_str;
lo.onLoad = function(sucess:Boolean):Void {
if (sucess) trace(output);
};
lo.onLoad();
lv.sendAndLoad(URLString+"checkuser.php", lo, "POST");
}
}
it works with this and logs me in
as = new trpFF("http://www.trp-florida.com/flash_forum/");
as.loginUser('teddy','any_password');
and i want to be able to do this
as = new trpFF("http://www.trp-florida.com/flash_forum/");
as.loginUser('teddy','any_password');
as.onLoggedIn = function() {
gotoAndPlay(2);
}
thanks for help anyone