using image as button

Hello

I want to use an image as a button... I added a picture to my screen and as active, as below

   i_Logo = Bitmap.getBitmapResource("com.zylog/res/images/Login.png");
   iField_Logo = new BitmapField(i_Logo,BitmapField.FOCUSABLE);
   iField_Logo.isFocus();
   iField_Logo.setChangeListener(this);
   add(iField_Logo);

How re-captured the click event of the image... it is by clicking on the image I want to move to the next screen

Hello

I was able to intercept the image event click by overiding the method navigationClick() below, you will find the detailed code

i_Logo = Bitmap.getBitmapResource("com.zylog/res/images/Login.png");
   iField_Logo = new BitmapField(i_Logo,BitmapField.FOCUSABLE)
{
     protected boolean navigationClick(int status, int time)
    {
        fieldChangeNotify(1);
        return true;
    }};
   iField_Logo.isFocus();
   iField_Logo.setChangeListener(this);
   add(iField_Logo);

in the fieldChanged() method, use the following code

   public void fieldChanged(Field field,int context)
    {
        if( field == iField_Logo )
        {
            Dialog.alert("image clicked");
        }
  }

Tags: BlackBerry Developers

Similar Questions

  • I WANT TO CHANGE MY CODE TO USE THE LEFT BUTTON = PREVIOUS IMAGE / RIGHT OF THE IMAGE NEXT TO ANY KEY KEYBOARD = NEXT IMAGE. HERE IS MY CODE.

    I WANT TO CHANGE MY CODE TO USE THE LEFT BUTTON = PREVIOUS IMAGE / RIGHT OF THE KEYBOARD = NEXT IMAGE TO

    ANY KEY = IMAGE NEXT. HERE IS MY CODE. PLEASE HELP ME OBI WAN KENOBI, YOU'RE MY ONLY HOPE:

    Stop(); stage.addEventListener (KeyboardEvent.KEY_DOWN, changeSection); function changeSection(event:KeyboardEvent):void {switch (event.keyCode) {case Keyboard.RIGHT: nextFrame(); break; case Keyboard.LEFT: prevFrame() ;}}}}

    Your problem seems to be a matter of not understanding what version of the code that you use compared to what your file is configured to use.  Your other display uses AS2, so if you want this to work you must set the parameters of publication for AS2.

    If your file settings are for AS3 code that show you in this announcement will be suitable for this because it is the AS3 code.  The function would change to what is shown below.  Mgiht want to use a listener KEY_UP instead of a listener KEY_DOWN.

    function changeSection(event:KeyboardEvent):void {}

    nextFrame();

    }

  • iPhone 5 s 10.0.2 update cannot use image capture

    I have a mac pro running 10.6.8. Since I upgraded my iphone 5s today 10.0.2, I am unable to use Image Capture on my mac to transfer your photos, iphoto does not work either. I get a message on my phone to the computer I chose to 'trust', then I get an error message in the Image Capture in saying that I have to enter a password on my phone but the password is not displayed at the time.

    Hello pwexford,

    Thank you for using communities of Apple Support. It is my understanding that you were unable to use transfer pictures from your iPhone to the Image Capture. It is very important to save valuable images of your phone. I want to make sure that you are able to transfer this content correctly.

    His expected behavior to be prompted for a password if the phone is locked. Please, try the following steps.

    1. Connect your device to your computer, and then turn on the unit.

      If the device is locked with a password, enter it.

    2. In the Image Capture, select the device from the list of devices.
    3. Use the buttons at the bottom of the window to Capture of Image to display thumbnails in a list or as icons to change the size of thumbnails, or to rotate or remove images.
    4. In the pop-up menu to import to, choose where to save images or what application to use to open the image.
    5. To import only some of the photos, select the photos you want, and then click Import. To import all the photos, click Import all.

      Choose AutoImporter menu drop-down ' connection opens this [device] ' to transfer images from a device to your computer whenever you connect it to your computer.

    6. Select "Delete after import" to remove parts of the instrument after transfer to your computer. You can also select individual items on your device, and then press Delete on your keyboard.

    Image capture: Image transfer and other elements of your device

    Have a wonderful day!

  • Satellite A100-787: drivers needed to use the control buttons and volume knob

    There should be a program that displays on the screen, the volume level when I change volume and another which allows me to use the game, front, back or stop buttons either with medial player JetAudio.

    Where can I get such a program?

    Are you using the original image of preinstalled Toshiba?
    The image of Toshiba Vista contains all the necessary drivers and utilities and using this OS everything should function.

    If you have installed other OS like XP XP drivers are needed.
    If I m not wrong not the notification of screen volume levels appears not in XP.

    Also if you want to use Toshiba command buttons you need to install the correct drivers as controls, common modules, etc.
    The proper installation order is necessary and important. That's why I recommend that you check the installation instructions on the download page of Toshiba!

    By the way; the control buttons are preconfigured and I don t think that it might be possible to use it with another players as IE Jetaudio.

  • Put the image on button of United Nations

    Hi all

    I'm working on LabView for awhile for lab projects. Now, I want to achieve a GUI (interface) pay customers. So my software design must be well thought out in my opinion. Therefore, I decide for example to insert images (icons) in my buttons. For example: pour the button print or sauvegerde, I would like to put icons to facilitate the use of the buttons and look of my face before. Is anyone can help me to do these kinds of things? Thanks in advance.

    Kind regards

    Hello
    You can find not bad on the lavag.org site:

    http://lavag.org/topic/14400-CR-System-icon-button-lv2009/

    http://lavag.org/topic/14587-CR-system-button-Vista-Blue-theme-lv2009/

    http://lavag.org/topic/14586-CR-system-button-Vista-theme-small-lv2010/

    Nice day

  • Image toggle button

    Hello

    I currently have a set of images, I want to use for the buttons. For each button, there is an image enable and disable.

    When I do a validation control button, it will be disabled when the validation is not possible and at this stage the disable image should appear on the button. Then of course the opposite should be when it is turn on then I want to show the active picture.

    Is there a way to do this easily?

    What I would do, is to have a kind of method of the observer in a bean that leans on the binding.commit.enabled and when it changes to run the bean method. This method would then take care to change the image. But how can I do this while keeping simple, since there needed to be used throughout the application which is cut into multiple workspaces?

    I thank in advance.

    Commandtoolbarbutton adf has an icon attribute and disabledIcon for your usecase. The disabledIcon is rendered when the button is disabled then try this

    
    

    If you do not use a toolbar, then use a CommandButton with icon = "#{bindings.commit.enabled?" "{"enabled.gif":"disabled.gif"}".

  • using image instead of the image number labels?

    Hi team,

    I'm building a major project that would be modified during its construction, I stress a little because I'm confident on the timeline to move forward and backward through the structure, (as well as the user with the ability to use a menu to go where ever they want).  Then out to form the menu that specifies where to go, there's a front and back button using framework next and previous to move forward and backward.

    ..  So, what happens if after construction of a large part of this, the client wants to put in an extra page? This will upset my navigation (OR if I put the extra page at the end of the timeline menu works fine, but forward and backward buttons may not work properly)

    So should I use image instead of the image number labels?  (How can I do this gotoAndStop (?);)

    Or y at - it another way I should approach this?  like having a variable to keep track of page instead of numbers of chassis number?

    What do you think?

    See you soon

    Void

    There is no need to rename the image labels just because you add a new.  This is one of the main reasons to use labels instead of numbers frae... it saves you from having to change completely due to a.

    (How can I do this gotoAndStop (?);) ... -->. gotoAndStop ("labeltext");

  • image under buttons

    I have not found anything definitive on that yet, so my question is:

    Using of SWF or Image Loader I would be able to underlay a sign with a picture and have buttons above that?

    So far the SWF or the Image Loader component seems to then act as a container for inserted objects when placed above him.

    I found another workaround solution to insert an image under buttons using the swf widget

    On the Panel, I insert a first swf widget then I insert another swf inside widget and I connect it to my image/swf

    After inserting the image, I select the first widget and I drag and drop the buttons.

    (You can also select it in the outline view in the lower right of the Inspector panel).

    Now I am able to resize and move the container and the button also to remain at the top

    The important thing is to drag the first container and not those containing the image.

    (Infact if you move it you see in the sketch discovers that change the order of levels)

    If you're really in the need to move the container image just copy and cut buttons and paste again after the move

    At this point in my humble OPINION, another solution may be consulted on the configurator interface

  • How to have a piece of video with an image with buttons

    Hi all

    I'm new to the forum, so I apologize for my lack of right to know from the outset.

    I am creating a flash file that plays a video and once finished video you see, instead of the video, a still image with buttons on it. The buttons would be "replay video" or "go to url".

    I'm on how import video and create a swf with a skin and a FLV file base. But I can not get my head wrapped around how, once the video reaches the end, have the image, change and display 2 buttons.

    If you know some tutorials or know examples, that would hep.

    Any help would be greatly appreciated.

    Thank you
    Thepopguy

    Oh complex - I think I got this one...

    Click component flv and give it the instance name vid.
    Create your buttons onto the scene in place - give everyone an instance name. Fix them in invisible using actionscript.

    Use this code on the image containing the flv file - not to fix this code for the component. It must BE on THE FRAME, not on the component...

    var vidList: Object = new Object();
    vidList.complete = function() {}
    button1instancename._visible = true;
    button2instancename._visible = true;
    }
    vid.addEventListener ("complete", vidList);
    Stop();

    This will make the buttons visible when the film is over.

  • Thunderbird COMPLAINT: Using [back |] Forward] buttons, loses "Privacy, Options button. Exit/Startup [restart] Thunderbird needed to restore the Options button.

    Thunderbird 31.7.0 (and before) COMPLAINT: using [back |] Forward] buttons, loses "In order to protect your privacy, Thunderbird has blocked a remote content in this message." Options button. Exit/Startup [restart] Thunderbird is require to retrieve the button 'Options '. Is there another way, without rebooting? [There is no help / Feedback in Thunderbird button... so I'm reporting it via Firefox.]

    Check if this being due to any any addon.

    Restart Thunderbird in Mode safe:
    Help > restart with disabled addons.
    Whist in safe mode, run for a while to see if that happens.

    If it does not work then one of your addons can cause a conflict.
    Disable each in turn to test.
    She might need to update.

  • Temporarily use images in memory cache on sertain sites

    I would like firefox to use images cached immediately on sertain sites, instead of exchanging a lot of pending requests for the code 304 'unchanged' on them, to make browsing it there a bit faster and smoother.

    Is there a way to do this, just change the parameters of FF, or I have to look for some addon?

    • Only the images, not another thing (i.e. the flash JS, CSS)

    You can try ImgLikeOpera.

  • I use Image Capture to shoot pics my phone is off

    Tired of importers jpg directly to photographs, then having to export and re-name-the, I use Image Capture to extract my iPhone.  I save it to my desktop.   I got their name in the Finder.  Then, I open the pictures and import them from my office.  When I finished all imports, I delete the pictures on my desk.  I have been through the jpgs in Photos and see several that I KNOW that I have given a file name, but they have names like IMG_5677.  What a waste of time!   I HATE it that Apple makes it so difficult just give a file name to your photos!  I use filenames for reasons of family history.  I don't want to be enslaved to a convention of software as "Securities.".

    Any suggestions?

    Thanks in advance for your answers!

    You must make the difference between the file and the data it contains. This Word file is not your novel, it is a container. The data it contains is your novel. The Beatles never wrote or recorded an mp3 file. He wrote and recording Let It Be , and this mp3 file contains a copy of this record. That jpeg is not your Photo. It is actually a compression format that contains a version of your photo.

    - And is not Apple, but a convention shared by all the camera manufacturers, software manufacturers and so on - there is a difference between the name of the file that refers to the file and the title of the photo which is a name that you give the image. Thus, IMG_5677 is a file name, our marriage is a title for a photo.

    The title of the photo is saved in Exif and IPTC Photo metadata and that is accessible by all software photo on all computer systems. Add a title in pictures, export the image, send it to a Windows machine, open it in, say, Lightroom, and there is the title.

    There is an agreed standard all of the manufacturers of cameras and software manufacturers.

    Compatible with this standard photos.

    You want to use filenames for titles which is not standard, and if you find yourself with this complexity.

    Here is another way to work. Import the images in the Photos. Add a title to them in Photos. So, if you want a free version at some point that has the title as file name, export the image (file-> export) and, in the export dialog, he say to use the title as the file name.

    Less complex and standards.

  • 27 "2013 mac only shut down using the power button / stop, is this a problem or a part of the new system

    After my upgrade that Mac is not closed by using the drop-down menu option, it also seems to crash the finder.  Finder raises with force quit.  I can only shut it down using the power button.  Is this a bug/problem of a part of the El Capitan?

    Wacom tablet software is known to cause this problem. Options:

    Uninstalling the Wacom software

    Completely and remove items from connection

    The Wacom driver update

  • How to use the "back" button to return to the new page tab in FF15

    In FF14 I could
    (1) open the new tab and see the new tabs with thumbnails of page 9 page.
    2) click on a thumbnail and go to this page.
    (3) click on the back of FF button, who took me to the new tab page so I could click on some other thumbnail.

    In FF15 which doesn't seem to work. In step 3 above, the previous button is not active/active and so I can easily go back to the new page tab. How to get back in a simple way?

    No, you can no longer use the previous button back to the topic: newtab page if you have opened a page by clicking on one of the slots on this page.

    You need to close the tab and open a new tab to get this page or set as the home page and click on the Home button.

  • recently, my mac started hanging. the screen freezes and I have to use the power button to turn it off

    recently, my mac started hanging. the screen freezes and I have to use the power button to turn it off

    Run this test and post the results here.

    http://www.etresoft.com/etrecheck

Maybe you are looking for