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

#1 2009-03-19 12:31:11

CDromatron
Scratcher
Registered: 2009-02-09
Posts: 23

stage movement?

I'm trying to make a game with a scrolling background. what I do is this.

when right arrow is pressed if background=1 switch background to background 2.

when I do this the stage keeps going. I know why. but is there a way to stop?

or is there a better way?

Offline

 

#2 2009-03-19 15:07:22

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: stage movement?

when not right arrow pressed background = 1
use this <<  <not>  >>

Offline

 

#3 2009-03-19 17:28:40

Spine
Scratcher
Registered: 2009-01-15
Posts: 100

Re: stage movement?

CDromatron wrote:

I'm trying to make a game with a scrolling background. what I do is this.

when right arrow is pressed if background=1 switch background to background 2.

when I do this the stage keeps going. I know why. but is there a way to stop?

or is there a better way?

Well, you could do when right arrow is pressed next costume, and for the other way like left, do switch to costume costume # - 1
that's all I can really say, unless you would want to do an easier thing such as just making the background a different sprite and then doing scrolling but, that's not what you asked so =P

I hope I helped you...
-Spine

Offline

 

#4 2009-03-23 12:26:08

CDromatron
Scratcher
Registered: 2009-02-09
Posts: 23

Re: stage movement?

em thanks guys..?

Offline

 

#5 2009-03-23 13:45:05

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: stage movement?

So wait, if I understand you, your stage is scrolling because you have different costumes that are changing but nothing is actually moving?

That is not the right way to do things. Try looking at this http://scratch.mit.edu/forums/viewtopic.php?id=2440


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

Board footer