Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Embedding a Scratch 3.0 project into webpage without border, control elements, etc.
- frodewin
-
Scratcher
500+ posts
Embedding a Scratch 3.0 project into webpage without border, control elements, etc.
In the best tradition of this thread I tried to embed a Scratch 3.0 project into a webpage without the controls. I scaled up the project to 640x480 on purpose, ending up with this code:
Here is also a JSFiddle with the example.
* First, since this is definitely not the most elegant way, I'm welcoming improved versions
* Second, any idea how to get the project to autostart?
<html>
<head>
<style>
html, body {
border: 0px;
margin: 0px;
padding: 0px;
}
</style>
</head>
<body>
<center>
<div style="overflow: hidden; height: 480px; width: 640px;" >
<iframe style="margin-top:-50px; margin-left:-11px;" scrolling="no" allowtransparency="false" width="658" height="536" bgcolor=#220000 src="https://scratch.mit.edu/projects/284133924/embed/" allowfullscreen></iframe>
<br/><br/>
</div>
</center>
</body>
</html>
Here is also a JSFiddle with the example.
* First, since this is definitely not the most elegant way, I'm welcoming improved versions
* Second, any idea how to get the project to autostart?
- frodewin
-
Scratcher
500+ posts
Embedding a Scratch 3.0 project into webpage without border, control elements, etc.
Does someone know a way how to add autostart?
- axisjack
-
Scratcher
100+ posts
Embedding a Scratch 3.0 project into webpage without border, control elements, etc.
I think you would need some js for the autostart function.
- birbilis
-
Scratcher
93 posts
Embedding a Scratch 3.0 project into webpage without border, control elements, etc.
UPDATE: sorry, just noticed they said “without control elements”
this works for me:
has anyone implemented autostart? it seems to not use it (or at least anymore in Scratch 3)
this works for me:
<iframe
allowtransparency=“true”
width=“100%”
height=“100%”
src="https://scratch.mit.edu/projects/276955447/embed/?autostart=true“
frameborder=”0"
allowfullscreen
>
Please use a web browser that supports IFRAMEs
</iframe>
has anyone implemented autostart? it seems to not use it (or at least anymore in Scratch 3)
Last edited by birbilis (June 6, 2019 08:27:50)
- Locness
-
Scratcher
100+ posts
Embedding a Scratch 3.0 project into webpage without border, control elements, etc.
UPDATE: sorry, just noticed they said “without control elements”
this works for me:<iframe
allowtransparency=“true”
width=“100%”
height=“100%”
src="https://scratch.mit.edu/projects/276955447/embed/?autostart=true“
frameborder=”0"
allowfullscreen
>
Please use a web browser that supports IFRAMEs
</iframe>
has anyone implemented autostart? it seems to not use it (or at least anymore in Scratch 3)
All currently used browsers support iframes. You don't need a fallback.
- Locness
-
Scratcher
100+ posts
Embedding a Scratch 3.0 project into webpage without border, control elements, etc.
One thing that would be possible would be to use a fork of scratch-gui or scratch-www modified, but that would be hard.
Or only scratch-render.
Or only scratch-render.
Last edited by Locness (June 6, 2019 13:14:46)
- The-Cyber-Wolf
-
Scratcher
1 post
Embedding a Scratch 3.0 project into webpage without border, control elements, etc.
You can do it by <iframe src="https://scratch.mit.edu/projects/ID OF PROJECT/embed“ allowtransparency=”true“ width=”485“ height=”402“ frameborder=”0“ scrolling=”no" allowfullscreen></iframe>
- TurtleLegos
-
Scratcher
1000+ posts
Embedding a Scratch 3.0 project into webpage without border, control elements, etc.
You can do it by <iframe src="https://scratch.mit.edu/projects/ID OF PROJECT/embed“ allowtransparency=”true“ width=”485“ height=”402“ frameborder=”0“ scrolling=”no" allowfullscreen></iframe>I doubt they still need help now.
- ISTILLMAKESTUFF
-
Scratcher
500+ posts
Embedding a Scratch 3.0 project into webpage without border, control elements, etc.
Forkforus uses this:
<iframe src="https://forkphorus.github.io/embed.html?id=673905954&auto-start=true&light-content=false“ width=”482“ height=”393“ allowfullscreen=”true“ allowtransparency=”true“ style=”border:none;"></iframe>
<iframe src="https://forkphorus.github.io/embed.html?id=673905954&auto-start=true&light-content=false“ width=”482“ height=”393“ allowfullscreen=”true“ allowtransparency=”true“ style=”border:none;"></iframe>
- 9gr
-
Scratcher
1000+ posts
Embedding a Scratch 3.0 project into webpage without border, control elements, etc.
Forkforus uses this:Please don't Necropost
<iframe src="https://forkphorus.github.io/embed.html?id=673905954&auto-start=true&light-content=false“ width=”482“ height=”393“ allowfullscreen=”true“ allowtransparency=”true“ style=”border:none;"></iframe>
- Discussion Forums
- » Advanced Topics
-
» Embedding a Scratch 3.0 project into webpage without border, control elements, etc.






