Discuss Scratch

LaurenGeoghegan
New to Scratch
3 posts

Hosting Scratch on own website

Hi,

How would I go about hosting a modified version of the Scratch application on my own website?
Any help is appreciated, thanks.
WooHooBoy
Scratcher
1000+ posts

Hosting Scratch on own website

Well, you could run a version of https://github.com/LLK/scratch-flash for the actual editor.

The website is not open source, but you could write your own backend for sharing projects.

considered harmful
LaurenGeoghegan
New to Scratch
3 posts

Hosting Scratch on own website

Well I only want to host the editor. How would I actually take the source code and embed it in HTML?
WooHooBoy
Scratcher
1000+ posts

Hosting Scratch on own website

LaurenGeoghegan wrote:

Well I only want to host the editor. How would I actually take the source code and embed it in HTML?
You would have to get a SWF from your modified version (see Build instructions on the link I gave) and then you could use
<object width="100" height="100">
<param name="movie" value="file.swf">
<embed src="file.swf" width="100" height="100">
</embed>
</object>
Change the width and height, I think it works. If not, try looking at the source code for the project editor page and see how it's done.

considered harmful
LaurenGeoghegan
New to Scratch
3 posts

Hosting Scratch on own website

Thanks for your help WooHooBoy,

I can look at the .swf file locally in the browser, but once I upload it to the server and try to view it, a blank screen appears with a green Scratch flag. Do you know what I've done wrong?

Thanks again.
-Io-
Scratcher
1000+ posts

Hosting Scratch on own website

<object type="application/x-shockwave-flash" data="file.swf" width="100%" height="100%" id="scratch" style="visibility: visible;">
<param name="allowscriptaccess" value="always">
<param name="allowfullscreen" value="true">
<param name="wmode" value="direct">
<param name="menu" value="false">
<param name="flashvars" value="autostart=false&project_title=Untitled">
</object>
This is the HTML used in the editor page (Without some flashvars). I think <param name=“allowscriptaccess” value=“always”> will do the trick, but i'm not sure since when i was learning how to mod i had to modify some of the code for it to be in the editor and not on the player, and i don't remember if i put the “allowscriptaccess” or not. You could try.

Last edited by -Io- (Oct. 30, 2015 03:35:14)


DigiTechs
Scratcher
500+ posts

Hosting Scratch on own website

LaurenGeoghegan wrote:

Thanks for your help WooHooBoy,

I can look at the .swf file locally in the browser, but once I upload it to the server and try to view it, a blank screen appears with a green Scratch flag. Do you know what I've done wrong?

Thanks again.

To enable editing, you'll have to edit the code so that it thinks it's able to edit. I forgot where to edit though

I do, in fact, have my own site; it's here.
I'm also working on a thing called Fetch. Look at it here!
@thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain.

Powered by DjangoBB

Standard | Mobile