×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Nokia Developer Champion
    Join Date
    Aug 2008
    Location
    Vadodara, India.
    Posts
    903

    Moving image over image or change image after 1 sec time period

    Hi,
    I want develop an app in Java for S40 (ASHA 501) where I need to move object in background image. I mean lets say an image of anything is moving right to left over background image. So I think I need to use timer.

    We can also achieve same by changing background image (which have object placed differently) and make illusion that object is moving from right to left.

    But I dont know how to use timer to change image on Java for Asha phones?

    If anybody can give me some example code for this, or similar thing would be very helpful and appreciated.

    Thanks,
    Chintan.
    Nokia Developer Wiki Moderation team
    World's Greatest Speeches for Windows Phone is now available on WP Marketplace.

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    602

    Re: Moving image over image or change image after 1 sec time period

    Timer is basically a thread that you can schedule tasks on in different time periods or delays.
    All you have to do is create a new TimerTask (and implement its run() method) and schedule it in a timer with any delay you want between activations
    in that run() method you can move your x,y parameters that you save for drawing the image and repaint the screen (or maybe you have a different thread to repaint the screen - depanding how your app is build and with which framework)

Similar Threads

  1. Moving an image
    By purnima.attarsingh in forum Symbian C++
    Replies: 2
    Last Post: 2010-07-21, 09:41
  2. Replies: 1
    Last Post: 2009-05-24, 03:21
  3. Change the image source for image label
    By nitroxxx123 in forum Symbian C++
    Replies: 3
    Last Post: 2009-04-05, 18:56
  4. Moving Focus from one image to other image.
    By crazystar in forum Mobile Java General
    Replies: 3
    Last Post: 2007-09-25, 11:37
  5. Image Uploader / Image Downloader / Image Server
    By kehong in forum Symbian C++
    Replies: 0
    Last Post: 2003-05-12, 17:38

Posting Permissions

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