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

#1 2012-10-18 13:40:54

briandavidhoward
New Scratcher
Registered: 2012-10-18
Posts: 2

Append a variable to a control?

first of all - I'm new to this so apologies if the answer lives elsewhere. I think I could probably use a video file somehow but wanted to play with looping and background. So - if I have more than one "new" background and they are numbered sequentially, Scratch appends a digit (background1, background2 etc). I was looking to see if I could in a script increment the trailing digit or append a variable to "background" that i would then increment??

Offline

 

#2 2012-10-18 14:11:33

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Append a variable to a control?

when gf clicked
set [i v] to (0)
forever
switch to background <join [background] (i)>
change [i v] by (1)
The above should work.

Offline

 

#3 2012-10-18 14:20:41

briandavidhoward
New Scratcher
Registered: 2012-10-18
Posts: 2

Re: Append a variable to a control?

found it - "next background"

Offline

 

Board footer