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

#1051 2012-02-03 15:36:57

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

da backup is nrmal javascript + php
tongue


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#1053 2012-02-03 15:46:40

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Go Everywhere Beta

rdococ wrote:

GP1 wrote:

rdococ wrote:

I've updated my code snippet, with a bit of CSS to decorate the page.

(outdated code was here)
See the new CSS code! But the second sprite code doesn't work anymore?

I'll update it again.

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <h2>Go Everywhere Snippet</h2></head><body>
<style type="text/css">
body
{
background-color:#f1f1f1;
}
h1
{
color:black;
text-align:center;
}
p
{
font-family:"Arial";
font-size:10px;
}
</style>
<br>
<form name="data">
  <canvas id="stage" width="120" height="120"
 style="border: 0px solid rgb(0, 0, 0);">Cannot display project! Please switch to a browser with canvas support.
  </canvas><br>
  <script type="text/javascript">
function updateStageInToFin()
{
var c=document.getElementById("stage");
var cxt=c.getContext("2d");
cxt.fillStyle="#F1F1F1";
cxt.fillRect(0,0,10000,10000);
cxt.fillStyle="#FFFFFF";
cxt.fillRect(0,0,120,120);
cxt.fillStyle=document.data.sprite1c.value;
cxt.beginPath();
cxt.arc(document.data.sprite1x.value,document.data.sprite1y.value,document.data.sprite1s.value,document.data.sprite1s.value,Math.PI*2,true);
cxt.closePath();
cxt.fill();
}
  </script>
<p>
Sprite1 X:<input name="sprite1x" value="15" type="text"> pixels<br>
Sprite1 Y:<input name="sprite1y" value="15" type="text"> pixels<br>
Sprite1 size:<input name="sprite1s" value="15" type="text"> pixels<br>
Sprite1 colour:<input name="sprite1c" value="#000000" type="hex"> hex/rgb<br>
  <input name="update" onclick="updateStageInToFin()"
 value="Redraw Stage..." type="button"> (draw the stage)
</form></html></p>

Updated the one just above this text, the sprite can be any colour!

This is supposed to be what? And 1) your using html 4 which doesn't support canvas 2) we are using Jens's morphic.js for GE

0) It's a testing system/my snippet of code for it. It's a snippet: it doesn't need critism. It's just a test.
1) Maybe, but canvas works pretty fine.
2) Okay, but we should have another backup if morphic.js doesn't work for some person for any reason.

Okay. Ill put this on my dropbox. And by backup, you mean as a secondary application, right?


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#1054 2012-02-03 15:48:19

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Go Everywhere Beta

rdococ wrote:

Mine is javascript, but you can add PHP!

PHP for saving projects  tongue
And morphic.js is harder than it looks!!!!!!!


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#1055 2012-02-03 15:55:03

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Go Everywhere Beta

Hey! Your code works great! What we really need is a way to do blocks!


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#1056 2012-02-03 16:01:15

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Go Everywhere Beta

GP1 wrote:

Hey! Your code works great! What we really need is a way to do blocks!

Yep, we just need to fit in the blocks! And it's a pretty small page too, it's probably a good candidate for the final product.

Offline

 

#1057 2012-02-03 16:10:32

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Go Everywhere Beta

rdococ wrote:

GP1 wrote:

Hey! Your code works great! What we really need is a way to do blocks!

Yep, we just need to fit in the blocks! And it's a pretty small page too, it's probably a good candidate for the final product.

Yeah. We were going to use jQuery, but jQuery doesn't support touch events. morphic.js does, but I can't figure out how to resize and reposition the panes  sad


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#1058 2012-02-03 16:21:32

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: Go Everywhere Beta

comp500 wrote:

:p

so will there be a 3DS test-scratch program yet??


I'm back.
Maybe.

Offline

 

#1059 2012-02-03 16:22:51

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Go Everywhere Beta

DigiTechs wrote:

comp500 wrote:

:p

so will there be a 3DS test-scratch program yet??

test this and see if it works


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#1060 2012-02-03 16:26:56

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: Go Everywhere Beta

GP1 wrote:

DigiTechs wrote:

comp500 wrote:

:p

so will there be a 3DS test-scratch program yet??

test this and see if it works

if there was blocks, they didn't work, but everythingnelse did  big_smile


I'm back.
Maybe.

Offline

 

#1061 2012-02-03 17:32:51

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: Go Everywhere Beta

DigiTechs wrote:

GP1 wrote:

DigiTechs wrote:


so will there be a 3DS test-scratch program yet??

