Hi list,

I'm looking to use the ExpressInstall feature with Geoff's FlashObject
in a fla that preload content and is set to export classes in frame 5.

As Geoff explain, you must to use the ExpressInstall class and insert
a little snippet in frame 1, but in my case I can't use classes before
frame 5.

I want to ask you if you know an alternative form or some easy
workaround for this.

btw, I convert the class to a script and it's working for me, but I
want to know is there some easy way.

Here is my solution (a conversion of the Geoff's class):

Put the following script in frame one and let your classes to export
in another frame than one:

-------------------------------------
stop();

if (_root.MMplayerType == undefined) {
 gotoAndPlay(2);
}

var updater:MovieClip;
var hold:MovieClip;

loadUpdater = function() {
        System.security.allowDomain("fpdownload.macromedia.com");
        
        updater = _root.createEmptyMovieClip("expressInstallHolder", 10000000);
        updater.installStatus = installStatus;
        hold = updater.createEmptyMovieClip("hold", 1);

        updater.onEnterFrame = function() {
                if (typeof hold.startUpdate == 'function') {
                        loadInit();
                        delete this.onEnterFrame;
                }
        }

        var cacheBuster = Math.random();
        
hold.loadMovie("http://fpdownload.macromedia.com/pub/flashplayer/update/current/swf/autoUpdater.swf?"+
cacheBuster);
}

loadInit = function() {
        hold.redirectURL = _root.MMredirectURL;
        hold.MMplayerType = _root.MMplayerType;
        hold.MMdoctitle = _root.MMdoctitle;
        hold.startUpdate();
}

installStatus = function(statusValue) {
        if (statusValue == "Download.Complete") {
                // Installation is complete. In most cases the browser window 
that this SWF 
                // is hosted in will be closed by the installer or manually by 
the end user
        } else if (statusValue == "Download.Cancelled") {
                // The end user chose "NO" when prompted to install the new 
player
                // by default no User Interface is presented in this case. It 
is left up to 
                // the developer to provide an alternate experience in this case
                
                // feel free to change this to whatever you want, js errors are
sufficient for this example
                getURL("javascript:alert('This content requires a more recent
version of the Macromedia Flash Player.')");
        } else if (statusValue == "Download.Failed") {
                // The end user failed to download the installer due to a 
network failure
                // by default no User Interface is presented in this case. It 
is left up to 
                // the developer to provide an alternate experience in this case
                
                // feel free to change this to whatever you want, js errors are
sufficient for this example
                getURL("javascript:alert('There was an error in downloading the
Flash Player update. Please try again later, or visit macrmedia.com to
download the latest version of the Flash plugin.')");
        }
}

loadUpdater();
--------------------------------------------


If you know some other way, I'll like to hear about it

Best,

-- 
::| Carlos Rovira
::| http://www.carlosrovira.com

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to