Discuss Scratch

davidkt
Scratcher
1000+ posts

Embedding SWF in Django

Well, I think I have the problem. Maybe Django can't serve binary files and I'll have to use another server. I noticed that all the binary files on the Scratch website were served by another server, cdn.scratch.mit.edu. So, any good free static file hosting servers?

Remember when I looked like this? I still do.


Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
QuillzToxic
Scratcher
1000+ posts

Embedding SWF in Django



*Brain goes kapoof*

Why not host another site, that hosts the swf, and use iframe to put it on your site, I think thats what scratch does mostly….
davidkt
Scratcher
1000+ posts

Embedding SWF in Django

QuillzToxic wrote:



*Brain goes kapoof*

Why not host another site, that hosts the swf, and use iframe to put it on your site, I think thats what scratch does mostly….
That's what I'm doing. But any good hosting sites? I'm using 000webhost for now.

Remember when I looked like this? I still do.


Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
QuillzToxic
Scratcher
1000+ posts

Embedding SWF in Django

davidkt wrote:

QuillzToxic wrote:



*Brain goes kapoof*

Why not host another site, that hosts the swf, and use iframe to put it on your site, I think thats what scratch does mostly….
That's what I'm doing. But any good hosting sites? I'm using 000webhost for now.

I used 1FreeHosting, but with a little site like that you could host pictures and sqls on a diffrent site and then saving space on your orignal site.


(000webhost is better )
davidkt
Scratcher
1000+ posts

Embedding SWF in Django

Ok, I got 000webhost to work, but the file won't load right. You can see what I mean here.

Remember when I looked like this? I still do.


Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
djdolphin
Scratcher
1000+ posts

Embedding SWF in Django

First, your swf file won't load, even if you open it directly. Second, I see you copied and pasted incomplete code from my archive. You need this (adapted from here) to grab variables like the project from the url:
var uri = window.location.href;
var queryString = {};
uri.replace(/([^?=&]+)(=([^&]*))?/g, function($0, $1, $2, $3) {queryString[$1] = $3;});
Third, the Scratch Team has removed the ability to interact with the swf using javascript from the source code, along with the ability to read the flashvars for a project url and then load it. You'll need to recode it to get it working.

!
davidkt
Scratcher
1000+ posts

Embedding SWF in Django

Uh…what? I know it won't load.

Remember when I looked like this? I still do.


Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
djdolphin
Scratcher
1000+ posts

Embedding SWF in Django

Are you using the 10.2 or the 11.4 version of the SWF?

!
davidkt
Scratcher
1000+ posts

Embedding SWF in Django

djdolphin wrote:

Are you using the 10.2 or the 11.4 version of the SWF?
11.4. Should I use the 10.2?

Remember when I looked like this? I still do.


Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
djdolphin
Scratcher
1000+ posts

Embedding SWF in Django

davidkt wrote:

djdolphin wrote:

Are you using the 10.2 or the 11.4 version of the SWF?
11.4. Should I use the 10.2?
No.

!
davidkt
Scratcher
1000+ posts

Embedding SWF in Django

djdolphin wrote:

davidkt wrote:

djdolphin wrote:

Are you using the 10.2 or the 11.4 version of the SWF?
11.4. Should I use the 10.2?
No.
Ok, so what else should I do?

Remember when I looked like this? I still do.


Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
djdolphin
Scratcher
1000+ posts

Embedding SWF in Django

Does it work when you use it offline? If it does, try another static host. 000webhost can be unreliable, and I've known it to corrupt files before. I use Google Drive for static hosting. If it doesn't work when you run it offline, I don't know how to help you. I don't seem to be getting any errors when I run the SWF.

!
davidkt
Scratcher
1000+ posts

Embedding SWF in Django

djdolphin wrote:

Does it work when you use it offline? If it does, try another static host. 000webhost can be unreliable, and I've known it to corrupt files before. I use Google Drive for static hosting. If it doesn't work when you run it offline, I don't know how to help you. I don't seem to be getting any errors when I run the SWF.
It works offline.

Remember when I looked like this? I still do.


Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
opalmist246
Scratcher
16 posts

Embedding SWF in Django

can we include html in scratch projects?

Powered by DjangoBB