test this and see if it works

if there was blocks, they didn't work, but everythingnelse did  big_smile

Did you test it on a computer or 3ds?


I am currently http://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=imagehttp://blocks.scratchr.org/API.php?user=GP1&amp;action=onlineStatus&amp;type=text and I finally got over 1000 posts.

Offline

 

#1062 2012-02-04 03:19:57

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Go Everywhere Beta

GP1 wrote:

DigiTechs wrote:

GP1 wrote:


test this and see if it works

if there was blocks, they didn't work, but everythingnelse did  big_smile

Did you test it on a computer or 3ds?

Can you put that on a different sitemaker? I can't access DropBox. Maybe put it on weebly?

Offline

 

#1063 2012-02-04 03:47:12

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Go Everywhere Beta

Updated it again, with a simple try-catch since alot of it is pretty complicated.

Oops, wrong code. I wanted to copy something else. Let me do that again.

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <h2>Go Everywhere Snippet</h2></head><body>
<style type="text/css">
body
{
background-color:#f1f1f1;
}
h1
{
color:black;
text-align:center;
}
p
{
font-family:"Arial";
font-size:10px;
}
</style>
<br>
<form name="data">
  <canvas id="stage" width="120" height="120"
 style="border: 0px solid rgb(0, 0, 0);">Cannot display project! Please switch to a browser with canvas support.
  </canvas><br>
  <script type="text/javascript">
function updateStageInToFin()
{
try {
var c=document.getElementById("stage"); // Gain access to the stage.
var cxt=c.getContext("2d"); // Finish the data in the C variable.
cxt.fillStyle="#F1F1F1"; // Selects a fill style, ready for refreshing.
cxt.fillRect(0,0,10000,10000); // Clears the stage, to refresh the positions.
cxt.fillStyle=document.data.backc.value; // Sets the background colour.
cxt.fillRect(0,0,120,120); // Creates the background.
cxt.fillStyle=document.data.sprite1c.value; // This sets the sprite's colour.
cxt.beginPath(); // This begins the arc.
cxt.arc(document.data.sprite1x.value,document.data.sprite1y.value,document.data.sprite1s.value,15,Math.PI*2,true); // This draws the arc.
cxt.closePath(); // This ends the arc.
cxt.fill(); // This was just added.
}
catch(err) // Dare an error happen, this saves the day!
{
alert(err + ". Please report to the thread!")
}
}
  </script>
<p>
Background colour:<input name="backc" value="white" type="hex"> hex/rgb<br>
Sprite1 X:<input name="sprite1x" value="15" type="text"> pixels<br>
Sprite1 Y:<input name="sprite1y" value="15" type="text"> pixels<br>
Sprite1 size:<input name="sprite1s" value="15" type="text"> pixels<br>
Sprite1 colour:<input name="sprite1c" value="red" type="hex"> hex/rgb<br>
  <input name="update" onclick="updateStageInToFin()"
 value="Redraw Stage..." type="button"> (draw the stage)
</form></html></p>

Last edited by rdococ (2012-02-04 03:48:34)

Offline

 

#1064 2012-02-04 05:04:02

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Go Everywhere Beta

rdococ wrote:

GP1 wrote:

DigiTechs wrote:


if there was blocks, they didn't work, but everythingnelse did  big_smile

Did you test it on a computer or 3ds?

Can you put that on a different sitemaker? I can't access DropBox. Maybe put it on weebly?

I could on the 3DS, but there's a problem with the y size, cutting off most of the circle.

Offline

 

#1065 2012-02-04 07:33:43

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Go Everywhere Beta

Hey, just asking, can comp500 host my code for me? I want to test it on my 3DS.
Updated my script on the way:

Code:

<!DOCTYPE html>
<html>
<head>
  <p><b>Go Everywhere Snippet</b></p></head><body>
<style type="text/css">
body
{
background-color:#f1f1f1;
}
h1
{
color:black;
text-align:right;
}
p
{
font-family:"Verdana";
font-size:10px;
}
</style>
<form name="data"><p>
  <canvas id="stage" width="120" height="120" onclick="updateStageInToFin()"
 style="border: 1px solid rgb(0, 0, 0);">Cannot display project! Please switch to a browser with canvas support.
  </canvas></p>
  <script type="text/javascript">
