Embedded SWF File Wrong Size - html

On my website, an SWF file I have embedded from a separate media server is incredibly small. I had no issues with this before, however, I use a template HTML which several pages draw info out of. I changed something on one of the pages and it altered the size of the SWF on another.
Here is the HTML code as found in Inspect Element for the SWF Holder and Embed:
<section id="D_F_GameSection"><object type="application/x-shockwave-flash" id="cp_flash" name="cp_flash" class="disney_land_clubpenguin_player" data="http://media.cphistory.pw/play/v2/client/club_penguin.swf?clientVersion=21639" width="100%" height="100%"><param name="menu" value="false"><param name="quality" value="high"><param name="allowscriptaccess" value="always"><param name="wmode" value="transparent"><param name="flashvars"
Here is the code relating to it in the HTML template:
"flash_game_settings":{"recommendedSwfVersion":"12.0.0.44","minimumSwfVersion":"10.1","loadSwf":media + "play\/v2\/client\/club_penguin.swf?clientVersion=21639"
I tried adding "width" and "height" options into the template code, with the syntax seen in the inspect element code, but all that did was cause the webpage to not load the Embedded SWF at all.
How would I correct the size?
Thanks

Make sure everything else on the page is formatted correctly, it may be offset in place and size due to that.

Related

Uploading Flash File in blogspot

I've been trying to upload my flash file to my blog but after several attempts, nothing came out .
i even tried using online swf generator
Does anybody came across a solution on how to upload flash swf file on blog?
In my blog , in html view, ive tried using this code below after i generated it through http://www.fastswf.com/ . There was no error when i publish , but the thing is, nothing appeared(No swf / flash) when i went to preview mode to see the post.
these are the embedded codes i tried.
<object type="application/x-shockwave-flash" id="" data="http://cdn.fastswf.com/files/XASY3qs/XASY3qs.swf?AWSAccessKeyId=AKIAIWTOYM4XXIVL5IGQ&Expires=1472073138&Signature=n%2Fjw%2FeyscBCoeovQq8KqFx8Y0aI%3D" width="400" height="299"><param name="menu" value="false"><param name="scale" value="noScale"><param name="allowFullscreen" value="true"><param name="allowScriptAccess" value="never"><param name="bgcolor" value=""><param name="wmode" value="direct"></object>
i tried creating new html and paste this code in my test.html i created using notepad , it works perfectly fine,
but when i paste it in my blog in html view, nothing came out. anybody ever did came across this problem?
That should work, but if it is not working here are workarounds you should try out:
Check whether your browser has latest flash plugin.
Check where you have placed HTML tag under <body> tag or <head> tag.
As this link says, "HTML 5 does not support object tags in Head section of HTML."
Try with one <param> at a time to find out whether its problem with
any parameter altogether.
Let me know if anyone works out. Hope it helps!

Firefox / Flash plugin

I am using a moving flash logo on my website. I am using the code below:
<object width="248px" height="148px" id="flashContent">
<param name="movie" value="http://domain.co.uk/flash/Flash_logo.swf">
<param name="wmode" value="transparent" />
<object type="application/x-shockwave-flash" data="http://domain.co.uk/flash/Flash_logo.swf" width="248px" height="148px">
<param name="movie" value="http://domain.co.uk/flash/Flash_logo.swf">
<param name="wmode" value="transparent" />
<img src="images/global/logo.png"/>
</object>
</object>
Basically the code above will show the flash logo unless flash is not available.In which case the image logo.png will be used as a replacement. This works perfectly fine. However problems arise with Firefox when it detects that flash is not up to date.
Instead of showing the flash file or the logo.png firefox displays a big box stating that the plugin is vulnerable and must be updated. To be honest my flash files serves not other function that to add a little extra style to the site and with the plugin problem my site loads without a logo at all which is less than ideal.
I suppose my question is... Is it possible to edit my code above so that if the plug in is out of date then just the logo.png is loaded instead of Firefox detecting the plugin problem?
First of all, it is not just Firefox and/or outdated Flash.
Users can set any plugin incl. Flash to click-to-play in recent Firefox versions, not just outdated ones.
Chrome also has a preference that allows you to set plugins to "click-to-play".
There is no reliable way to detect click-to-play (due to outdated plugins and/or user preferences), neither in Firefox nor Chrome.
Sometimes it is recommended to construct a plugin in javascript, wait for it to load and then try to interact with it, and if that fails go to a fallback method. However, you still cannot distinguish between the plugin being autoloaded and the user just being a fast clicker.
Your best option is not to use Flash at all, if you don't really need it or it doesn't worth the fuzz. Otherwise try the detection thing.

.SWF Object Shrinking in IE 8

I am having an issue in WordPress. I've embedded a .swf as an object, but in IE 8 it shows really small. I've attached a screenshot of the IE issue. It's that really small picture on the left. To see a working version, check out the page here on another browser.
I would love to disregard this issue, but unfortunately our company runs on IE so I need to fix this.
This is all created in WordPress. The .swf is hosted externally. Here is the code:
<object width="680px" height="300px">
<param name="movie" value="http://www.pplweb.com/ppl-generation/~/media/PPLWeb/Generation/Media/PPL%20Susquehanna/nuclear.swf">
<embed src="http://www.pplweb.com/ppl-generation/~/media/PPLWeb/Generation/Media/PPL%20Susquehanna/nuclear.swf" width="100" height="100">
</embed>
</object>
Embed it using SWFObject, it's the most reliable way to insert SWF files. WordPress already comes bundled with it, so you just need wp_enqueue_script('swfobject');, and then use the script embedding accordingly.
Or you can use a plugin: wordpress.org/plugins/search.php?q=swfobject.

Ruby: how to ouput PDF object element?

I am embedding a pdf file in rails view using embed tag, i have write it in simple html and its working fine but i need to write this tag in rails conventions.
The code is like:-
<object data="file1.pdf#toolbar=0&navpanes=0&scrollbar=0" type="application/pdf" width="100%" height="720">
<embed src="file2.pdf#toolbar=0&navpanes=0&scrollbar=0" type="application/pdf" width="100%" height="720" />
</object>
It seems Ruby uses print to output to a client...
print 'Hello World!'
There is no "embed tag", that is an "object element"; using the correct terminology not only makes you look more professional to others though also greatly improves your ability to communicate in fewer steps. 99.9% of the time people are referring to an element, it is the whole element. A very rare correct reference to a tag would be something like, "In XHTML does the meta element self close or does it have an end tag?" (e.g. < meta / > or < meta >< / meta >).
Internet Explorer (as usual) has a bug that is unable to display flash objects correctly in certain situations such as with your code, I'm not sure if this applies to a PDF but they're both Adobe products so best to try this in IE7 to be sure. You need to have a movie parameter element.
Here is everything put together along with Ruby...
<object class="pdf" data="something.pdf" type="application/pdf">
<param name="movie" value="something.pdf" />
<p>This is alternative content that displays if the plugin is not suppoted.</p>
</object>
Another very important clarification: you need to have a height/width set or at least a minimum height and width set otherwise certain browsers (e.g. Firefox) will not load the resource. In fact when I change themes on my site if the dimensions change in the middle of the music playing the whole Flash object resets. Not such a big issue for a PDF though if it forces the browser to reload the PDF it may annoy your visitor and it's ALL about making sure your visitors aren't annoyed by doing things right the first time.
Lastly alternative content is any (X)HTML that appears inside the object element. You can add a link to download a PDF plugin if the client's browser doesn't already support one.
Hope this helps, feel free to ask for clarifications if need be.

Object Fallback Optimization

I have an object loading a flash animation with an image as a fallback.
When I look at the resources being loaded on page load, the fallback image appears to be downloaded regardless of whether or not flash is detected, which seems to be wasteful and inefficient (especially if the fallback image is large).
What's a clean way to ensure the fallback image isn't loaded if the object tag detects flash?
I've already looked at the get_browser() PHP function and it doesn't appear to be a viable option.
Here's a code outline:
<object>
<param name="movie" value="..." />
<param name="play" value="true" />
<div id="frontpagefallback">
<img src="..." width="..." alt="..." usemap="#homeMap" />
</div>
</object>
I'm assuming that you have this image in place in the div or whatever, and that you repopulate this div with the Flash content, if Flash is available. If so, yes, the behavior you are seeing is normal.
What you need to do is determine in Javascript if Flash is installed, and then decide whether to populate that div with the image content, or the Flash content. How you do this depends on how you are loading the flash. I believe SWFObject can do this for you.
Generally though, it is fine to put that image there by default. What if someone loads your page that isn't capable of running your Javascript to detect flash? What about non-browsers on your page, such as search engines?