[SWFObject] help, can't get expressinstall to work
Jim Berkey
jim at jimbo.us
Mon Jul 24 11:19:17 PDT 2006
I believe that the most 'idiot-proof' method would be:
// first frame of movie
#include "expressinstall.as"
var ExpressInstall = new ExpressInstall();
if (ExpressInstall.needsUpdate) {
ExpressInstall.init();
stop();
}
/////// end of express install check on first frame of movie
If you are testing for version 9, your html code should be:
var so = new SWFObject("images/teaser.swf", "teaser", "220", "60", "9", "#ffffff",true);
The code you showed, tested for version 8.0.22:
var so = new SWFObject("images/teaser.swf", "teaser", "220", "60", "8.0.22", "#ffffff",true);
However . . . this is still not 'without any interaction required on the users behalf' - afaik, there must always be user intervention, clicking on the 'upgrade now' button. But they will install the latest version, and then be returned to your page.
jimbo
*********** REPLY SEPARATOR ***********
On 7/24/2006 at 12:49 PM Phillip K wrote:
HI,
I'm having a problem getting the expressinstall feature working correctly. When the page is loaded with the embedded flash file, I want the actionscript to automatically upgrade/install flash 9 without any interaction required on the users behalf.
I followed the instructions according to the following link:
and entered the code in the first keyframe
---------------------BEGIN actionscript code---------------------------------------------
#include "expressinstall.as"
// initialize the ExpressInstall object
var ExpressInstall = new ExpressInstall();
// if the user needs to upgrade, show the 'start upgrade' button
if (ExpressInstall.needsUpdate) {
// this is optional, you could also automatically start the
// upgrade by calling ExpressInstall.init() here instead of the following lines
// attach the custom upgrade message and center it
var upgradeMsg = attachMovie("upgradeMsg_src", "upgradeMsg", 1);
upgradeMsg._x = Stage.width / 2;
upgradeMsg._y = Stage.height / 2;
// attach the button actions that will start the ExpresInstall updater
upgradeMsg.upgradeBtn.onRelease = function() {
// the ExpressInstall.init() method is what kicks off the actual update
ExpressInstall.init();
}
// if expressinstall is invoked, stop the timeline.
stop();
}
---------------------end actionscript code---------------------------------------------
In the second keyframe of the example source/so_tester.fla file, I noticed there was also the stop action
I have the following working on an html page with a small swf file embedded in it.
---------------------BEGIN html code --------------------
<div id="flashcontent">
<a href="http://www.macromedia.com/go/getflashplayer"><img src="images/flash_install.gif" alt="Get macromedia Flash Player" style="border: none;" /></a>
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("images/teaser.swf", "teaser", "220", "60", "8.0.22", "#ffffff",true);
so.addParam("menu", "false");
so.write("flashcontent");
// ]]>
---------------------END html code --------------------
The above works fine with the subsitution of the flash file with the get flash link but thats not what i'm aiming for. I want the script to autoamatically install the latest and greatest version of flash if its not flash 9.
thanks in advance,
Phill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.deconcept.com/pipermail/swfobject-deconcept.com/attachments/20060724/14e32151/attachment-0005.htm>
More information about the Swfobject
mailing list