Re-Initializing ApplicationUpdater
hi,
i'm having issues applicationupdater class in air 2.0. need able change updateurl on-the-fly in application, figured best way create new applicationupdater each time url changes. seems work, except seems old applicationupdaters still dispatch status events, though there should single instance of applicationupdater. here's pseudo-code describing situation:
private var appupdater:applicationupdater;
public function initupdater(url:string) {
appupdater = new applicationupdater();
appupdater.addeventlistener(statusupdateevent.update_status, updatestatushandler);
appupdater.addeventlistener(updateevent.initialized, updaterinitialized);
appupdater.updateurl = url;
appupdater.initialize();
}
updatestatushandler gets called number of times initupdater(url:string) called. so, if it's called 3 times, 3 events dispatched updatestatushandler. tried changing appupdater url , not re-initializing, dispatched status events first time checknow() called (is because applicationupdater in wrong state?). seems can checknow() work first time after it's initialized.
i event tried remove event listeners before creating new applicationupdater, had no effect.
any idea issue be?
thanks.
More discussions in Archived Spaces
adobe
Comments
Post a Comment