diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-13 09:49:11 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-13 09:49:11 +0000 |
commit | e44a7e37b6c7b5961adaffc62b9042b8d442938e (patch) | |
tree | 95b67c356e93163467db2451f2b8cce84ed5d582 /includes/js/dojox/flash/ExpressInstall.as | |
parent | a62b9742ee5e28bcec6872d88f50f25b820914f6 (diff) | |
download | semanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.gz semanticscuttle-e44a7e37b6c7b5961adaffc62b9042b8d442938e.tar.bz2 |
New feature: basic Ajax suggestion for tags and implementation of Dojo toolkit
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@151 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/flash/ExpressInstall.as')
-rw-r--r-- | includes/js/dojox/flash/ExpressInstall.as | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/includes/js/dojox/flash/ExpressInstall.as b/includes/js/dojox/flash/ExpressInstall.as new file mode 100644 index 0000000..1801171 --- /dev/null +++ b/includes/js/dojox/flash/ExpressInstall.as @@ -0,0 +1,71 @@ +/**
+ * Based on the expressinstall.as class created by Geoff Stearns as part
+ * of the FlashObject library.
+ *
+ * Use this file to invoke the Macromedia Flash Player Express Install functionality
+ * This file is intended for use with the FlashObject embed script. You can download FlashObject
+ * and this file at the following URL: http://blog.deconcept.com/flashobject/
+ *
+ * Usage:
+ * var ExpressInstall = new ExpressInstall();
+ *
+ * // test to see if install is needed:
+ * if (ExpressInstall.needsUpdate) { // returns true if update is needed
+ * ExpressInstall.init(); // starts the update
+ * }
+ *
+ * NOTE: Your Flash movie must be at least 214px by 137px in order to use ExpressInstall.
+ *
+ */
+
+class ExpressInstall{
+ public var needsUpdate:Boolean;
+ private var updater:MovieClip;
+ private var hold:MovieClip;
+
+ public function ExpressInstall(){
+ // does the user need to update?
+ this.needsUpdate = (_root.MMplayerType == undefined) ? false : true;
+ }
+
+ public function init():Void{
+ this.loadUpdater();
+ }
+
+ public function loadUpdater():Void{
+ System.security.allowDomain("fpdownload.macromedia.com");
+
+ // hope that nothing is at a depth of 10000000, you can change this depth if needed, but you want
+ // it to be on top of your content if you have any stuff on the first frame
+ this.updater = _root.createEmptyMovieClip("expressInstallHolder", 10000000);
+
+ // register the callback so we know if they cancel or there is an error
+ var _self = this;
+ this.updater.installStatus = _self.onInstallStatus;
+ this.hold = this.updater.createEmptyMovieClip("hold", 1);
+
+ // can't use movieClipLoader because it has to work in 6.0.65
+ this.updater.onEnterFrame = function():Void {
+ if(typeof this.hold.startUpdate == 'function'){
+ _self.initUpdater();
+ this.onEnterFrame = null;
+ }
+ }
+
+ var cacheBuster:Number = Math.random();
+
+ this.hold.loadMovie("http://fpdownload.macromedia.com/pub/flashplayer/"
+ +"update/current/swf/autoUpdater.swf?"+ cacheBuster);
+ }
+
+ private function initUpdater():Void{
+ this.hold.redirectURL = _root.MMredirectURL;
+ this.hold.MMplayerType = _root.MMplayerType;
+ this.hold.MMdoctitle = _root.MMdoctitle;
+ this.hold.startUpdate();
+ }
+
+ public function onInstallStatus(msg):Void{
+ getURL("javascript:dojox.flash.install._onInstallStatus('"+msg+"')");
+ }
+}
|