This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-09-04 09:16:12

cygene
Scratcher
Registered: 2011-05-31
Posts: 100+

Full Screen Flash Embed

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.


http://cygene.wikispaces.com/file/view/clip2.gif/242526033/clip2.gif

Offline

 

#2 2011-10-15 07:37:17

nickliboo
Scratcher
Registered: 2011-01-22
Posts: 20

Re: Full Screen Flash Embed

I tried and it didn't work  sad

Offline

 

#3 2011-10-15 08:48:02

Servine
Scratcher
Registered: 2011-03-19
Posts: 1000+

Re: Full Screen Flash Embed

The flash player is only available for logged in users, Java is for anybody.

It's pretty much impossible.


http://bluetetrarpg.x10.mx/usercard/?name=Servine

Offline

 

#4 2011-10-15 09:26:38

cygene
Scratcher
Registered: 2011-05-31
Posts: 100+

Re: Full Screen Flash Embed

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.


http://cygene.wikispaces.com/file/view/clip2.gif/242526033/clip2.gif

Offline

 

#5 2011-10-16 09:19:53

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: Full Screen Flash Embed

I couldn't find an answer to this. I would like to be able to do it too myself.

Offline

 

#6 2012-01-04 14:02:31

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Full Screen Flash Embed

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.


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#7 2012-01-04 16:08:19

nickbrickmaster
Scratcher
Registered: 2010-02-02
Posts: 500+

Re: Full Screen Flash Embed

How do you embed one normally? I might be able to help if I knew that...


Ask me what I'm doing, wait an hour than roll a die, if it's 4-6, I'm playing Skyrim, if it's 1, I'm eating, if it's 2-3 I'm programming.
Steam: nickbrickmaster | RotMG: PwnThemAll | Minecraft: nickbrickmaster | League Of Legends: BaneOfTitans

Offline

 

#8 2012-01-04 16:28:44

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Full Screen Flash Embed

There is some JavaScript involved... Lemme see...


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#9 2012-01-04 16:52:27

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Full Screen Flash Embed

Got it to work!

Code:

<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>

http://block.site90.net/scratch.mit/text.php?size=30&amp;text=%20A%20signature!&amp;color=333333

Offline

 

#10 2012-01-04 17:04:53

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Full Screen Flash Embed

MathWizz, the script works well. (a lot better then mine, anyway  smile  )


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#11 2012-01-04 17:27:45

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Full Screen Flash Embed

bobbybee wrote:

MathWizz, the script works well. (a lot better then mine, anyway  smile  )

Hehe, I just copied it from Scratch.  tongue


http://block.site90.net/scratch.mit/text.php?size=30&amp;text=%20A%20signature!&amp;color=333333

Offline

 

#12 2012-01-04 18:50:02

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Full Screen Flash Embed

smile

Last edited by bobbybee (2012-01-04 18:50:26)


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#13 2012-01-05 18:47:18

flashgocrazy
Scratcher
Registered: 2011-01-12
Posts: 500+

Re: Full Screen Flash Embed

MathWizz wrote:

bobbybee wrote:

MathWizz, the script works well. (a lot better then mine, anyway  smile  )

Hehe, I just copied it from Scratch.  tongue

http://gifsoup.com/imager.php?id=3291051&amp;t=o *gasp* a pirate!


◕‿◕

Offline

 

#14 2012-02-03 22:28:02

ChunkyMonkeyGames
New Scratcher
Registered: 2012-01-28
Posts: 28

Re: Full Screen Flash Embed

What about just a regular flash embed? cygene, you said you know how to do that? Could you explain how please?

Offline

 

#15 2012-02-04 04:52:09

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: Full Screen Flash Embed

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

 

#16 2012-02-06 16:47:17

cygene
Scratcher
Registered: 2011-05-31
Posts: 100+

Re: Full Screen Flash Embed

Works on Chrome  smile


http://cygene.wikispaces.com/file/view/clip2.gif/242526033/clip2.gif

Offline

 

#17 2012-02-06 21:32:06

ChunkyMonkeyGames
New Scratcher
Registered: 2012-01-28
Posts: 28

Re: Full Screen Flash Embed

And safari. It doesn't work in IE though, does it? If not, is there any solution for that?

Offline

 

#18 2012-02-07 15:22:50

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Full Screen Flash Embed

By the way, Mod Share project viewers can go fullscreen successfully, so you can copy the Javascript from that  big_smile

Offline

 

#19 2012-02-07 15:30:42

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Full Screen Flash Embed

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

 

#20 2012-02-07 15:33:44

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: Full Screen Flash Embed

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

 

#21 2012-02-07 15:38:30

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Full Screen Flash Embed

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

 

#22 2012-02-08 09:19:40

s_federici
Scratcher
Registered: 2007-12-18
Posts: 500+

Re: Full Screen Flash Embed

LS97 wrote:

Does it really have to work in IE?

smile  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

 

#23 2012-02-16 17:29:15

ChunkyMonkeyGames
New Scratcher
Registered: 2012-01-28
Posts: 28

Re: Full Screen Flash Embed

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

 

Board footer