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>
Related
I have a slight problem with a webpage : when I try to load a youtube video it shows a white rectangle ( I'm on firefox with win 8.1 x 64 and Yes, I did a flash player update )
Here's the code :
<object type="application/x-shockwave-flash" width="800" height="600"data="https://www.youtube.com/watch?v=jRXQsQKGqIU"><param name="movie" value="https://www.youtube.com/watch?v=jRXQsQKGqIU" /></object>
Can somebody tell me what's wrong with it ?
The other parts of the HTML code are just fine but this youtube code keeps showing me this white rectangle in my webpage instead of the video.
According to Google, the best way to embed is to use iframes:
Best practice: IFrame embeds are the recommended method for embedding
a YouTube player because the IFrame will select the appropriate player
based on the client's capabilities and available YouTube file formats.
That would look like this:
<iframe width="420" height="315" src="//www.youtube.com/embed/jRXQsQKGqIU" frameborder="0" allowfullscreen></iframe>
However, if you wish to use the Object tag, here's a working example:
<object width="640" height="390">
<param name="movie"
value="https://www.youtube.com/v/jRXQsQKGqIU?version=3&autoplay=1"></param>
<param name="allowScriptAccess" value="always"></param>
<embed src="https://www.youtube.com/v/M7lc1UVf-VE?version=3&autoplay=1"
type="application/x-shockwave-flash"
allowscriptaccess="always"
width="640" height="390"></embed>
</object>
Working JS Fiddle: http://jsfiddle.net/RAZC4/2/
https://developers.google.com/youtube/player_parameters
Maybe you can use the new code..
<iframe width="800" height="600" src="//www.youtube.com/embed/jRXQsQKGqIU" frameborder="0" allowfullscreen></iframe>
Have you made sure that your browser supports flash?
Otherwise I would suggest using the new embed code
What is the best practice for displaying an HTML alternative when a browser plug-in is not available? I'm embedding the plugin with an object tag like so:
<object id="plugin0" type="application/x-myplugin"></object>
This is what an unknown plugin displays as in Google Chrome, however I'd like the solution to work on all browsers (i.e. FF plugin/Chrome plugin/IE ActiveX object)
-foot
If you're talking about flash, whatever you place within the object tag will show up if flash is not supported.
Here's an example of a flash movie with a fallback image:
<object type="application/x-shockwave-flash data="yourmovie.swf" width="400" height="300">
<param name="movie" value="yourmovie.swf" />
<img src="noflash.gif" width="200" height="100" alt="" />
</object>
I typically test for plugins using javascript and write to the page based on the test results.
I'm looking to play a flash video hosted on a remote website. I've tried the following (and profuse google-ing):
In source of page on http://fakesite1.com/player.jsp:
<embed src = "FlashPlayer.swf?file=http://fakesite2.net/video.flv" />
I can browse to http://fakesite2.net/video.flv and ensure it's there, but the player comes back "movie not loaded" (on right-click) on fakesite1. My initial guess is that this might be some sort of security feature... is it possible to play a video hosted on a remote site?
The message "Movie not loaded" as seen in the context menu of an SWF object in a webpage means that the .swf file was not loaded by the browser plugin. The main cause is that that SWF file doesn't exist and the plugin got a 404 error, in which case make sure that the path to the SWF file is correctly set.
Also, the <embed> element is obsolete in modern HTML. Use <object> instead, as seen below.
Note that various versions of IE (except IE9/10, possibly including IE8) do not support the HTML5 <object data="" /> element, they prefer the IE4-era <object clsid="" /> element, so use a conditional comment, like so:
<!--[if IE]>
<object width="640" height="480" data="http://mysite.com/myflash.swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" >
<![endif]-->
<!--[if !IE]>-->
<object width="640" height="480" data="http://mysite.com/myflash.swf" />
<!--<![endif]-->
Try;
<embed
src="player.swf"
width="300"
height="300"
allowscriptaccess="always"
allowfullscreen="true"
id="player1"
name="player1"
file="http://fakesite2.net/video.flv"
/>
Is your SWF file named exactly "FlashPlayer.swf"?
As far as I know in Windows based systems letter case differences don't matter, however in Unix or Linux based ones it does matter. Your host is probably a Linux one. Try using lower case letters like "flashplayer.swf". Make this a habit with files that will be hosted online all the time. Also no space or special characters, use - or _ to seperate words.
i just want to embed a flash like this:
<object
data="data:application/x-shockwave-flash;base64,..."
type="application/x-shockwave-flash">
<param name="movie"
value="data:application/x-shockwave-flash;base64,..."
/> </object>
but it just doesn't work. Did i make any mistake?
thankz
That's because it doesn't work. Not only would you have a buffer overflow, but most browsers don't allow for the inclusion of Flash via Data URIs. If you need a good place to host your Flash, Google Code works just fine.
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/