I noticed that my website's behavior has changed lately in Chrome. It comes from the piece of code shown here. With that code the page works fine and all seems to be ok (the flash banner is ok too). BUT as soon as I scroll the page, I notice that the background is white (all that was not shown when the page originally loaded). It's like if the background is not loaded out of the original shown page sight. If I remove the piece of code emphasized, the banner doesn't load the animation, but the background loads properly.
What prevents me page's backgroung from loading properly? Note that this is the only flash code/object on my whole website.
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="994" height="250"
id="art-flash-object">
<param name="movie" value="images/container.swf" />
<param name="quality" value="high" />
<param name="scale" value="default" />
<param name="wmode" value="transparent" />
<param name="flashvars" value="color1=0xFFFFFF&alpha1=.50&framerate1=24&loop=true&wmode=transparent&clip=../../Content/images/flash.swf&radius=5&clipx=-3&clipy=0&initalclipw=1000&initalcliph=250&clipw=1000&cliph=250&width=994&height=250&textblock_width=0&textblock_align=no&hasTopCorners=true&hasBottomCorners=true" />
<param name="swfliveconnect" value="true" />
Shockwave code here causes the bug
<object type="application/x-shockwave-flash" data="../../Content/Images/container.swf"
width="994" height="250">
<param name="quality" value="high" />
<param name="scale" value="default" />
<param name="wmode" value="transparent" />
<param name="flashvars" value="color1=0xFFFFFF&alpha1=.50&framerate1=24&loop=true&wmode=transparent&clip=../../Content/images/flash.swf&radius=5&clipx=-3&clipy=0&initalclipw=1000&initalcliph=250&clipw=1000&cliph=250&width=994&height=250&textblock_width=0&textblock_align=no&hasTopCorners=true&hasBottomCorners=true" />
<param name="swfliveconnect" value="true" />
<div class="art-flash-alt">
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"
alt="Get Adobe Flash player" />
</a>
</div>
</object>
End of buggy code
</object>
I don't know if it's the cause of the problem, but in the first piece of code there's no </object> closing tag present.
Also, I have experienced some flash loading issues with relative paths (like you did with value="images/container.swf" /> and data="../../Content/Images/container.swf"). Never knew what exactly was the issue there, but try loading the flash file from the same folder as where your .html file is located.
I myself sometimes use the html code generated by Flash (under Publish..) because sometimes that seems to be the only working code in order to show the Flash correctly.
P.s. I don't understand exactly what's the deal with the two <object> tags and their contents, did you use both at the same time, separately, or...?
Related
I may be missing something but I am trying to embed a weather app I found into my website. I am using this as my HTML code:
<div style="width:800px; height:250px;">
<object type="application/x-shockwave-flash" data="http://swf.yowindow.com/yowidget3.swf&autostart=true" width="800" height="250">
<param name="movie" value="http://swf.yowindow.com/yowidget3.swf&autoStart=true"/>
<param name="allowfullscreen" value="true"/>
<param name="wmode" value="opaque"/>
<param name="bgcolor" value="#FFFFFF"/>
<param name="autoPlay" value="true"/>
<param name="flashvars"
value="location_id=gn:5007804&location_name=Royal%20Oak&time_format=12&unit_system=us&background=#FFFFFF&mini_temperature=true&mini_time=true&mini_locationBar=true&mini_action=full_screen©right_bar=false;&autostart=true;"
/>
</object>
</div>
Notice how I put the param name = "Autoplay" value="true" line as well as trying to put it in the URL. Am I missing something here?
If I just paste the URL http://swf.yowindow.com/yowidget3.swf into a webbrowser, it auto plays no problem so it must be one of the parameters I have entered wrong.
I have looked many times on StackOverflow for a solution and have entered autoPlay="true" in many spots without any luck.
I tested your shown code and it's working fine (Chrome browser on Windows). Maybe you need to clear browser history & clear any cached files?
It only shows a "click to play" icon if the display width is smaller than 600px. Did you ever have such a smaller setting that is being cached & re-used?
Also regarding data="http://swf.yowindow.com/yowidget3.swf&autostart=true" the &autostart=true is not needed. Please remove it & test again (resave as different filename.html if needed).
I have the following code for a video on my website. I have the AutoPlay turned off in order to prevent playback as soon as I open the website. The problem is that the video still loads automatically and this hurts the bandwidth of some visitors. What can I do to prevent the video from loading until the user decides to play it?
<object width="530" height="405" scale="to fit" hspace="10" border="5">
<param name="VideoTitle" value="/urlpath/movie.m4v" />
<param name="AutoStart" value="False" />
<param name="ShowControls" value="True" />
<param name="ShowStatusBar" value="True" />
<param name="ShowDiplay" value="True" />
<param name="AutoRewind" value="True" />
<embed width="530" height="405" scale="tofit" hspace="0" filename= "/urlpath/movie.m4v"
autostart="False" showcontrols="True" showstatusbar="True" showdiplay="True"
autorewind="True" border="1" src="/urlpath/movie.m4v"></embed>
</object>
Thanks in advance.
Don't include the code in your page. Inject it into the page once the user clicks a fake PLAY button.
As Diodeus said, have it load "on-demand" by creating a javascript function.
Alternatively, I think you could use HTML5's video tag and leave preload off.
-- The Javascript solution is more friendly for older browsers, as not all support HTML5.
I am using Flash CS4 and when testing my application my frame rate changes as it is programmed to do so. When I try to run the application in a browser (tried Firefox 4, Opera 10.5 and IE 8) the frame rate does not change.
Why does the frame-rate not change? How do I fix it?
The newest Flash Players are capped at a maximum of 60fps, no matter what number you use to set the framerate. That could be one issue... But if objects on the screen are slowing down there's nothing to be gained by changing the framerate. It means that your swf isn't well optimized, and the player is struggling to render the assets.
Set your HTML so that the Flash Object's wmode is "opaque" (or transparent if you really need to). If you don't specify it, it will interpret it as some other default parameter which gives you that drop in frame-rate performance.
Sample:
<object type="application/x-shockwave-flash" data=
"YourFlashMovie.swf" width="640" height="480"
id="flash_id_1" style="visibility: visible;">
<param name="allowScriptAccess" value="always" />
<param name="allowScale" value="never" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="opaque" /> <!-- THIS IS WHAT YOU MUST SET -->
<param name="quality" value="high" />
<param name="scale" value="" />
<param name="scaleMode" value="" />
<param name="menu" value="false" />
</object>
Hope that helps.
I have a site where a jQuery dialog is used to show videos in a modal frame.
I would like to be able to rest the close button so that it partially covers the embedded QuickTime object, much like the modal frame in this picture:
http://ajaxdump.com/wp-content/uploads/2009/08/MooTools_SqueezeBox-Expandable-Lightbox-308x400.gif
QT always renders above any other element.
I've looked around for solutions, but I've had little luck with it. Is this even possible? Or should I just give up hope now?
You need to adjust the wmode parameter of the Quicktime object to "transparent" in order for it to display beneath other content.
You'd want to set it up like this in your HTML:
<object width="500" height="250" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab"
id="video_object" style="behavior:url(#qt_event_source);" class="plugin" >
<param name="src" value="whatever.png">
<param name="autoplay" value="false">
<param name="postdomevents" value="true">
<param name="wmode" value="transparent">
<param name="controller" value="false">
<param name="scale" value="tofit">
<embed id="video_embed" class="plugin"
type="video/quicktime" src="whatever.png"
wmode="transparent" postdomevents="true" controller="false" scale="tofit" >
</embed>
</object>
Have a look at this demo.
I use the below code within for my JQuery lightbox without include js file AC_RunActiveContent.js or swfobject-1.5.js in the html file. It works fine for IE and Firefox. Just wanna know if there is any problem for not include AC_RunActiveContent.js or swfobject-1.5.js. Is it a must to have AC_RunActiveContent.js or swfobject-1.5.js for display a flash properly in different browsers version?
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="789" height="617" id="Loader" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="en_MAIN.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="en_MAIN.swf" quality="high" bgcolor="#ffffff" width="789" height="617" name="Loader" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
No, that's the Adobe-style standard markup. It works across all current browsers.
It's ugly, doesn't validate and has to state each parameter twice, which is what the Flash embedding scripts you mention are attempting to address (plus sometimes also there's an IE ‘object activation’ workaround that is no longer necessary). If you don't care about that, you're fine as you are. If you do, this question has some discussion on alternatives.
I don't think your code is connected to Lightbox: AC_RunActiveContent.js and swfobject-1.5.js are javascript workarounds for getting Flash to work in IE. Since Lightbox uses JQuery, not Flash, you shouldn't need them.
Look closely at the lightbox instructions for more information.