Run a function on first run of a air application
I want to call a function only when the air application is run on a system for the first time after installation. I开发者_如何学Cs there something I can check to determine this?
Thanks in advance!
I think the best thing to do is use the SharedObject
interface and store a value that tells you that you have done something already. Something like this, perhaps?
var so:SharedObject = SharedObject.getLocal("appName.breadcrumb");
if(!so.data.initialized) {
doYourStuff();
so.data.initialized = true;
}
Does that work for you?
精彩评论