[SWFObject] flashvars somtimes fail to be passed in the first time a page loads

Geoff Stearns geoff at deconcept.com
Wed May 17 19:05:37 PDT 2006


sounds like good advice to me...

another option might be to initialize your movie on frame 2 instead  
of frame 1... but i've initialized stuff on frame 1 before without  
issues, so i wonder if it's something else.

are you preloading to swf? how make kb is it?



On May 17, 2006, at 9:46 PM, Mike Palmer wrote:

> Brooks,
>
> Try doing a test on the first frame to make sure that variable's value
> is not empty and then make the second frame gotoAndPlay back to the
> first frame. If the variable holds some value jump to the rest of the
> movie. Another way would be to use a setInterval, or to put a
> onEnterFrame event handler on a movie clip.
>
> The fact that it works on reload is a tell-tale sign that you're
> starting the movie before the variable has been loaded. Make sure it's
> there before the movie runs.
>
> Good luck,
>
> Mike
>
> Brooks Andrus wrote:
>
>> Has anyone had an issue where the flashvars sometimes are not being
>> passed in the first time a page loads (using swfobject of course).  
>> I’m
>> getting intermittent reports from users who have to refresh their
>> browsers one time before the swf content will play back. This problem
>> is not consistent and appears to vary from machine to machine and
>> webserver to webserver. Here’s an example:
>>
>> 1) a users creates some content that uses swfobject and uploads to
>> their webserver. My laptop consistently will load the page on the
>> first request, but the content hangs until I refresh the browser. All
>> subsequent loads work fine, until the cache is cleared and a new
>> request is submitted. However, my desktop pc does not have this same
>> issue with the file served from the same webserver.
>>
>> 2) After fishing the files in question out of my browser cache and
>> uploading them to my own webserver, neither my laptop nor desktop  
>> have
>> difficulties playing back the files when they are first requested.
>>
>> In trying to debug this problem, I’ve noticed that when files fail to
>> load for the first time, a preloader swf file and an xml file are
>> always missing from the browser cache. The names of these files are
>> passed into the swf file embedded with swfobject via flashvars.
>> Without either of these files nothing displays (as is too be
>> expected). This appears to be a timing issue, but I’m so far  
>> unable to
>> replicate the issue on any of the webservers I have access to, so its
>> tough to trace the values of the flashvars that are supposed to be  
>> set
>> with swfobject.
>>
>> Here’s the link to a file that seems to consistently give users
>> difficulty:
>>
>> http://www.newviewnetworks.com/nvnhome/blog/client/demos/ 
>> red5_0.4.1_NewApp/red5_0.4.1_NewApp.html
>>
>> You most likely will be facing a blank white screen until you launch
>> the sucker for a second time. However subsequent attempts will work
>> perfectly until you decide to clear your cache.
>>
>> Any thoughts or advice on this would be greatly appreciated (I’m not
>> ruling out a bug in my code, but the inconsistent behavior in
>> conjunction with my inability to find where my script might be going
>> off into the weeds, leads me to this forum).
>>
>> Regards,
>>
>> Brooks
>>
>> --------------------------------------------------------------------- 
>> ---
>>
>> _______________________________________________
>> 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




More information about the Swfobject mailing list