Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jan 2011

    Automatic image move?

    (Sorry for my english!)
    I would create an app with a my first-image like background, and another second-image that appear with lateral move on the display.
    The effect i would create is like an a lateral transition of my second-image, on the first-image(the background).
    I try and try and try... but i don't find right code...
    Anyone can post an example code?
    Thanks for now!

  2. #2
    Registered User
    Join Date
    Feb 2007

    Re: Automatic image move?

    Hi denny,

    I have find a animation example... you can use this example code or modify code according to your requirement....


  3. #3
    Registered User
    Join Date
    Jan 2011

    Re: Automatic image move?

    thank you!
    but i dont' understand how work the code... (for now!)
    however my first idea it' like this code...

    but return an error when i call redraw2( )
    typeerror: redraw2( ) take exactly 3 arguments (2 given)
    The code
    import appuifw, e32, sysinfo, graphics, globalui
    class my_app:
        def __init__(self):
            self.photo = graphics.Image.open("E:\\Images\\photo.jpg")
            appuifw.app.title = u"My App"
            appuifw.app.directional_pad = False
            self.background = graphics.Image.open("E:\\Images\\background.jpg")
            self.canvas = appuifw.Canvas(redraw_callback=self.redraw)         
            appuifw.app.body = self.canvas
            appuifw.app.menu =  [(u'show', self.show),(u'remove', self.remove),(u"Exit", self.quit)]
            appuifw.app.exit_key_handler = self.quit
        def redraw(self, rect):
        def redraw2(self, rect, x):
            self.canvas.blit(self.photo, target=(x,80))       
        def remove(self):
            self.canvas = appuifw.Canvas(redraw_callback=self.redraw)             
        def show(self):
            x = -300
            while x < 0:            
                self.canvas.blit(self.photo, target=(x,94))
                x = x + 30
            self.canvas = appuifw.Canvas(redraw_callback=self.redraw2(x))
       def quit(self):
            del self.canvas
    if __name__ == "__main__":
        lock = e32.Ao_lock()
        first_app = my_app()
    anyone can help me?
    Last edited by dennyb87; 2011-01-22 at 19:06.

Similar Threads

  1. Move Image Top to Down
    By piyush_kyada in forum Symbian
    Replies: 1
    Last Post: 2010-12-15, 15:20
  2. Replies: 2
    Last Post: 2008-06-19, 07:02
  3. make an Image move over the display
    By nodevelop in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2003-04-21, 13:54
  4. automatic image capture and sending on the 7650
    By cianc in forum General Messaging
    Replies: 1
    Last Post: 2002-12-30, 12:26
  5. Automatic compression of image by application
    By nmittal in forum Symbian User Interface
    Replies: 0
    Last Post: 2002-08-20, 12:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts