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

#1 2008-05-09 21:20:10

raspberrystrudel
Scratcher
Registered: 2008-03-25
Posts: 3

How do you Scroll?

How do you scroll with backgrounds?

Offline

 

#2 2008-05-09 21:33:56

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: How do you Scroll?

Well, Archmage has a whole thread, but what the heck. I'll try. First, make variable ScrollX

This on background with:

[blocks]<when green flag clicked>[/blocks]
[blocks]<forever if><key[right arrow  ]pressed?>[/blocks]
[blocks]<change{ scrollx }by(-5[/blocks]


blocks]<when green flag clicked>[/blocks]
[blocks]<forever if><key[left arrow  ]pressed?>[/blocks]
[blocks]<change{ scrollx }by(5[/blocks]



And on Sprite Zero (Name it that):


[blocks]<when green flag clicked>[/blocks]
[blocks]<forever>[/blocks]
[blocks]<set x to((( <{scroll  }> <+>(( 480 <*> 0 ))  ))[/blocks]


And for ever other background sprite, multiply 480 by 1 bigger number. For Example:

Above is sprite Zero, this is sprite One:


blocks]<when green flag clicked>[/blocks]
[blocks]<forever>[/blocks]
[blocks]<set x to((( <{scroll  }> <+>(( 480 <*> 1 ))  ))[/blocks]


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#3 2008-05-09 22:38:34

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

Re: How do you Scroll?

Visit the scrolling thread @ 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