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

#1 2012-07-16 21:33:24

shiguy101
Scratcher
Registered: 2010-11-17
Posts: 1000+

code for not having a scratch game start....

Is it possible to have a scratch game start until it is click on in my site with out reprogramming it on here?

Offline

 

#2 2012-07-16 22:26:13

stevetheipad
Scratcher
Registered: 2011-08-06
Posts: 1000+

Re: code for not having a scratch game start....

Not that I know of. You could try recording your project and then embedding the video in your site if you don't need it to be interactive.

Last edited by stevetheipad (2012-07-16 22:26:45)


http://i.imgur.com/0x8ia.jpg
gone

Offline

 

#3 2012-07-16 22:27:21

shiguy101
Scratcher
Registered: 2010-11-17
Posts: 1000+

Re: code for not having a scratch game start....

or can you start with the stop preset?

Offline

 

#4 2012-07-16 22:38:58

thebriculator
Scratcher
Registered: 2011-07-11
Posts: 500+

Re: code for not having a scratch game start....

well, you could have a temp variable. it would only go if the flag is clicked twice.

when gf clicked
if <(has the flag been clicked yet?) = [no]>
switch to costume [please click the flag v]
stop all
end
set [has the flag been clicked yet? v] to [yes]
broadcast [start program v]
when you upload it, make sure the variable is set to "no"

As a side note, I think the GF is automatically clicked when the page is opened, in flash, Java, and when embedded.

Last edited by thebriculator (2012-07-16 22:40:24)


.     http://tiny.cc/2cwgpw    http://tiny.cc/viwgpw    http://tiny.cc/iwwgpw

Offline

 

#5 2012-07-16 22:39:42

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: code for not having a scratch game start....

Well, you can program in a fake green flag of sorts. Just have a single script that broadcasts a message when the mouse is clicked, and you can have all your other initial scripts wait for that broadcast. You still have the problem of resource usage, but it is somewhat of a solution.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#6 2012-07-16 22:41:04

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: code for not having a scratch game start....

thebriculator wrote:

when gf clicked
if <(has the flag been clicked yet?) = [no]>
switch to costume [please click the flag v]
set [has the flag been clicked yet? v] to [yes]
stop all
end
broadcast [start program v]

your script was wrong


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#7 2012-07-16 22:52:10

shiguy101
Scratcher
Registered: 2010-11-17
Posts: 1000+

Re: code for not having a scratch game start....

is there a way to do it in html?

Offline

 

#8 2012-07-16 23:02:52

thebriculator
Scratcher
Registered: 2011-07-11
Posts: 500+

Re: code for not having a scratch game start....

Wes64 wrote:

your script was wrong

either way it still works.


.     http://tiny.cc/2cwgpw    http://tiny.cc/viwgpw    http://tiny.cc/iwwgpw

Offline

 

Board footer