1
8
9 import com.sekati.core.FWDepth;
10 import com.sekati.events.Event;
11 import com.sekati.events.Dispatcher;
12
28 class com.sekati.net.ExpressInstall {
29 private var _this:ExpressInstall;
30 private var _updater:MovieClip;
31 private var _holder:MovieClip;
32
36 public function ExpressInstall() {
37 _this = this;
38 if (_root.MMplayerType != undefined) loadUpdater( );
39 }
40 private function loadUpdater():Void {
41 _root.stop( );
42 System.security.allowDomain( "fpdownload.macromedia.com" );
43 _updater = _root.createEmptyMovieClip( "expressInstallHolder", FWDepth.ExpressInstall );
44
45 _updater.installStatus = onInstallStatus;
46 _holder = _updater.createEmptyMovieClip( "_holder", 1 );
47
48 _updater.onEnterFrame = function ():Void {
49 if (typeof _holder.startUpdate == "function") {
50 _this.initUpdater( );
51 _updater.onEnterFrame = null;
52 }
53 };
54 _holder.loadMovie( "http://fpdownload.macromedia.com/pub/flashplayer/" + "update/current/swf/autoUpdater.swf?" + Math.random( ) );
55 }
56 private function initUpdater():Void {
57 _holder.redirectURL = _level0.MMredirectURL;
58 _holder.MMplayerType = _level0.MMplayerType;
59 _holder.MMdoctitle = _level0.MMdoctitle;
60 _holder.startUpdate( );
61 }
62
67 public function onInstallStatus(msg:String):Void {
68 Dispatcher.$.dispatchEvent( new Event( "ExpressInstall_onInstallStatus", this, {message:msg} ) );
69 }
70 }