how to put flash (.swf) in a page? - html

i'm planning to use a .swf file as a header. this won't work.
<img src="exactheader.swf" width="650" height="140" />
can you tell me how?

Try this instead:
<object width="650" height="140">
<param name="movie" value="exactheader.swf">
<embed src="exactheader.swf" width="650" height="140"></embed>
</object>

You should use <embed> tag to embed flash files to an html page :
<object width="650" height="140">
<param name="movie" value="exactheader.swf">
<embed src="exactheader.swf" width="650" height="140"> </embed>
</object>
EDIT : As Russ pointed, I just found the resource why we should use both object and embed tags here.
In the code above there is both an
tag and an <object> tag. This
is because the tag is
recognized by Internet Explorer, and
Netscape recognizes the <embed> tag
and ignores the <object> tag.

I have found swfobject the 'best' method for embedding flash in html. It handles, version checking, alternate content, etc. Spend a few minutes getting familiar with this easy to use api:
http://code.google.com/p/swfobject/

Related

Is it possible to use Ruffle within an Iframe?

So ive been trying to use Ruffle (a flash emulator written in Rust) on a website for some flash games. This works like a charm with flash games in my website source files, but it doesnt work for iframes. This is the code that ive been trying to get working, but at this point im not sure if its possible at all. any help?
<script src="ruffle/ruffle.js"></script>
<iframe id="cppscreatorCPPS" src="https://play.cppscreator.xyz/embed/24436" scrolling="no" width="960" height="600" frameborder=0></iframe>
<br /><br />```
Instead of an <iframe>, I would recommend you used an <object> and <embed>component. I will leave a code snippet below (You need to replace the value of the param and the src of the embed with your swf file link. In your case, it is the play.cppscreator.xyz/embed link. ). Also, you are using cppscreator.xyz, which does not really work, as it is not an SWF file.
<script src="https://flash-games.penguinbotcoder.repl.co/ruffle/ruffle.js"></script>
<object width="600" height="400">
<param name="movie" value="https://flash-games.penguinbotcoder.repl.co/flashgames/thinice.swf">
<embed src="https://flash-games.penguinbotcoder.repl.co/flashgames/thinice.swf">
</embed>
</object>

How to use embed or object in html5?

I know that <Applet> does not work in HTML5 but in 4.1, but how do i use <embed> or <object> becose if i use <embed src=SOMETHING.jar> or <object width="400" height="400" data="SOMETHING.jar"></object> it just downloads SOMETHING.jar.
How can i just (dis)play it?

Embed autoplay false not working in Mozilla

I am using embed tag in Mozilla. Video start playing on page load only. Autoplay (autoplay="false") is not helping me. Can any one help me please?
Thanks in advance !
<embed id="video1" src="Wildlife.wmv" type="application/mediaplayer" autoplay="false" width="470" height="280"></embed>
This is a know bug for Chrome and Firefox. Try using another source extension, .wmv is also not valid for Mac users without Flip4mac.
Also this bug can be fixed by using <object> like this:
<object width="470" height="280" type="application/x-mplayer2">
<param name="fileName" value="Wildlife.wmv">
<param name="autostart" value="0">
</object>
The bug in the <embed> can be caused by using the wrong type, so move on to the better solution:
Best solution in this case
Then again, the best solution for using <embed> is setting the plugin url, type and autostart like this:
<embed type="video/x-ms-wmv" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" autostart="0" width="470" height="280" loop="0" src="Wildlife.wmv"></embed>

<embed> tag seems to be only way to include certain flash content?

Various sites, such as flickr.com for video, or soundcloud.com, use an object tag with a nested embed tag. Based on quite a bit of testing, I've concluded that these sites only work with the nested or stand-alone embed tag, but not with the equivalent object tag syntax. Here's an example:
This works
<embed
type="application/x-shockwave-flash"
src="http://www.flickr.com/apps/video/stewart.swf?v=71377"
bgcolor="#000000" allowfullscreen="true"
flashvars="intl_lang=en-us&photo_secret=564da38fcc&photo_id=2454294841"
height="300" width="400"
>
</embed>
This does not
<object
type="application/x-shockwave-flash"
width="400"
height="300"
data="http://www.flickr.com/apps/video/stewart.swf?v=71377"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>
<param name="flashvars" value="intl_lang=en-us&photo_secret=564da38fcc&photo_id=2454294841"></param>
<param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=71377"></param>
<param name="bgcolor" value="#000000"></param>
<param name="allowFullScreen" value="true"></param>
</object>
What's going on?
In this form, your plain object tag will be ignored by all browsers except for IE, which is capable of reading a badly formed object tag. The embed tag is read by all other browsers.
To make all browsers read the object tag, and so make the embed tag redundant, you need to mess around with the object tag properties a bit to make it correctly validate. A better (but slightly old) write up of this is available on A List Apart.
Really though, I still recommend not writing the object tags yourself, and instead let SWFObject do the hard work for you.

Embedding flex app in ASP.NET page (aspx)

I am making a flex app to embed in my ASP.NET portfolio. What is the best way to embed the .swf file into the HTML of the .aspx page?
Thanks
I don't know what's meant by the best way, the easiest way to me is the "classic" way:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="320" HEIGHT="240" id="Yourfilename" ALIGN="">
<PARAM NAME=movie VALUE="Yourfilename.swf">
<PARAM NAME=quality VALUE=high>
<EMBED src="Yourfilename.swf" quality=high WIDTH="320" HEIGHT="240" NAME="Yourfilename" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
You might also just want to swap out the HTML code and JavaScript include files that get created by Flex Builder, in the html-template folder.
One way is by using the swfobject library