html flash embed - html

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.

Related

Auto Play isn't working for swf flash video (weather app)

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&copyright_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).

Prevent video from pre-loading on website

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.

Shockwave-flash in Chrome bugs the page's background

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...?

Is it possible to use object/embed code to show an image+link?

I have a code like this that I cannot modify (its hosted elsewhere). I can control however the player.swf since its hosted on my domain.
<object width="480" height="388">
<param name="movie" value="http://mysite.com/player.swf"></param>
<param name="allowFullScreen" value="true"></param>
<param name="wmode" value="transparent"></param>
<param name="allowScriptAccess" value="always"></param>
<embed src="http://mysite.com/player.swf" wmode="transparent" type="application/x-shockwave-flash" width="480" height="388" allowFullScreen="true" allowScriptAccess="always">
</embed>
</object>
I'm interested in replacing the player.swf for a plain GIF or JPG image instead with a link elsewhere. I been trying to do it and I can link to an image but I can't add a link to it. Is there any way that this can be done without modifying the original object/embed code?
I may have completely misread this question, but Ill chuck this in incase.
This would be the code for displaying an image, and when clicked, takes you to the .swf file.
<img src="link/to/hosted/image.jpg" alt="" />

Embed flash in html

In chrome, ie and safari this is not a problem, but in firefox it is.
I use <object> for my flashclip.
<object type="application/x-shockwave-flash">
<param name="movie" value="myclip.swf" />
<param name="quality" value="high" />
</object>
What am I doing wrong?
After some testing, this works fine:
<object type="application/x-shockwave-flash" data="myclip.swf"
width="550" height="400">
<param name="movie" value="myclip.swf" />
<param name="quality" value="high" />
</object>
Firefox needed both data, width and height.
For cross browser flash embedding, you need to use both <object> and <embed> tags, nested inside one another, and it might also help to include the data attribute on the <object> like this:
<object type="application/x-shockwave-flash" data="myclip.swf">
<param name="movie" value="myclip.swf" />
<param name="quality" value="high" />
<!-- Sandwich the embed tag inside the object tag -->
<embed src="myclip.swf" quality="high" />
</object>
Alternatively, I'd suggest using the swfobject javascript micro-library for robust cross browser flash embedding.
Use both object and embed tag. Some browsers use the tag and 'name' to get to the swf, others use and 'id'
The code is <embed src="helloworld.swf">.