function updateStageInToFin()
{
try {
var c=document.getElementById("stage"); // Gain access to the stage.
var cxt=c.getContext("2d"); // Finish the data in the C variable.
// Removed 2 commands from here
cxt.fillStyle=document.data.backc.value; // Sets the background colour.
cxt.fillRect(0,0,120,120); // Creates the background.
cxt.fillStyle=document.data.sprite1c.value; // This sets the sprite's colour.
cxt.beginPath(); // This begins the arc.
cxt.arc(document.data.sprite1x.value,document.data.sprite1y.value,document.data.sprite1s.value,15,Math.PI*2,true); // This draws the arc.
cxt.closePath(); // This ends the arc.
cxt.fill(); // This was just added.
}
catch(err) // Dare an error happen, this saves the day!
{
alert(err + ". Please report to the thread!")
}
}
  </script><noscript>Fatal Error: JavaScript needed!</noscript>
<p>
Background colour:<input name="backc" onclick="updateStageInToFin()" value="white" type="color"> hex/rgb<br>
Sprite1 X:<input name="sprite1x" onclick="updateStageInToFin()" value="60" type="text">/120 pixels<br>
Sprite1 Y:<input name="sprite1y" onclick="updateStageInToFin()" value="60" type="text">/120 pixels<br>
Sprite1 size:<input name="sprite1s" onclick="updateStageInToFin()" value="20" type="text">/120 pixels<br>
Sprite1 colour:<input name="sprite1c" onclick="updateStageInToFin()" value="#FF8000" type="color"> hex/rgb<br>
Click any textbox or canvas to update the stage.
</form></html></p>

Offline

 

#1066 2012-02-04 09:00:27

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Go Everywhere Beta

It's yet that I update it again.

Currently, there's no way to begin a script, but I'll do that in a minute.

Code:

<!DOCTYPE html>
<html>
<head>
  <p><b>Go Everywhere Snippet</b></p></head><body>
<style type="text/css">
body
{
background-color:#f1f1f1;
}
h1
{
color:black;
text-align:right;
}
p
{
font-family:"Verdana";
font-size:10px;
}
</style>
<form name="data"><p>
  <canvas id="stage" width="120" height="120" onclick="updateStageInToFin()"
 style="border: 1px solid rgb(0, 0, 0);">Cannot display project! Please switch to a browser with canvas support.
  </canvas></p>
  <script type="text/javascript">
function updateStageInToFin()
{
try {
var c=document.getElementById("stage"); // Gain access to the stage.
var cxt=c.getContext("2d"); // Finish the data in the C variable.
// Removed 2 commands from here
cxt.fillStyle=document.data.backc.value; // Sets the background colour.
cxt.fillRect(0,0,120,120); // Creates the background.
cxt.fillStyle=document.data.sprite1c.value; // This sets the sprite's colour.
cxt.beginPath(); // This begins the arc.
cxt.arc(document.data.sprite1x.value,document.data.sprite1y.value,document.data.sprite1s.value,15,Math.PI*2,true); // This draws the arc.
cxt.closePath(); // This ends the arc.
cxt.fill(); // This was just added.
}
catch(err) // Dare an error happen, this saves the day!
{
alert(err + ". Please report to the thread!")
}
}

function getLine(text, line){
var lines = text.split("$");
return lines[line - 1];
}

function runScript(i){ // Run scripts!
var a=i;
while (a<=5)
  {
  var vari=
  var executer=getLine(document.data.scripts.value,i);
  if (executer=="move+"){
  document.data.sprite1x.value=++document.data.sprite1x.value;
  }
  if (executer="move-"){
  document.data.sprite1x.value=--document.data.sprite1x.value;
  }
  if (executer="size+"){
  document.data.sprite1s.value=++document.data.sprite1s.value;
  }
  if (executer="size-"){
  document.data.sprite1s.value=--document.data.sprite1s.value;
  }
  if (executer="var+"){
  document.data.variable.value=++document.data.variable.value;
  }
  if (executer="var-"){
  document.data.variable.value=--document.data.variable.value;
  }
  if (executer="ifvarequals"){
  var i=++i;
  var executer=getLine(document.data.scripts.value,i);
  var iseq=executer
  var i=++i;
  var executer=getLine(document.data.scripts.value,i);
  if (document.data.variable.value==iseq)
  {
    runScript(i)
  }
  }
  updateStageInToFin();
  i++;
  }
}
  </script><noscript>Fatal Error: JavaScript needed!</noscript>
