Embedd a flash element and make unclickable - html

I am trying to embed this flash banner in side but url on it is messed up.
So I placed an invisible div on it with the correct url .
The trouble is when I click on it, I get transferred to both the correct url and the incorrect one.
<div class="invisible" onmousedown="window.open('http://ags.gns.co.il/cdn/DigitalCloud/iMarkets/2012/Gadi_Back_To_News/?Media=maof')" style="z-index:10000">
<object type="application/x-shockwave-flash" data="http://s-maof.com/stuff/Imarkets_150x75.swf" width="150" height="75">
<param name="movie" value="http://s-maof.com/stuff/Imarkets_150x75.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="loop" value="false" />
</object>
</div>

You are not overlaying the flash, you are just containing it !
try this html:
<div class="invisible">
<a class="overlay" href="http://ags.gns.co.il/cdn/DigitalCloud/iMarkets/2012/Gadi_Back_To_News/?Media=maof"></a>
<object type="application/x-shockwave-flash" data="http://s-maof.com/stuff/Imarkets_150x75.swf" width="150" height="75">
<param name="movie" value="http://s-maof.com/stuff/Imarkets_150x75.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="loop" value="false" />
</object>
</div>​​​
now we set the link to overlay the flash
.invisible{
position:relative;
width:150px;
height:75px;
}
.​overlay{
z-index:10000;
display:block;
width:150px;
height:75px;
position:absolute;
top:0px;
left:0px;
background:red;
opacity:0.3;
}​
DEMO
you can remove the opacity and background, they are just for demonstration.

Related

Embeding Weather Underground

Trying at the moment to embed this webcam from Weather Underground:
https://www.wunderground.com/webcams/Kehlegg/1/video.html?month=01&year=2018&filename=current.mp4
The following code is on the website:
<div style="text-align:center">
<object width="640" height="480" id="undefined" name="undefined" data="https://www.wunderground.com//icons.wunderground.com/swf/flowplayer.commercial-3.2.8.swf" type="application/x-shockwave-flash">
<param name="movie" value="https://www.wunderground.com//icons.wunderground.com/swf/flowplayer.commercial-3.2.8.swf" />
<param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" />
<param name="flashvars" value='config={"key":"##8d339434b223613a374","clip":{"autoPlay":false,"autoBuffering":true},"playlist":[{"url":"https://www.wunderground.com//icons.wunderground.com/webcamramdisk/k/e/Kehlegg/1/current.jpg?e%3D1514817767","autoPlay":false,"autoBuffering":true},{"url":"https://www.wunderground.com//icons.wunderground.com/webcamcurrent/k/e/Kehlegg/1/current.mp4?e%3D1514817767","autoPlay":false,"autoBuffering":true}],"plugins":{"controls":{"all":true,"mute":true,"play":true}}}' />
</object>
<p>
Kehlegg's Video Archive
— Weather Underground Webcams
</p>
</div>
Tried to use it but didnt work.

Can anyone help me decipher this html video code?

I am working on a html project with video, and need to work with this video. I am hoping to apply two style
width: 550px;
controls preload="auto;
but am not sure where to place it. I need the video to preload due to its long loading time! Code examples have always shown a tag, but this code does not have any.
<object id="flashObj" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0">
<param name="movie" value="http://c.brightcove.com/services/viewer/federated_f9?isVid=1&isUI=1" />
<param name="bgcolor" value="#FFFFFF" />
<param name="flashVars" value="videoId=3286763175001&linkBaseURL=http%3A%2F%2Fmedianetwork.oracle.com%2Fvideo%2Fplayer%2F3286763175001&playerID=1787102915001&playerKey=AQ~~,AAAAAFcSbzI~,OkyYKKfkn3xPOduPEsqhjskdCvDxqymz&domain=embed&dynamicStreaming=true" />
<param name="base" value="http://admin.brightcove.com" />
<param name="seamlesstabbing" value="false" />
<param name="allowFullScreen" value="true" />
<param name="swLiveConnect" value="true" />
<param name="allowScriptAccess" value="always" />
<embed src="http://c.brightcove.com/services/viewer/federated_f9?isVid=1&isUI=1" bgcolor="#FFFFFF" flashVars="videoId=3286763175001&linkBaseURL=http%3A%2F%2Fmedianetwork.oracle.com%2Fvideo%2Fplayer%2F3286763175001&playerID=1787102915001&playerKey=AQ~~,AAAAAFcSbzI~,OkyYKKfkn3xPOduPEsqhjskdCvDxqymz&domain=embed&dynamicStreaming=true" base="http://admin.brightcove.com" name="flashObj" width="640" height="358" seamlesstabbing="false" type="application/x-shockwave-flash" allowFullScreen="true" allowScriptAccess="always" swLiveConnect="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" style="width: 550px;"></embed>
</object>
If someone could please shorten and explain what some of the essential tags do that would be greatly appreciated.
id is the element of the video, the param tag helps to define the plugins with the element, http://www.w3schools.com/tags/tag_param.asp , this gives a good example.

