html link in swf object - html

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.

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

how link a swf file with a image click event

i want create a simple video gallery , where many images show in tables and when we click on any image related swf file play on that place..
here is my swf file -
<embed src="intro.swf" height="200" width="200">
i tried this but not work-
<a href=<embed src="intro.swf" width="200" height="200">
<img border="0" src="5.jpg" width="340" height="185"><p>If you cannot see this, your computer doesn't support the format</p>
</a>
This is the embed tag
<embed src="helloworld.swf">
And you can see the working demo from w3schools here .
The reason you can't open may :
You may given the file path as wrong
You may given wrong permissions to the folder that contains the .swf file

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

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>

How to let the embedded object use its natural size?

I'm using <object> to embed an SWF file like this:
<object width="900" height="900">
<param name="movie" value="carte-uso-ch-01.swf">
</object>
I don't know if this is portable and it really doesn't matter here, this is just for personal use. Is there any way to let the SWF expand to its actual size, instead of restricting it to 900x900? If I remove the width and height attributes from <object> I'll only get a thumb displayed.
If you have PHP running, you can use getimagesize() on SWF files.
<object width="100%" height="100%">
or JavaScript width andheight detection