<p>
Background colour:<input name="backc" onclick="updateStageInToFin()" value="white" type="color"> hex/rgb<br>
Sprite1 X:<input name="sprite1x" onclick="updateStageInToFin()" value="60" type="text">/120 pixels<br>
Sprite1 Y:<input name="sprite1y" onclick="updateStageInToFin()" value="60" type="text">/120 pixels<br>
Sprite1 size:<input name="sprite1s" onclick="updateStageInToFin()" value="20" type="text">/120 pixels<br>
Sprite1 colour:<input name="sprite1c" onclick="updateStageInToFin()" value="#FF8000" type="color"> hex/rgb<br>
Sprite1 script:
<input name="scripts" type="text" onclick="updateStageInToFin()" value="scripts here..." id="scripts"><br>
Sprite1 variable:<input name="variable" type="text" onclock="updateStageInToFin()" value="0"><br>
Seperate commands with a dollar ($) and see the script for commands.
</form></html></p>

Offline

 

#1067 2012-02-04 09:10:56

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Offline

 

#1068 2012-02-04 10:12:34

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Go Everywhere Beta

I had to remove the script thingy since it wasn't working. Apparently I think I was setting a string to another string.

Code:

<!DOCTYPE html>
<html>
<head>
  <p><b>Go Everywhere Snippet</b></p></head><body>
<style type="text/css">
body
{
background-color:#f1f1f1;
}
h1
{
color:black;
text-align:right;
}
p
{
font-family:"Verdana";
font-size:10px;
}
</style>
<form name="data"><p>
  <canvas id="stage" width="120" height="120" onclick="updateStageInToFin()"
 style="border: 1px solid rgb(0, 0, 0);">Cannot display project! Please switch to a browser with canvas support.
  </canvas></p>
  <script type="text/javascript">
function updateStageInToFin()
{
var c=document.getElementById("stage"); // Gain access to the stage.
var cxt=c.getContext("2d"); // Finish the data in the C variable.
// Removed 2 commands from here
cxt.fillStyle=document.data.backc.value; // Sets the background colour.
cxt.fillRect(0,0,120,120); // Creates the background.
cxt.fillStyle=document.data.sprite1c.value; // This sets the sprite's colour.
cxt.beginPath(); // This begins the arc.
cxt.arc(document.data.sprite1x.value,document.data.sprite1y.value,document.data.sprite1s.value,15,Math.PI*2,true); // This draws the arc.
cxt.closePath(); // This ends the arc.
cxt.fill(); // This was just added.
}
  </script><noscript>Fatal Error: JavaScript needed!</noscript>
<p>
Background colour:<input name="backc" onclick="updateStageInToFin()" value="white" type="color"> hex/rgb<br>
Sprite1 X:<input name="sprite1x" onclick="updateStageInToFin()" value="60" type="text">/120 pixels<br>
Sprite1 Y:<input name="sprite1y" onclick="updateStageInToFin()" value="60" type="text">/120 pixels<br>
Sprite1 size:<input name="sprite1s" onclick="updateStageInToFin()" value="20" type="text">/120 pixels<br>
Sprite1 colour:<input name="sprite1c" onclick="updateStageInToFin()" value="#FF8000" type="color"> hex/rgb<br>
Sprite1 variable:<input name="variable" type="text" onclock="updateStageInToFin()" value="0"><br>
</form></html></p>

Offline

 

#1069 2012-02-04 12:09:42

whizzer
Scratcher
Registered: 2008-05-27
Posts: 500+

Re: Go Everywhere Beta

Anything new to test? I haven't checked for a while.


http://i46.tinypic.com/33df6me.png I'm whizzer0 for all things Minecraft.

Offline

 

#1070 2012-02-04 12:38:07

Zeusking19
Scratcher
Registered: 2011-07-10
Posts: 1000+

Re: Go Everywhere Beta

I will test for the DS!


http://i49.tinypic.com/2w7e1jm.pnghttp://dragcave.net/image/eFGFz.gifhttp://dragcave.net/image/9hE5q.gif

Offline

 

#1071 2012-02-04 12:41:22

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: Go Everywhere Beta

whizzer wrote:

Anything new to test? I haven't checked for a while.


the the the the the

Offline

 

#1072 2012-02-04 13:05:00

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Go Everywhere Beta

jslomba wrote:

whizzer wrote:

Anything new to test? I haven't checked for a while.

Yes, my little snippet has been updated.

Offline

 

#1073 2012-02-05 04:09:49

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

@ rdococ - Here it is: http://goeverywhere.x11s.org/tests/rodococTest.html

Last edited by comp500 (2012-02-05 04:10:06)


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#1075 2012-02-05 14:26:46

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: Go Everywhere Beta

comp500 wrote:

@ rdococ - Here it is: http://goeverywhere.x11s.org/tests/rodococTest.html

Works well on an iOS device.


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

Board footer