Does anyone know the code to embed the flash player onto a website in full screen mode? I want to load a local project (one uploaded to the website's servers) since apparently my school's website safety content blocker blocks scratch.mit.edu, and my project only works on the flash player (it's too slow anywhere else). I already found how to embed the flash player, but it can't go to full screen, and the project is really cool at full screen.
Offline
Servine wrote:
The flash player is only available for logged in users, Java is for anybody.
It's pretty much impossible.
Actually, a flash embed is possible. I've done it before. I'm just wondering if a full-screen embed was possible, since the flash embed doesn't allow full screen.
Offline
I couldn't find an answer to this. I would like to be able to do it too myself.
Offline
Well, the closest you can get is to shift-click the full screen button. Then, if you exit full screen, the player will take the full space of the object as assigned in HTML.
Offline
How do you embed one normally? I might be able to help if I knew that...
Offline
Got it to work!
<html>
<body>
<object id="flashplayer" width="482" height="387" style="display: inline; visibility: visible; position: relative; z-index: 1000; " type="application/x-shockwave-flash" data="PlayerOnly.swf">
<param name="allowScriptAccess" value="sameDomain">
<param name="allowFullScreen" value="true">
<param id="path" name="flashvars" value="project=<INSERT PROJECT HERE>">
</object>
<script type="text/javascript">
var flashapp = document.getElementById('flashplayer');
function JSFillScreen(fillScreen) {
if (fillScreen) {
var r = flashapp.getBoundingClientRect();
flashapp.style.left = -r.left + 'px';
flashapp.style.top = -r.top + 'px';
var h = window.innerHeight;
if (typeof(w) != 'number') { // If IE:
w = document.documentElement.clientWidth;
h = document.documentElement.clientHeight;
}
setPlayerSize(w, h - 10);
} else {
setPlayerSize(482, 387);
flashapp.style.left = flashapp.style.top = '0px';
}
}
function setPlayerSize(w, h) {
var isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") > 0;
if (isFirefox) w += 1;
if (navigator.appName == 'Microsoft Internet Explorer') {
flashapp.style.width = w;
flashapp.style.height = h;
} else {
flashapp.width = w;
flashapp.height = h;
}
}
</script>
</body>
</html>Offline
MathWizz, the script works well. (a lot better then mine, anyway
)
Offline
Last edited by bobbybee (2012-01-04 18:50:26)
Offline
MathWizz wrote:
bobbybee wrote:
MathWizz, the script works well. (a lot better then mine, anyway
)
Hehe, I just copied it from Scratch.
![]()
*gasp* a pirate!
Offline
What about just a regular flash embed? cygene, you said you know how to do that? Could you explain how please?
Offline
MathWizz wrote:
Got it to work!
I tested it http://www.sitibs.com/sfp/scratchFPfull.html and it works in Firefox (9.0.1)!!!! ... but for don't know what reason I have to click THREE times the fullscreen button of the Flash Player: the very first time the project just jumps to the center of the page, the second time it goes back where it was and finally the last time it goes fullscreen.
Instead IE9 just keeps loading forever the page...
Any improvement? :-)
Offline
And safari. It doesn't work in IE though, does it? If not, is there any solution for that?
Offline
By the way, Mod Share project viewers can go fullscreen successfully, so you can copy the Javascript from that
Offline
s_federici wrote:
LS97 wrote:
Mod Share project viewers can go fullscreen successfully
What is this "Mod Share"?
It is a site where users can share projects created in BYOB, Bingo, Panther, etc.
More information on the forum thread or the site itself.
Last edited by LS97 (2012-02-07 15:31:51)
Offline
LS97 wrote:
By the way, Mod Share project viewers can go fullscreen successfully
Yes, this is an excellent improvement for FF: now I can click just once to go fullscreen. But in IE9 doesn't work at all: I can only see a black square instead of the running project :-)
Offline
s_federici wrote:
LS97 wrote:
By the way, Mod Share project viewers can go fullscreen successfully
Yes, this is an excellent improvement for FF: now I can click just once to go fullscreen. But in IE9 doesn't work at all: I can only see a black square instead of the running project :-)
Does it really have to work in IE? Couldn't they all change to a better browser? We all know IE doesn't exactly handle everything perfectly...
Offline
LS97 wrote:
Does it really have to work in IE?
even if my personal answer is "No" (I personally use only FF and sometime Chrome) the "producer of open source projects availabe to the whole world" is "Yes".
Offline
I'm gonna bump this since we decided we'd like to allow flash embed on every browser, and still have no great solution.
Offline