开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