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

#1 2011-06-20 14:41:19

Dom818
Scratcher
Registered: 2009-08-06
Posts: 100+

Is there a way to download and use the Flash player?

I was just wondering about this because the flash player sometimes runs projects faster than the actual Scratch program. I would be nice to download the flash player and import projects into it and use it offline. Is there a way to do this?

Offline

 

#2 2011-06-20 14:47:34

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Is there a way to download and use the Flash player?

The player is here, choose file then save page as to download it. I'm not sure how to play projects with it offline though.


/* No comment */

Offline

 

#3 2011-06-22 12:37:46

JudeSecaro
New Scratcher
Registered: 2011-06-22
Posts: 3

Re: Is there a way to download and use the Flash player?

Sure view the download it here http://get.adobe.com/flashplayer/completion/?installer=Flash_Player_10.3_for_Windows_-_Other_Browsers

Offline

 

#4 2011-06-22 12:40:48

whizzer
Scratcher
Registered: 2008-05-27
Posts: 500+

Re: Is there a way to download and use the Flash player?

JudeSecaro wrote:

Sure view the download it here http://get.adobe.com/flashplayer/completion/?installer=Flash_Player_10.3_for_Windows_-_Other_Browsers

We mean the Scratch Flash Player....


http://i46.tinypic.com/33df6me.png I'm whizzer0 for all things Minecraft.

Offline

 

#5 2011-06-22 12:44:32

JudeSecaro
New Scratcher
Registered: 2011-06-22
Posts: 3

Re: Is there a way to download and use the Flash player?

You can also see how the same is used in http://y88.in to display youtube flash content

Offline

 

#6 2011-06-22 19:36:51

Dom818
Scratcher
Registered: 2009-08-06
Posts: 100+

Re: Is there a way to download and use the Flash player?

Ok, I have gotten the player downloaded on my computer and have got it running in a program called Irfan View. Now I just need to know how to load a project into it.

Offline

 

#7 2011-06-23 16:15:25

ethanco
Scratcher
Registered: 2009-09-28
Posts: 12

Re: Is there a way to download and use the Flash player?

You have to run it in a HTML file. I was looking at the source code for a project page (Thank you, Firefox!) And it uses a javascript to modify the variables for the flash player.

Here is the (important) code for one of my projects:

Scratch Team wrote:

</script>        <div id="projectwrapper">
                        <!--Play with Flash Player -->
                <script type="text/javascript" src="/js/swfobject.js"></script>
                <script type="text/javascript">
                   var flashapp;

                   function installPlayer(swfName, swfID) {
                       var flashvars = {
                           project: '../../static/projects/ethanco/1846758.sb?version=7'};
                       var params = {
                           allowScriptAccess: 'sameDomain',
                           allowFullScreen: true,
                       };
                       var attributes = {};
                       swfobject.embedSWF(swfName, swfID, 482, 387, '10.0', false, flashvars, params, attributes);
                       flashapp = document.getElementById(swfID);
                       flashapp.style.position = 'relative';
                       flashapp.parentNode.parentNode.style.overflow = 'visible'; // override CSS
                       flashapp.style.zIndex = 1000; // put in front
                       setPlayerSize(482, 387);
                   }

                   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>
                <object style="visibility: visible; position: relative; z-index: 1000;" id="PlayerOnly" data="/static/misc/PlayerOnly.swf" type="application/x-shockwave-flash" height="387" width="483"><param value="sameDomain" name="allowScriptAccess"><param value="true" name="allowFullScreen"><param value="project=../../static/projects/ethanco/1846758.sb?version=7" name="flashvars"></object>

Offline

 

#8 2011-06-23 20:15:48

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

Re: Is there a way to download and use the Flash player?

The above solution, which as said, is the way that it is done on the official scratch website. It requires additional code to be included, which is not the most obvious thing to do for someone who is still at this level. This is a piece of code (don't remember where I got it, but it's not mine) that will do the same thing much easier and will work without additional code.

Code:

<object width="483" height="387" type="application/x-shockwave-flash" data="PlayerOnly.swf"><param name="allowScriptAccess" value="sameDomain"><param name="allowFullScreen" value="true"><param name="flashvars" value="project=RayTracer.sb?version=1"></object>

Hope that could help someone,
-bobbybee


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

Offline

 

#9 2011-06-24 03:28:26

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

Re: Is there a way to download and use the Flash player?

The only problem with using the Flash viewer is that you can't save!
You can use the player to test projects offline, but in no way use the experimental viewer to edit them and then try to save (which you can't, and will end up losing an hour of work).

Offline

 

#10 2011-06-24 06:45:28

mathematics
Scratcher
Registered: 2009-03-01
Posts: 1000+

Re: Is there a way to download and use the Flash player?

Uh... the above code doesn't work for me.

Last edited by mathematics (2011-06-24 06:45:51)

Offline

 

#11 2011-06-24 07:18:30

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

Re: Is there a way to download and use the Flash player?

mathematics wrote:

Uh... the above code doesn't work for me.

Note that it has to be on a server and the flash file has to be on the same domain.

Offline

 

#12 2011-06-26 20:44:19

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

Re: Is there a way to download and use the Flash player?

Offline

 

Board footer