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

#1 2012-05-25 02:00:25

ManaUser
Scratcher
Registered: 2009-03-11
Posts: 100+

Running the Flash player offline

I was wondering if there's any semi-easy way I get the Flash player running offline (i.e. on projects stored locally). I've decided I like it best in general, and since 2.0 will by Flash-based, it makes all the more sense to make that my "target" platform. (To be clear, I'm talking about 1.4 version though, not the prototype.) I know I've seen instructions for hosting Scratch projects on your own site (which is basically equivalent to what I want), but they were targeted at the Java player.

I did make a brief attempt at doing this on my own, but I just ended up with a black rectangle.  hmm


http://i.imgur.com/SPYSM.gif http://i.imgur.com/t9k1Z.gif http://i.imgur.com/OwYVa.gif http://i.imgur.com/0qlZq.gif

Offline

 

#2 2012-05-25 23:46:34

ManaUser
Scratcher
Registered: 2009-03-11
Posts: 100+

Re: Running the Flash player offline

Okay, I finally figured it out. It wasn't as easy as I hoped, but if anyone else is interested in doing this, I'll be happy to explain.

Last edited by ManaUser (2012-05-25 23:47:09)


http://i.imgur.com/SPYSM.gif http://i.imgur.com/t9k1Z.gif http://i.imgur.com/OwYVa.gif http://i.imgur.com/0qlZq.gif

Offline

 

#3 2012-05-26 08:40:28

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: Running the Flash player offline

Explain! Explain!

I've also been trying this, and NOTHING!  sad


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&display=small

Offline

 

#4 2012-05-26 11:01:19

ManaUser
Scratcher
Registered: 2009-03-11
Posts: 100+

Re: Running the Flash player offline

Okay, the main problem is that as far as I could tell, there's no way to get it working without a web server. So you'll need a little web server of some kind. I used TinyWeb, which is a free Windows web server that only requires minimal setup.

Then, whatever folder you can configured to be the root directory for the web server, put three things in it:
* PlayerOnly.swf (right-click, Save as...)
* Your project saved as test.sb
* A text file named index.html containing this text:

Code:

<html><head><title>Flash Player</title></head><body><hr>
<object id="flashplayer" style="display: inline; visibility: visible;
position: relative; z-index: 1000;" type="application/x-shockwave-flash"
data="PlayerOnly.swf" height="387" width="482">
<param name="allowScriptAccess" value="sameDomain">
<param name="allowFullScreen" value="true">
<param name="flashvars" value="project=test.sb">
</object> 
<hr></body></html>

Make sure your web server is running, then open your browser and type "localhost" into the address bar. If everything worked, you should see two lines, and your project between them.

If you only see two lines, or if you get an error, something didn't work.  tongue

One thing that seemed to be important is that I used a full path when I told tinyweb what to use as the root directory. Meaning "C:\blah\blah\blah\my folder\", not ".\my folder". If I did it the second way the web page would appear, but the player wouldn't work. If you don't mind doanloading an extra thing, there's a frontend called TinyBox, that will take care of this for you.

P.S. Your project doesn't really have to be named test.sb, but if not you'll need to change the name near the end of the html file to match.

Good luck.

Last edited by ManaUser (2012-05-26 11:03:42)


http://i.imgur.com/SPYSM.gif http://i.imgur.com/t9k1Z.gif http://i.imgur.com/OwYVa.gif http://i.imgur.com/0qlZq.gif

Offline

 

#5 2012-05-27 04:27:29

trinary
Scratcher
Registered: 2012-01-29
Posts: 1000+

Re: Running the Flash player offline

Interesting.  smile
I'm certainly going to try this.


http://trinary.tk/images/signature_.php

Offline

 

#6 2012-05-27 05:29:48

ycxx
New Scratcher
Registered: 2012-05-16
Posts: 3

Re: Running the Flash player offline

http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
config.
it's work!
file://localhost/c:/PlayerOnly.swf?project=chouqian3.sb?version=2

Offline

 

#7 2012-05-27 21:40:20

ManaUser
Scratcher
Registered: 2009-03-11
Posts: 100+

Re: Running the Flash player offline

ycxx wrote:

file://localhost/c:/PlayerOnly.swf?project=chouqian3.sb?version=2

Does this mean you got it working without a web server?


http://i.imgur.com/SPYSM.gif http://i.imgur.com/t9k1Z.gif http://i.imgur.com/OwYVa.gif http://i.imgur.com/0qlZq.gif

Offline

 

#8 2012-05-28 11:39:58

ycxx
New Scratcher
Registered: 2012-05-16
Posts: 3

Re: Running the Flash player offline

Yes, I'm sure, you can try "opera" instead of "ie", or try to become like the address
" file://localhost/c:/PlayerOnly.swf?project=c:/chouqian3.sb?version=6"

Offline

 

Board footer