Flash embedded in HTML doesn't appear in Chrome but only in Safari

I am coding interactive short story and and embedded my Flash into my HTML page but it is not playing at all. It's just a black screen. The animation plays fine when using Safari though.
Help would be welcome ASAP.
This is the code I used to embed the swf file:
<div id="sleepingvideo">
<object width="720" height="510">
<param name="movie" value="SC_Flash.swf" />
<param name="allowfullscreen" value="true" />
<param name="scale" value="noScale" />
<param name="salign" value="lt" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="path=deuter" />
<embed margin-height="100" width="600" height="400" src="survey.swf"
flashvars="path=deuter" allowfullscreen="true"
allowscriptaccess="always" name="player1" scale="noScale"
salign="lt"></embed>
</object>
</div>
I advice you to use SWFObject for flash embedding. It works everywhere.

Issue with flash video size in html

I am trying to put a 1024x168 flash video(swf) in a web page and but the video is getting clipped, I wish to have scroll bar appear whenever it overflows. Below is my code:
<!DOCTYPE html>
<html>
<head>
test
</head>
<body>
<div style="overflow: auto;">
<object id="M97012085" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" style="overflow: auto; align:middle;" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0">
<param name="movie" value="path_to_swf" />
<param name="loop" value="false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="wmode" value="transparent" />
<param name="play" value="false" />
<embed bgcolor="#ffffff" align="middle" name="M97012085 loop="false" src="path_to_swf" width="100%" height="100%" style="overflow: auto; align:middle;" play="false" wmode="transparent" quality="high" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</div>
</body>
</html>
Please advice how can I have the scrollbars appear when video overflows ?
I think by setting the height and width to 100% on your object you are telling it to fill up the whole div, which is why you don't get scrollbars.
Try setting the actual dimensions for the height and width and then when a video's dimensions are larger then the div you should see the scrollbars.

How to embed a SWF file in an HTML page?

