One button, two actions

I would like to be able to click on a button one time and
have it open and play a movie. This movie would be overlayed on the
layer that the button is on with the button still visible. Then
after that movie has played, I would like to click on the same
button again to close the movie so that it no longer appears. Can
anyone offer any help on how to do that?

:

Similar Messages

  • One Event two actions

    Hi,
    I would like to know which JavaScript-Code has to be placed where in my document to achieve the following:
    When the visitor moves his mouse over (event onmouseover) one of six possible buttons 2 actions should be execited:(defined in container navBar) another image has to be shown for the related button
    1. The image for the related button should be changed
    2. A particluar swf should start playing  automatically (without the need for the visitor to trigger playing by clicking a button or anything else)  in  a particular div (swfBox).
    The swap image action works fine. The necessary JavaScript functions (MM_preloadImages, MM_swapImgRestore, MM_findObj, MM_swapImage) have been generated by dreamweaver CS4..
    I'd really would be glad if some crack could help me solving this problem. Maybe SWFObject 2.x is a keyword?
    Thank you very much in advance

    The swap image behavior is achieved using css:
    Normal state
    a, a:link {
         background-image: url(<link to image here>);
    Hover state
    a:hover {
         background-image: url(<link to image here>);
    You can also place the behavior in these items, But I would not recommend having sound playing without giving your users the option to turn it on or off.
    PZ

  • Accordian like functionality - one button, two possiblities

    i'd like to create a single movieclip that responds to the same input (mouse click) in two different ways: if playhead is on frame labeled "one" go to frame labeled "two", otherwise if playhead is on frame labeled "two" go to frame labeled "one". i've tried if/else and switch statements with no success - what's a good approach to doing this?
    thanks in advance!

    The approach you took will work.  Be sure to use == for the conditional and to use quotes for the labels when comparing the currentLabel to the string.

  • Can we perform two actions with one button with two clicks one after other?

    Sir,
    can we perform two actions with one button with two clicks one after other?
    I want that when I click an Add Button first time it add data to the database and when I click again this button it clear the form data to empty fields.
    Regards
    Tanvir

    In code it should be easy.
    The following code adds a button called butman with a text "ADD".
    It then registers a listener that will be called if the button is clicked.
    This listener then calls the runAddData method if you clicked on butman while it contained the "ADD" text and it will call the runClearData method otherwise.
    Therefore it will swap the button's functionality between ADD and CLEAR on every click.
    final Button butman = new Button("ADD");
    butman.setOnAction(new EventHandler<ActionEvent>() {
              @Override
              public void handle(ActionEvent t) {
                        if (butman.getText().equals("ADD")) {
                                  butman.setText("CLEAR");
                                  runAddData();
                        } else {
                                  butman.setText("ADD");
                                  runClearData();
                        } // END IF-THEN
              }});I hope this is what you wanted.
    Some extra food for thought.
    You might want to run the ADD and CLEAR methods in their own threads so that it can run in the back ground, without slowing down your user interface.
    I also like to rather reuse one button for multiple functionality in stead of making an application with hundreds of nodes only used rarely with masses of code to show and hide them if needed.

  • Two actions on one button click

    Hi All,
    I have one button that I want to do two things. When I test
    the movie I have to click on the button twice to make both actions
    happen. Is my machine on drugs or is there something I'm missing?
    Here's the AS I'm using on the button.
    on (release) {
    gotoandStop(2)
    on (release) {
    holder_mc.loadMovie("my_movie.swf",1);
    Thanks for any help,
    Mike

    on (release) {
    gotoandStop(2)
    holder_mc.loadMovie("my_movie.swf",1);
    }

  • Export two TXT files with one button

    Hi,
    I'm using Application Express 2.0, i'm developing aplication in which users import few different excel spreadsheets and after that they export date in specified TXT format.
    I'w like to create functionality to export two and more files in CSV (TXT) format with one button and one click only in defined folder. It's necessary to simplify work of my endusers becose they have to generate ten or more files.
    Is it possible create functionality which generate files in defined folder without any addtional user's action?
    Best,
    Kiril

    Create a procedure to output the files, use the oracle directory object to define your output path.
    create or replace directory wayne as '/csv';
    use google or metalink to get examples. This way you can output as many files as you want, my personal opinion would be to create a dynamic report your users could run on demand.

  • How can you make one button preform different actions in Xcode?

    How can you make one button "preform a click" and "orderfront"? Is that possible? Because what I am doing is making a welcome window to my application for Mac OS X 10.6, and I have two buttons in that window, one says "Connect" which connects a a WebView to a url and the other button opens up the main window. So how can I a make a button do multiple things at once??

    Ah - If you are just using bindings between various objects from Interface Builder, you can reduce your application code a bit (sometimes quite a bit), but there is only so far you can go. Typically variables and routines are defined in your application that Interface Builder hooks into, so that your application code (usually Objective-C, but can be others) can use these variables and routines to determine what is happening in the user interface.
    I'm not sure how up-to-date the project code is (or what programming code you are familiar with), but you can take a look at Apple's Cocoa Application Tutorial to see what is (usually) involved in creating an application.

  • How do I link one button to two slices?

    Hello,
    I need some help please. How do I link one button to two
    slices? or combine two slices to make one slice, or make a true
    polygon shape out of the slices, it will make the polygon shape but
    it leaves the the red guide lines and I cant work under that
    slice... if you understand. Will someone please help. Thank you so
    much.

    heathrowe wrote:
    > Did you Hide Slices?
    >
    > Select the Pointer Tool and click your Object? It should
    get selected.
    >
    > What happens when you mouse over the 'star' object? Do
    you get the 'object
    > selection' bounding area appear? Bounding area should
    appear red when you mouse
    > over it? Yes/No!
    >
    > Also, go to your Layer Panel and make sure that your
    object/Layer is not
    > 'locked'. Look for little 'padlock' icons next to the
    Layers. If you see it,
    > click it, to toggle it to 'off'.
    >
    > h
    >
    Also make sure you are not in PREVIEW mode in the document
    window.
    Jim Babbage - .:Community MX:. & .:Adobe Community
    Expert:.
    http://www.communityMX.com/
    CommunityMX - Free Resources:
    http://www.communitymx.com/free.cfm
    .:Adobe Community Expert for Fireworks:.
    Adobe Community Expert
    http://tinyurl.com/2a7dyp
    See my work on Flickr
    http://www.flickr.com/photos/jim_babbage/

  • How can I get one button to perform two functions?

    here's what I want:
    have one button with a + that opens a pop up using a MSO and then turn that button to a X to close the pop up changing states on the MSO

    1. Create a graphic with plus sign and make it a button
    2. Group it with an empty frame of desired size
    3. Create a graphic with x sign and make it a button
    4. Group it with a frame with a pop up
    5. Create an MSO of the two groups
    6. Assign "goto next state"  to each button

  • Use two actions in one form

    I want to use two actions in one form in struts,and without using javascript,is it possible?

    I want to use two submit:
    one is for adding message;
    another is for editing message.
    they must be in one form,but i dont know how to use
    two actions in one formHi,
    Hope this helps.
    cheers,
    jeric
    <html>
    <head>
    <title>decision</title>
    </head>
    <body>
    <br><br><br>
    <center><h3><u>Two submits, one form</u></h3></center>
    <%
    String userChoice = request.getParameter("decision");
    if( userChoice != null && userChoice.equals("add") == true)
        // forward to addMessage.jsp, for example, or whatever
    else
    if( userChoice != null && userChoice.equals("edit") == true)
         // forward to EditMessage.jsp, for example, or whatever
    out.println( "<br><center> the value of userChoice after selection is ... " + userChoice + "</center><br>");
    %>
    <center>
    <form method="post" action ="decision.jsp"> <!-- name of this page -->
        <table width = "50%" align="center">
             <tr><td width = "100%"><hr color ="red" ></td></tr>
              <tr><td height = "10"></td></tr>
             <tr><td align = "center">Do you want to <b>add</b> a message or <b>edit</b> a message?</td></tr>
             <tr><td height = "10"></td></tr>
             <tr><td align = "center">
                  <input name = "decision" type = "radio"  value = add checked>?add a message??
                  <input name = "decision" type = "radio" value = edit>?edit a message?
             </td></tr>
        </table>
        <br>
        <input type="submit"  value = " make your selection " >
    </form>
    <hr color ="red" width = "50%">
    </center>
    </body>
    </html>

  • Welcome page, one start button, two outcomes

    hi,
    I have a welcome page with a Start button which is the first page after authentication. If the user is logged in as roleA then next page after start button is pressed should be pageA and if user is logged in as roleB then next page should be pageB. User data are bound to userInfo managed bean in session scope which has methods isRoleA(), isRoleB() and getUserRole(). How can I bind this start button to achieve this (if possible with code sample)

    Can't you just code the method for the button to ask for the value of the role and based on the result return one of two navigation cases that you use in your faces-config.xml flow?

  • Is it possible to add a shortcut to one or two very select websites to the navigational toolbar for convenient, one-click entry (i.e., which toolbar currently has buttons for viewing bookmarks and browsing history)?

    I would just like to be able to click once to get to one or two very important websites, just as I can now click once to show my viewing history (or scrapbook) in the sidebar.

    That's what the bookmarks toolbar is for.
    But putting single bookmarks there can fill it up quickly. Rather than a keyboard shortcut you can create a '''keyword shortcut''' for the bookmark, and that bookmark can be anywhere and out of sight. I keep all (most) of my keyword bookmarks in one folder on my bookmarks toolbar with the name beginning with the keyword. Here is an example, next door neighbor liked it for their netbook used at TV
    '''Name:''' tv: TV Listings - Find Local TV Shows and Movie Schedules - Listings Grid | TVGuide.com
    '''Location:''' http://www.tvguide.com/Listings/
    '''Keyword:''' tv:
    '''Description:''' PPP (User must be custom TV choices at Yahoo/TVGuide), start with zipcode (uncheck timezone), uses cookies, do for not logged in and for logged in. Must be logged in to pick your favorite channels to reduce list size.
    '''Firefox Keyword Shortcuts'''
    *http://dmcritchie.mvps.org/firefox/kws.htm
    Bookmarks toolbar styling'''
    * Stylish :: Add-ons for Firefox<br>https://addons.mozilla.org/en-US/firefox/addon/stylish/
    * '''Bookmarks Toolbar Fx4 Blue/Folders, Red/Bookmarks''' - Themes and Skins for Browser - userstyles.org<br>http://userstyles.org/styles/46947/bookmarks-toolbar-fx4-blue-folders-red-bookmarks

  • Play two MCs with one button

    Hi,
    I'm trying to make the main timeline go to frame 2, and a separate MC go to frame 2 by clicking one button.
    Here's what I'm trying ...
    on (release) {
        _root.gotoAndPlay(2);
        snap1.gotoandplay(2);
    When the button is clicked, the main timeline goes to frame 2, but the MC (instance name) snap1, doesn't play. I'm using AS2.

    actionscript is case-sensitive.  use:
    on (release) {
        _root.gotoAndPlay(2);
        snap1.gotoAndplay(2);

  • How to use a back button in action pages?

    Hi all,
    I have created a user login page,home page and user profile page.
    If the user provide correct username and password in the login page he will be taken to home page.
    In the home page he will be having his username and a link to view his profile.
    When the user click on the link "My Profile(user profile)" he wil be taken to that page.
    In my profile page the user can edit only his firstname,lastname and password .
    On the user profile page i have placed a Back Button(using javascript: on onclick event i have used history.back()) to go back to home page after editing his profile.
    If the user edit his profile for n-number of times then atlast if he wants to go back to home page-then he wil cilck the back button.
    Now the problem occurs like the back button not going to home page and it simply going back with the edited history.
    How to use a back button in action pages; without repeating the actions done on the page; how to redirect to the users home page?
    I simply used the hyperlink in userprofile page to go to home page but when i click onit it is displaying blank home page.
    I'm using hibernate orm mapping; cflogin and cflogout tags.
    Any help appreciated,
    Chandru P

    chandrup wrote:
    Hi Dan,
    Dan Bracuk wrote:
    Use an anchor tag.
    I simply used the hyperlink(<a href="home.cfm">Home</a>) in userprofile page to go to home page but when i click onit it is displaying blank home page.
    I can see your problem. You may use javascript:history.go(-1), javascript:history.go(-2), ..., to go back one page, two pages, and so on. But how does one go back an arbitrary n pages? The link href="home.cfm" isn't a good solution for the browser. It makes a new call to the server which, as you may have discovered, can overwrite all the changes made at the browser. 
    You should use the Javascript variable history.length. If you open n links in succession, starting from page0.cfm, then the browser holds the value of history.length as n. So, experiment with something like
    <a href="javascript:history.go(-history.length)">Go home</a>
    or
    <a href="javascript:history.go(-history.length+1)">Go home</a>

  • One button to start/stop mp3 in pdf, but playback toolbar getting in way

    Hi, I want to make a button to play back and stop an mp3 file in an exported pdf. I was able to make a button, then assign two actions to it, one to play the mp3 on mouse click, and the other to stop the mp3 on mouseover. the button looks fine in the pdf, there's just one problem. Indesign automatically puts a playback toolbar in the exported pdf where the mp3 file is located; even if i choose 'none' for poster, the playback bar appears (it's tiny and unusable); i thought it would be simple to have a button start and stop an mp3 but this is proving tedious. Any simple solution would be appreciated. I simply want to play/stop an mp3 file with one button in an exported pdf.

    I think I know what you're talking about, but it's not InDesign. You're probably playing the MP3 in Acrobat or Reader, and those PDF readers don't make the MP3 file totally invisible.
    I've done quite a bit of experimenting and this is the best I can come with: Give the MP3 file no poster image in InDesign, then export as Interactive PDF. After you create the PDF file, you need to select the invisible sound file with the Select Object tool in Acrobat Pro as shown below:
    Double-click the sound file to view its properties. Set the file to play in a floating window. Then edit the dimensions to be 1 pixel by 1 pixel:
    When the sound file is played it appears as a tiny black dot on the gray background outside the PDF page in Acrobat or Reader.

Maybe you are looking for