[SWFObject] ExpressInstall is not always stopping movie

Jim Berkey jim at jimbo.us
Sat Jul 1 05:44:35 PDT 2006


Thanks for sharing that code, it's pretty sweet. 
jim

*********** REPLY SEPARATOR  ***********

On 7/1/2006 at 10:05 PM Daniel Klein wrote:

>Thanks Jim,
>
>I had thought of that but I'd just shifted all my content up a frame and
>it was a pain to do so I didn't want to do it again unless I absolutely
>had to. In the mean time I have come up with my own solution. My code in
>frame 2 looks like this:
>
>/* lots of code that has nothing to do with SWFObject */
>_root.onEnterFrame = function() {
>	//if (getBytesLoaded()<getBytesTotal() || ExpressInstall.needsUpdate) {
>	if (getBytesLoaded()<getBytesTotal() || expressinited == true) {
>		gotoAndStop(1);
>	} else {
>		gohome(); // or gotoAndStop(3); etc.
>	}
>};
>
>The commented-out line is how I originally tried to do it but it didn't
>work. The variable I added (see previous message for frame 1 code) seems
>to be more reliable than testing for ExpressInstall.needsUpdate again.
>If anyone wants to use this code in their own movie feel free.
>
>Interesting: the bit about the loader being in frames 2 & 3. My loader
>(as you can see) is in frames 1 & 2. I would like to know if this is
>common but obviously this is not the right forum to discuss this. If
>anyone feels like explaining this I don't mind a short email to me
>directly.
>
>Cheers
>
>Daniel
>
>On Sat, 01 Jul 2006 07:37:43 -0400, "Jim Berkey" <jim at jimbo.us> said:
>> I put ExpressInstall on frame one, my loader on frames 2 and 3, and my
>> content on frame 4 - works like a charm.
>> 
>> *********** REPLY SEPARATOR  ***********
>> 
>> On 7/1/2006 at 10:29 AM Daniel Klein wrote:
>> 
>> >Fixed my previous problem, it was my code, not SWFObject. However, I'm
>> >now having a problem with ExpressInstall. Here is the code from frame 1:
>> >
>> >Stage.showMenu = false;
>> >LoaderBar._xscale = 0;
>> >// SWFObject code obtained from http://blog.deconcept.com/swfobject/
>> >//#include "expressinstall.as"
>> >// Original expressinstall.as doesn't compile due to function():Type not
>> >being supported.
>> >#include "expressinstallnotype.as"
>> >// initialize the ExpressInstall object
>> >var ExpressInstall = new ExpressInstall();
>> >_root.onEnterFrame = function() {
>> >	// if the user needs to upgrade, show the 'start upgrade' button
>> >	if (ExpressInstall.needsUpdate && expressinited != true) {
>> >		ExpressInstall.init();
>> >		// 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 ExpressInstall
>updater
>> >		upgradeMsg.upgradeBtn.onRelease = function() {
>> >			// the ExpressInstall.init() method is what kicks off the actual
>update
>> >			ExpressInstall.init();
>> >		};//*/
>> >		expressinited = true;
>> >		// if expressinstall is invoked, stop the timeline.
>> >		stop();
>> >	} else if (getBytesLoaded()<getBytesTotal() || expressinited == true) {
>> >		LoaderBar._xscale = (getBytesLoaded()/getBytesTotal())*100;
>> >		gotoAndStop(1);
>> >	} else {
>> >		gotoAndStop(2);
>> >	}
>> >};
>> >
>> >I have a loader bar in frame 1. The movie is designed to wait until it's
>> >fully downloaded before going to frame 2. The thing is, SWFObject also
>> >stops the movie on frame 1. I've tried differentiating between SWFObject
>> >and my code stopping the movie but if you don't install the upgraded
>> >player and then reload the page it takes you to the main part of the
>> >movie, then tells you you need to upgrade. I have uploaded two versions,
>> >http://www.caveboy.com.au/test/loadtest4.html which should play through
>> >in Flash Player 6 and later and
>> >http://www.caveboy.com.au/test/loadtest9.html which should ask you to
>> >upgrade to Flash Player 9. Any ideas how to fix this? Both versions use
>> >to same .swf file, the only difference is the version of Flash Player
>> >they try to detect in the .html code. I'm using Flash MX (v6.0).
>> >
>> >Cheers
>> >
>> >Daniel
>> >
>> >-- 
>> >http://www.fastmail.fm - Accessible with your email software
>> >                          or over the web
>> >
>> >_______________________________________________
>> >SWFObject mailing list
>> >SWFObject at lists.deconcept.com
>> >http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>> 
>> 
>> 
>> _______________________________________________
>> SWFObject mailing list
>> SWFObject at lists.deconcept.com
>> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
>-- 
>http://www.fastmail.fm - The professional email service
>
>_______________________________________________
>SWFObject mailing list
>SWFObject at lists.deconcept.com
>http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com






More information about the Swfobject mailing list