How do you embed a SWF file in an HTML page?
The best approach to embed a SWF into an HTML page is to use SWFObject.
It is a simple open-source JavaScript library that is easy-to-use and standards-friendly method to embed Flash content.
It also offers Flash player version detection. If the user does not have the version of Flash required or has JavaScript disabled, they will see an alternate content. You can also use this library to trigger a Flash player upgrade. Once the user has upgraded, they will be redirected back to the page.
An example from the documentation:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>SWFObject dynamic embed - step 3</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.embedSWF("myContent.swf", "myContent", "300", "120", "9.0.0");
</script>
</head>
<body>
<div id="myContent">
<p>Alternative content</p>
</div>
</body>
</html>
A good tool to use along with this is the SWFObject HTML and JavaScript generator. It basically generates the HTML and JavaScript you need to embed the Flash using SWFObject. Comes with a very simple UI for you to input your parameters.
It Is highly recommended and very simple to use.
<object width="100" height="100">
<param name="movie" value="file.swf">
<embed src="file.swf" width="100" height="100">
</embed>
</object>
How about simple HTML5 tag embed?
<!DOCTYPE html>
<html>
<body>
<embed src="anim.swf">
</body>
</html>
This is suitable for application from root environment.
<object type="application/x-shockwave-flash" data="/dir/application.swf"
id="applicationID" style="margin:0 10px;width:auto;height:auto;">
<param name="movie" value="/dir/application.swf" />
<param name="wmode" value="transparent" /> <!-- Or opaque, etc. -->
<!-- ↓ Required paramter or not, depends on application -->
<param name="FlashVars" value="" />
<param name="quality" value="high" />
<param name="menu" value="false" />
</object>
Additional parameters should be/can be added which depends on .swf it self. No embed, just object and parameters within, so, it remains valid, working and usable everywhere, it doesn't matter which !DOCTYPE is all about. :)
If you are using one of those js libraries to insert Flash, I suggest adding plain object embed tag inside of <noscript/>.
<object type="application/x-shockwave-flash" data="http://www.youtube.com/v/VhtIydTmOVU&hl=en&fs=1&color1=0xe1600f&color2=0xfebd01"
style="width:640px;height:480px;margin:10px 36px;">
<param name="movie" value="http://www.youtube.com/v/VhtIydTmOVU&hl=en&fs=1&color1=0xe1600f&color2=0xfebd01" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="wmode" value="opaque" />
<param name="quality" value="high" />
<param name="menu" value="false" />
</object>
I use http://wiltgen.net/objecty/, it helps to embed media content and avoid the IE "click to activate" problem.
As mentioned SWF Object is great. UFO is worth a look as well
This one will work, I am sure!
<embed src="application.swf" quality="high" pluginspage="http://www.macromedia.com/go/getfashplayer" type="application/x-shockwave-flash" width="690" height="430">
What is the 'best' way? Words like 'most efficient,' 'fastest rendering,' etc. are more specific. Anyway, I am offering an alternative answer that helps me most of the time (whether or not is 'best' is irrelevant).
Alternate answer: Use an iframe.
That is, host the SWF file on the server. If you put the SWF file in the root or public_html folder then the SWF file will be located at www.YourDomain.com/YourFlashFile.swf.
Then, on your index.html or wherever, link the above location to your iframe and it will be displayed around your content wherever you put your iframe. If you can put an iframe there, you can put an SWF file there. Make the iframe dimensions the same as your SWF file. In the example below, the SWF file is 500 by 500.
Pseudo code:
<iframe src="//www.YourDomain.com/YourFlashFile.swf" width="500" height="500"></iframe>
The line of HTML code above will embed your SWF file. No other mess needed.
Pros: W3C compliant, page design friendly, no speed issue, minimalist approach.
Cons: White space around your SWF file when launched in a browser.
That is an alternate answer. Whether it is the 'best' answer depends on your project.
I know this is an old question. But this answer will be good for the present.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>histo2</title>
<style type="text/css" media="screen">
html, body { height:100%; background-color: #ffff99;}
body { margin:0; padding:0; overflow:hidden; }
#flashContent { width:100%; height:100%; }
</style>
</head>
<body>
<div id="flashContent">
<object type="application/x-shockwave-flash" data="histo2.swf" width="822" height="550" id="histo2" style="float: none; vertical-align:middle">
<param name="movie" value="histo2.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffff99" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
</object>
</div>
</body>
</html>
Thi works on IE, Edge, Firefox, Safari and Chrome.
<object type="application/x-shockwave-flash" data="movie.swf" width="720" height="480">
<param name="movie" value="movie.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#000000" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
</object>
This worked for me:
<a target="_blank" href="{{ entity.link }}">
<object type="application/x-shockwave-flash" data="{{ entity.file.path }}?clickTAG={{ entity.link }}" width="120" height="600" style="visibility: visible;">
<param name="quality" value="high">
<param name="play" value="true">
<param name="LOOP" value="false">
<param name="wmode" value="transparent">
<param name="allowScriptAccess" value="true">
</object>
</a>
Use the <embed> element:
<embed src="file.swf" width="854" height="480"></embed>
You can use JavaScript if you're familiar with, like that:
swfobject.embedSWF("filename.swf", "Title", "width", "height", "9.0.0");
--the 9.0.0 is the flash version.
Or you can use the <object> tag of HTML5.