Page 1 of 1

new Image Scroll problem

Posted: Tue Jan 03, 2017 12:12 pm
by Jason Kim
I am looking for ways to create and scroll a new image.
And I wrote the this code. But there is a problem.

Code: Select all

from microbit import *

image = Image(
    "090900:"
    "090909:"
    "090909:"
    "090909:"
    "090909:")
 
def my_scroll(image) :
      for x in range(image.width()) : 
           yield image.crop(x, 0, 5, 5) <- understand!
display.show(my_scroll(image))
and then result is

Code: Select all

Allocation in interrupt handlerTraceback (most recent all last):
  File "<stdin>", line 15, in <module>
MemoryError
Is there a way to solve this problem?
why is that happen to me.... :(