Place a Flash file (.swf) in GSP page-Grails - html

I need to include flash file in my grails app,in my view page.
Need some code regarding it.
Thanks in advance
Bhanu

You can use html object tag in your GSP
<object width="300" height="120" codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0">
<embed src="path-to-swf-file" width="400" height="40"></embed>
</object>

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>

Embedding SWF file in HTML5 - How to add alternative content?

I'd like to embed an SWF file in HTML5. It works fine with this code:
<embed src="main.swf" width="550" height="400" />
But how could I show alternative content (an animated GIF image, or a static JPEG or PNG) just in cases which swf file is not supported (and still validating in w3! ;) )
Thank you!
Use the object tag instead of the embed tag like so:
<object width="550" height="400" data="main.swf">Alertnative Content Here</object>
See: EMBED vs. OBJECT

Can I specify when my video shall start on html?

I want my video to show a specified image while embedding it on html
basically I'm doing the following:
<embed src="video.m4v" width="520" height="456" autoplay="false" controller="true" type="video/quicktime" scale="tofit" pluginspage="http://www.apple.com/quicktime/download/" bgcolor="black"> </embed>
Is there a specific parameter that I can add that says when the video shall start?
There are no attributes of the embed tag that specify the start time of what's embedded.
Depending on what's playing your video, you could use a param tag with flashvars.

html link in swf object

I have a swf file but I dont have the source. I need to add a link to the object swf but I dont know how. I need to do something like this:
<a href='http://www.mypage.com'><object ....> </a>
is there a way to achieve this?
Thanks in advance
You have to embed it:
<embed width="550" height="400" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://www.mypage.com" quality="high"></embed>
And then change the src attribute into the website where your swf is uploaded.

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

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/