Click here to Skip to main content
11,715,160 members (63,192 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: Java J2ME Blackberry
I want to move added image horizontally in both directions i.e(right to left and left to right) in blackberry. plz help me out for this
Posted 9-Oct-12 21:30pm
TorstenH. at 10-Oct-12 4:14am
why do you want to move an image horizontal? what should happen with the picture afterwards?
I guess there's a bigger story behind this.
AmanArora2012 at 10-Oct-12 5:04am
i want to make a game this is required in it
AmanArora2012 at 10-Oct-12 5:06am
something like brick breaker game i.e already available in Blackberry App

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You need to react on the event of pressing a key.
net.rim.device.api.ui.component.ButtonField[^] has a method for keyUp event[] for this.

On that event you need to place the image some pixels to the corresponding side and update the view.

But as always take one step at a time:
- first try to display the image
- try to place image at different places
- try to react on button
- set image to new place on button event

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 495
1 Richard MacCutchan 275
2 Maciej Los 259
3 ManasKumarM 155
4 Frankie-C 125
0 Sergey Alexandrovich Kryukov 775
1 CHill60 415
2 Richard MacCutchan 405
3 Maciej Los 389
4 OriginalGriff 320

Advertise | Privacy | Mobile
Web02 | 2.8.150901.1 | Last Updated 10 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100