Discuss Scratch

NathanzGames
Scratcher
9 posts

.SBX to .SWF / HTML5

Is it possible to convert a ScratchX file (.sbx) to flash or HTML5? (So you can display your game on a website) I know how to convert .sb2 to .swf, but does this work on ScratchX files?
THEFalconPunch
Scratcher
6 posts

.SBX to .SWF / HTML5

Sorry if I'm late, but I wanna answer this for other people as well.

I just tried your suggestion with JuneBeetle's .sb2 to .swf converter, and it did work… kinda.
It converted the file to .swf (flash) but the extensions I've tested (the text-to-speech and a browser cookie thing) didn't seem to work, maybe because I'm using a standalone version of flash.

Last edited by THEFalconPunch (Nov. 3, 2016 01:05:49)

superben100
Scratcher
1000+ posts

.SBX to .SWF / HTML5

I don't believe it's possible with Junebeetle's converter. Here's why:

Junebeetle's converter does not recognize the file format “.SBX”. It was designed for “.SB2” files. His SB2 to SWF converter works by bundling a copy of Scratch itself, along with the SB2 file, which you supply it with, into an SWF file. The usual Scratch editor can't handle SBX files, because the Scratch Team didn't want it to. They wanted to keep Scratch X seperate from Scratch for various reasons. That's why they have a seperate website for Scratch X.

So after they created another website, the ST had to create a new editor specifically designed to load Scratch X extensions. And here is where the SB2 to SWF converter fails. As mentioned before, Junebeetle's converter simply bundles a copy Scratch (not Scratch X), with a copy of the SB2 which you supply it with. So when you try to bundle an SBX file with a copy of regular Scratch, what do you get? You get a defective SWF file that won't load.

But the SB2 to SWF converter sees it coming, and won't bundle Scratch with an SBX file. Instead a gives you a nice “The file you've entered is not an SB2 file. Please try another file.” error. (Or something along those lines.)

Now, it may be possible to create an SBX to SWF converter, but that would probably take a lot of coding.

Last edited by superben100 (Dec. 16, 2016 15:06:41)

pkexe
Scratcher
85 posts

.SBX to .SWF / HTML5

To make the blocks in HTML, you may need image files, but running them means you need graphics (canvas will do, and the element is explained below) and JavaScript to access the src attribute of the image (explained below) and do some other stuff on the canvas.

HTML Canvas:
<canvas width="400" height="400" id="c">
This sets the width and height attributes to 400 and can be accessible with JavaScript with the id attribute c.

HTML Images:
<img src="your source" >
This adds an image with the src attribute your source and the src attribute tells the browser the source
BGMead
Scratcher
1000+ posts

.SBX to .SWF / HTML5

NathanzGames wrote:

Is it possible to convert a ScratchX file (.sbx) to flash or HTML5? (So you can display your game on a website) I know how to convert .sb2 to .swf, but does this work on ScratchX files?
If you would like to add it to a website, click the “Embed” button under your project. Add the HTML code to your website.
xTimeBomb
Scratcher
7 posts

.SBX to .SWF / HTML5

BGMead wrote:

NathanzGames wrote:

Is it possible to convert a ScratchX file (.sbx) to flash or HTML5? (So you can display your game on a website) I know how to convert .sb2 to .swf, but does this work on ScratchX files?
If you would like to add it to a website, click the “Embed” button under your project. Add the HTML code to your website.

Do you know what .sbx files are?
superben100
Scratcher
1000+ posts

.SBX to .SWF / HTML5

xTimeBomb wrote:

BGMead wrote:

NathanzGames wrote:

Is it possible to convert a ScratchX file (.sbx) to flash or HTML5? (So you can display your game on a website) I know how to convert .sb2 to .swf, but does this work on ScratchX files?
If you would like to add it to a website, click the “Embed” button under your project. Add the HTML code to your website.

Do you know what .sbx files are?
1. Please do not necropost. This topic has been dead for quite a while.

2. SBX files are files that are created by ScratchX.
NutageGaita
Scratcher
16 posts

.SBX to .SWF / HTML5

necroposting! yay!
however there is no “see project page” button in scratchX, because it is based off scratch 2 offline editor
superben100
Scratcher
1000+ posts

.SBX to .SWF / HTML5

NutageGaita wrote:

necroposting! yay!
however there is no “see project page” button in scratchX, because it is based off scratch 2 offline editor
“yay!”? I think not.
witherman17
Scratcher
46 posts

.SBX to .SWF / HTML5

BGMead wrote:

NathanzGames wrote:

Is it possible to convert a ScratchX file (.sbx) to flash or HTML5? (So you can display your game on a website) I know how to convert .sb2 to .swf, but does this work on ScratchX files?
If you would like to add it to a website, click the “Embed” button under your project. Add the HTML code to your website.
Dude. Did you read the topic? It SAYS ScratchX, NOT normal Scratch.
babmv
Scratcher
100+ posts

.SBX to .SWF / HTML5

.
Boomer001
Scratcher
1000+ posts

.SBX to .SWF / HTML5

it is actually possible to convert .sbx to html with sheeptester.github.io.
24foutr_aj
Scratcher
13 posts

.SBX to .SWF / HTML5

emoji! It could work if you could convert .sbx to .sb2 in the first place!
MikeDEV
Scratcher
1000+ posts

.SBX to .SWF / HTML5

24foutr_aj wrote:

emoji! It could work if you could convert .sbx to .sb2 in the first place!
Please don't necropost. The last time this post was replied to was back on December 26, 2019.

Judging by the post:

Boomer001 wrote:

it is actually possible to convert .sbx to html with sheeptester.github.io.
It should be possible, as long as you don't use any special blocks or blocks from experimental extensions.

I believe this has been already answered. I will request this thread to be closed as it is already answered.

Powered by DjangoBB