Show an image on button click

We need the button to display an image on a button when clicked for a tic tac toe game.  Any help would be helpful.

Ok, we will use a movieclip button but is there a tutorial somewhere on how to display the image when the button is clicked?

Similar Messages

  • Show waiting image on button click till response comes

    Hi All,
    I want to show waiting image on button click in a jsff page till response comes from back-end.
    For this I am using following code in button :-
    <af:commandButton text="Submit" id="cb1"
    actionListener="#{RegistrationManagedBean.onRegisterClick}"
    binding="#{RegistrationManagedBean.registerButton}"
    inlineStyle="width:65px; height:34px; font-size:11px; font-family:verdana; color:#fff; border-color:Gray; border-style:solid; border-width:1px; background-image:url(&quot;images/template-related/template_new/ButtonEnabledBG.png&quot;); background-repeat:repeat-x; float:right;"
    styleClass="button">
    <af:clientListener method="enforcePreventUserInput" type="action"/>
    </af:commandButton>
    enforcePreventUserInput is written inside on .js file.
    js code is :-
    function enforcePreventUserInput(evt) {
    var popup = AdfPage.PAGE.findComponentByAbsoluteId('pt1:r1:p1');
    if (popup != null){
    AdfPage.PAGE.addBusyStateListener(popup,handleBusyState);
    evt.preventUserInput();
    function handleBusyState(evt){
    var popup = AdfPage.PAGE.findComponentByAbsoluteId('pt1:r1:p1');
    if(popup!=null){
    if (evt.isBusy()){ 
    popup.show();
    else if (popup.isPopupVisible()) {
    popup.hide();
    AdfPage.PAGE.removeBusyStateListener(popup,handleBusyState);
    Popup code is :-
    <af:popup id="p1" contentDelivery="immediate">
    <af:dialog id="d2" type="none" closeIconVisible="false"
    inlineStyle="background-color:none !important; width:54px; height:55.0px;">
    <af:image source="/images/template-related/LoadingCircle.gif" shortDesc="Loading" id="i7"/>
    </af:dialog>
    </af:popup>
    This is working and image is also being shown but this image is not shown as transparent(where as image is transparent) and also image is having top and bottom shading which is because of dialog or popup. But i dont want this shadow. Also inline style is not working for this popup.
    If there is any other way to solve this purpose please suggest.
    Thanks
    Edited by: 915148 on Jun 4, 2012 1:19 AM

    Ok, we will use a movieclip button but is there a tutorial somewhere on how to display the image when the button is clicked?

  • Show  / Hide image on button click

    I have a button that when clicked through an advanced action will show a tick graphic.
    This works fine but what I would like to happen that if the button is pressed again the tick will disappear.
    Also if the button was pressed for a third time the tick graphic would reappear, and so on.
    What is the most efficient way of doing this?
    Many thanks in advance.
    Viki

    Here we go (again). Sorry, but I have answered similar questions so many times. Here is an article that offers you several toggle button scenarios:
    Toggle Shape buttons - Captivate 6 - Captivate blog
    Steps for your use case, since you don't want to change the look of the toggle button:
    create a boolean user variable v_visib ; you can give it a default value of 0
    create a conditional advanced (or shared) action like this:
    IF v_visib is equal to 1
      Show im_x                where im_x is the image you want to show, in a shared action will be a parameter
      Toggle v_visib
    ELSE
      Hide im_x
      Toggle v_visib

  • How to upload Images to azure media services and show the image on on click on Link?

    Hi,
    I want to upload the image to the Azure media service asset and show the Link on the page. When use clicks on the Link I want to show it user. How can I implement this with C#? Now I am uploading the image to asset as in the normal way and getting the URL
    for that. But I am not able to show it user when he click on the image link.
    Thanks,
    Pavankuamr H K

    HI
    Azure media services has a RESTful service and a C# SDK that you can use to interact with the Azure Media Services.
    Here is the documentation and sample code for calling the Media services and using the SDK:
    https://msdn.microsoft.com/en-us/library/dn735908.aspx?f=255&MSPPError=-2147217396
    Aram Koukia | Blog: koukia.ca | Twitter:
    @aramkoukia

  • Hide/show a form upon button click

    Hi
    I want to show/hide different form upon button clicks. Also I want to clear the data from a form upon button clicks. How can I achecive this? Thanks in advance.

    Hi,
    Create one boolean variable in your datastore. Click of the button should set the value to false and you can bind the same variable to the visibility property so that you can hide and display accordingly. For making the values blank, you can put condition on the detault value formula IF(!<your datastore variable>,"",<value needed>)
    Regards,
    Murtuza

  • Show/hide panels on button click

    Hello,
    I have to show/hides several panels on same palette on some button actions. I am trying to check whether it is possible to add each child panel in different .fr files.
    Just to brief,  On panel I have different icon buttons and on each button I have to show different view in the main panel thus I cannot use tabular dialog. Please help me to find a way to achieve this?
    I tried following code
    I have Created two primary resource panel in TestSample1.fr,TestSample2.fr files respctively.
    My main panel (Palette panel) have two buttons (TestSample1Button,TestSample2Button).
    I want to show/hide these panels on button click in main panel.
    InterfacePtr<IPanelControlData> parentPanelCtrlData(Utils<IPalettePanelUtils>()->QueryPanelByWidgetID(kMainPanelWidgetID) ); // main panel
    if(parentPanelCtrlData)
        InterfacePtr<IControlView>         testSample1PanelPanelView((IControlView*)::CreateObject(::GetDataBase(this),kTestSample1P anelWidgetBoss,IID_ICONTROLVIEW));
        if(testSample1PanelPanelView)
            parentPanelCtrlData->AddWidget(testSample1PanelPanelView);
    I have added above code on TestSample1Button observer.But it is not working.
    is It possible? can anybody help me?

    Yes it is possible.
    I am not sure but following line of code also needed after adding widget .
    testSample1PanelPanelView->ForceRedraw(testSample1PanelPanelView->GetDrawRegion(), kTrue);

  • Show an image for incorrect click box response

    Is there a better way to show a "Please Try Again" image for a click box response?
    1.  Add click box.
    2.  Set to 1 attempt
    3.  If clicked correctly, advance to next slide.
    4.  If clicked incorrectly, continuing playing current slide
    5.  Add "Please Try Again" image in timeline to show AFTER click box Pause.
    6. If I want to allow multiple failed attampts before moving to the next slide, duplicate items 1 - 5 above, adding it later in the timeline,
    The above method works if Quiz Scoring is turned off.  If Quiz Scoring is turned on, would I have to start using variables to score the quiz?  Each click box would set a variable to TRUE once they get the question correct, whether it was the first attempt or the third attempt.
    Micky

    BTW - This is Captivate CS5.
    Just thought of a better solution.
    After incorrect, redirect to the beginning of the current slide, so it plays from the beginning again.  this way, I would have to duplicate a click box and "please try again" image 3 times for 3 attempts in the same slide.
    However, this method would not let me specify the number of attempts, unless that was stored in variable.
    hmmm....
    One second thought, it may be better to just duplicat the items to reflect the number of attempts I want on that page.  This would let me include a highlight box after the last attempt so they can learn where to click correctly.  We don't want them caught in an endless loop of ignorance! 
    As for scoring, I wouldn't have to use variables if I directed them to a "Correct" screen that as a "Click to continue" click box that gave them the point.  Though that might be a little clunky.
    Thanks for letting me think through my problem on this forum.  ;-)

  • Display an image on button click?

    Hi,
    I'm using Captivate 3 and trying to set up an image to be
    displayed in a certain position on the screen when a button is
    clicked. It would always be on the top layer to overlay anything
    else on the screen at the time. I need to do this for multiple
    slides so it would be way too confusing to try to use multiple
    slides to accomplish this.
    I am thinking it might be javascript? (I don't know what the
    code would be though) But I realize it might just be another trick.
    I thought this would be a popular request but searching in the
    forums and Google hasn't yielded anything helpful yet.
    Thanks!
    -Dan

    Hi Rick,
    Let me back up a step and explain the issue with my project.
    I'm creating an interactive software simulation using png images of
    the application pages and inserting click boxes and buttons to give
    the illusion the user is in a 'real' training environment. The
    application is a windows based one, with three types of navigation;
    tabs, icons and menus. Creating the tab navigation was pretty
    straightforward, I put an image of each tabbed page on its own
    captivate slide and included click boxes to link the proper tabs to
    the proper pages. Looks pretty good so far.
    My challenge is with the menu options. I would like the user
    to be able to select a menu option, see the drop down image of the
    choices, click on the choice and go to the correct new page. The
    challenge is the layering and timing. The menu options are on the
    same pages as the tab page images, the timing is already tied into
    what needs to happen with the tab images. So I was hoping if I
    could find a way to put a hot spot over say, the File menu, have
    the menu options appear, and have the user click on an option to be
    taken to the new page. Using the timeline, I set the first menu
    option to pause at 1.5 seconds, then the new menu option image
    would appear after clicking, then a hot spot on the menu option
    image would take the user to the new correct page. Still with me
    If I use the timing feature, and click on a menu for the drop
    down image to appear, then all the drop down images appear. That's
    why I think your idea of a success caption is potentially
    brilliant. I tried making a custom caption by selecting Success
    Caption>Custom and then selecting the image bmp that I saved in
    the Adobe Captions gallery. On previewing, the image is not in the
    success caption. So I looked further at the gallery and the images
    there have files with .FCM extensions. Looks to be some type of
    text file, not sure?
    So... <whew> there's my dilemma. Bottom line I am
    looking for best practices to create a software simulation (without
    using motion recording because I also need to create these in large
    quantity with minor image changes... John Doe and Jane Doe and
    such) when the software has integrated tab, menu and icon
    navigation.
    Your thoughts?
    thanks
    Karen (working with Dan
    )

  • Show chart region when button clicked??

    Hi All,
    i'm using apex 4.0
    initially i want to hide chart region,when clicked on button i want to show chart region...
    i have tried Dynamic actions ,show/hide but no hope...
    any one help me on this.. :)
    thanks in Adv.

    1. Firstly, make sure that the Chart region has a region template.
    2. If you don't want to use Dynamic Actions try something like the following:
    In the Region Definition set the Static ID = chart
    set the Region Attributes => style="display:none;"
    for the button set the URL = javascript:$("#chart").show();
    Cheers
    Shunt

  • Trying to add 2 slideshows to one page, how can I make a slideshow so it does not show an image...

    Trying to add 2 slideshows to one page, how can I make a slideshow so it does not show an image until they click on the thumbnail?

    You can do this with "composition" widgets.

  • Resizing JFrame on button click to show an image on the JFrame

    Dear All,
    I have a JFrame which has an empty label. On button click I want to set an icon for the label and want the JFrame to be resized to show that icon. I am using frame.pack() and I am not using any other sizing function. The code that I have right now, prints the image on the panel, but does not resize the frame to show the image. Pleae could someone help.package gui;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.Toolkit;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.ItemEvent;
    import java.awt.event.ItemListener;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import javax.swing.ImageIcon;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    public class ComponentDemo extends JPanel implements ActionListener,
    ItemListener, MouseListener, KeyListener {
         private JTextArea textarea;
         private JButton button;
         private final static String newline = "\n";
         private JLabel imageIcon;
         public ComponentDemo() {
              button = new JButton("JButton welcomes you  to CO2001");
              button.addActionListener(this);
              add(button);
              textarea = new JTextArea(10, 50);
              textarea.setEditable(false);
              addMouseListener(this);
              textarea.addKeyListener(this);
              JScrollPane scrollPane = new JScrollPane(textarea);
              add(scrollPane);
              imageIcon = new JLabel();
              add(imageIcon);
              setBackground(Color.pink);
              new JScrollPane(this);
          * Create the GUI and show it. For thread safety, this method should be
          * invoked from the event-dispatching thread.
         private static void createAndShowGUI() {
              // Create and set up the window.
              JFrame frame = new JFrame("Simple FrameDemo");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
              frame.setLocation(700, 200);
              // get the content pane and set the background colour;
              frame.add(new ComponentDemo());
         //     frame.setSize(screenSize);
              // frame.getContentPane().setBackground(Color.cyan);
              // Display the window.
              frame.pack();
              frame.setVisible(true);
              frame.setResizable(true);
         public static void main(String[] args) {
              // Schedule a job for the event-dispatching thread:
              // creating and showing this application's GUI.
              javax.swing.SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        createAndShowGUI();
         @Override
         public void actionPerformed(ActionEvent e) {
              // TODO Auto-generated method stub
              if (e.getSource() instanceof JButton) {
                   // System.out.println(e.getSource());
                   String text = ((JButton) e.getSource()).getText();
                   textarea.append(text + newline);
                   textarea.setBackground(Color.cyan);
                   textarea.setForeground(Color.BLUE);
                   textarea.setCaretPosition(textarea.getDocument().getLength());
                   imageIcon.setIcon(createImageIcon("SwingingDuke.png",
                   "Image to be displayed"));
         @Override
         public void itemStateChanged(ItemEvent arg0) {
              // TODO Auto-generated method stub
         @Override
         public void mouseClicked(MouseEvent arg0) {
              textarea.append("A Mouse click welcomes you to CO2001" + newline);
              textarea.setBackground(Color.green);
              textarea.setCaretPosition(textarea.getDocument().getLength());
         @Override
         public void mouseEntered(MouseEvent arg0) {
              // TODO Auto-generated method stub
         @Override
         public void mouseExited(MouseEvent arg0) {
              // TODO Auto-generated method stub
         @Override
         public void mousePressed(MouseEvent arg0) {
              // TODO Auto-generated method stub
         @Override
         public void mouseReleased(MouseEvent arg0) {
              // TODO Auto-generated method stub
         @Override
         public void keyPressed(KeyEvent e) {
              System.out.println(e.getKeyChar());
              textarea.append("The key " + e.getKeyChar()
                        + " click welcomes you to CO2001" + newline);
              textarea.setBackground(Color.YELLOW);
              textarea.setFont(new Font("Arial", Font.ITALIC, 16));
              textarea.setCaretPosition(textarea.getDocument().getLength());
         @Override
         public void keyReleased(KeyEvent e) {
              System.out.println(e.getKeyChar());
              // textarea.append("The key "+
              // e.getKeyChar()+" click welcomes you to CO2001" + newline);
              // textarea.setBackground(Color.green);
              // textarea.setCaretPosition(textarea.getDocument().getLength());
         @Override
         public void keyTyped(KeyEvent e) {
              // TODO Auto-generated method stub
              System.out.println(e.getKeyChar());
              // textarea.append("The key "+
              // e.getKeyChar()+" click welcomes you to CO2001" + newline);
              // textarea.setBackground(Color.blue);
              // textarea.setCaretPosition(textarea.getDocument().getLength());
         /** Returns an ImageIcon, or null if the path was invalid. */
         protected ImageIcon createImageIcon(String path, String description) {
              java.net.URL imgURL = getClass().getResource(path);
              if (imgURL != null) {
                   System.out.println("found");
                   return new ImageIcon(imgURL, description);
              } else {
                   System.err.println("Couldn't find file: " + path);
                   return null;
    }

    myJPanel.setPerferredSize(new Dimension(new_width, new_hight));
    myJFrame.pack();

  • Show image on the form Java WS gets image. Call this WS on button click

    Hi,
    Is there a way to show an image on the form. On the form I have along with the data I have a button that when clicked get and show the image itself on the form. I have a Java WebService that gets the image from the remote location. How can I make the button click event to call this Web Service and show the image on the form itself. Any help is appreciated.
    Thanks

    WHiteSox, are you on client/server or web version.
    which version of forms are you using.
    something i can think of is.
    during the click to call the webservice, copy the image to the local system.
    next step is, using READ_IMAGE_FILE built in which reads the image from the local file system and displayed on the forms image item.

  • I cannot get the Output Module to work. I was able to get the button to show up, but when I click on it, nothing happens. i need to export a PDF asap

    I cannot get the Output Module to work. I was able to get the button to show up, but when I click on it, nothing happens. i need to export a PDF asap. I am trying to export 33 PSD files in BRIDGE to a PDF like I used to do on my other computer with bridge.

    Let's start with the general things.
    When you have a problem with one particular site, a good "first thing to try" is clearing your Firefox cache and deleting your saved cookies for the site.
    (1) Bypass Firefox's Cache
    Use Ctrl+Shift+r to reload the page fresh from the server.
    Alternately, you also can clear Firefox's cache completely using:
    orange Firefox button (or Tools menu) > Options > Advanced
    On the Network mini-tab > Cached Web Content : "Clear Now"
    If you have a large hard drive, this might take a few minutes.
    (2) Remove the site's cookies (save any pending work first). While viewing a page on the site, try either:
    * right-click and choose View Page Info > Security > "View Cookies"
    * Alt+t (open the classic Tools menu) > Page Info > Security > "View Cookies"
    In the dialog that opens, you can remove the site's cookies individually.
    Then try reloading the page. Does that help?

  • Hide/Show a graph based on button click .

    I have to show a graph based on the values selected in the shuttle . The graph should be drawn only when a button( "Show graph") is clicked . My question is
    1) If the set the button's action to submit, it resets and empties the selected values in the shuttle . How do I prevent that ?
    2) How do I make the graph appear and disappear based on the button click ( Like a toggle button ) ?
    3) As I can draw the graph only from the values selected in the shuttle , the query parsing fails . However , the graph displays when the shuttle get populated with selected values . Is there a way to get around that .
    Thanks for your help .

    There is nothing wrong with your code, so I'd look elsewhere for the problem. Is this a direct copy of what you have on your page?
    :P1_COMBO1 in ('Option 1', 'Option 2')
    And
    :P1_COMBO2 = 'Option Combo 2'And the page item values are exactly as you have in the quoted strings? You might run the page in debug and confirm the page item values are exact.
    Edited by: Bob37 on Dec 6, 2011 2:18 PM

  • Show/hide HTML Region with click on a Button

    Hi,
    is it possible to Show or hide a HTML Region if o want to use a Button for hide or show the region?
    Can  everyone explain it to me?
    Thx for all
    René

    Hi,
    htmlRegionId can something like dataDiv
    In Header section of the region 
    <div id="htmlRegionId">
    In Footer section of the region
    </div>
    on Page level javascript
    <script type="text/javascript">
    function showHideRegion(){
         $("#htmlRegionId").toggle();
    </script>
    On Button Click Action redirect to URL and enter the following text
    javascript: showHideRegion();

Maybe you are looking for