How to disable buttons when another button is clicked

I have an application with 5 buttons that each play or pause
different movieclips. How can I prevent other buttons from playing
different movieclips when a movieclip is already playing.

I looked in the help and found an example actionscript. I
changed the button instance names to the button names in my app. I
put the actionscript on frame 1 that holds the movieclip being
played. Here it is
mycase3_btn = true;
mycase1_btn = false;
mycase2_btn = false;
//button code
// the following function will not get called
// because myBtn2_btn.enabled was set to false
mycase1_btn.onRelease = function() {
trace( "you clicked : " + this._name );
mycase2_btn.onRelease = function() {
trace( "you clicked : " + this._name );
mycase3_btn.onRelease = function() {
trace( "you clicked : " + this._name );
It doesn't disable the other 2 buttons. As may be obvious I
am new to all but the simplest actionscripts. What am I doing
wrong?
thank you for your time!

Similar Messages

  • How to disable button once click

    Hi,
      I have made a dialog program, in which, on the screen I have to push button, PB1 and PB2, my requirement is Once the user click on PB1 then that button I want to disable (inactive mode) or invisible till user click on PB2,  I have written the code as below but it is not working,
       module USER_COMMAND_0100 input.
        OK_CODE  = SY-UCOMM.
      CASE OK_CODE.
      WHEN 'PB2'.
        CLEAR : VBELN,WA_VBAP,IT_VBAP[],WA_VBAP_RFC,IT_VBAP_RFC,MESSAGE.
      WHEN 'PB1'.
       PERFORM GET_SO_LINE.
      ENDCASE.
    endmodule.                 " USER_COMMAND_0100  INPUT
    now when the OK_CODE is PB1  in that I have below code
       LOOP AT SCREEN.
        IF SCREEN-NAME       = 'PB1'.
           SCREEN-ACTIVE     = '0'.
           SCREEN-INVISIBLE  = '1'.
           MODIFY SCREEN.
        ENDIF.
         IF SCREEN-NAME       = 'VBELN'.
           SCREEN-ACTIVE     = '0'.
           SCREEN-INPUT      = '0'.
    *       SCREEN-INVISIBLE  = '1'.
           MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    but with this code it is not working.
    regards,
    zafar

    Hi,
    Declare a global variable that will serve as your flag.
    * data declaration..
    data: g_flag type c.
    * PAI
    module USER_COMMAND_0100 input.
        OK_CODE  = SY-UCOMM.
      CASE OK_CODE.
      WHEN 'PB1'.
              g_flag = 'X'. " set flag
      WHEN 'PB2'.
              g_flag = space. " reset flag
      ENDCASE.
    endmodule.
    * PBO
    LOOP AT SCREEN.
        IF SCREEN-NAME       = 'PB1'.
               If g_flag = 'X'. " PB1 was clicked
                 SCREEN-INPUT  = '0'
               else.
                 SCREEN-INPUT  = '1'
               endif..
           MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    -Jake

  • How to disable buttons in HTML?

    How to disable buttons in HTML?
    For example.. In my application when one button is clicked then it should disable some buttons and should be able to perform any other actions...

    Correct me if i am wrong.. i think we should not use '[' but '('
    document.getElementById('buttonname').disabled = true;

  • How to deactivate button after click??

    hello experts,
    how to deactivate button after click???
    there are 2 buttons
    Download | Add
    now if i click on download the download button should get deactive.....n  Add button position should not change..
    thanks in advance.

    Hi,
    1. Declare an internal table of type sy-ucomm. i.e.
    DATA : it_fcode TYPE TABLE OF sy-ucomm.
    2. Append Function Codes of the options in the Menu that you want to deactivate to the above declared internal table. For e.g. If DWL & ADD are the Function Codes of options that need to be deactivated then,
    APPEND 'DWL' TO it_fcode.
    APPEND 'ADD' TO it_fcode.
    3. Set PF_-Status as shown below.
    SET PF-STATUS 'status_name' EXCLUDING it_fcode.
    4. Now, the options in the menu bar with Function Codes 'DWL' & 'ADD' will be deactivated.
    aRs
    pOINTS ARE ALWAYS WELCOME

  • How to: disable buttons in standard forms

    Hi all,
    does anybody know how to disable session date button from standard forms?
    I cannot find in forms (through Form Builder) the right data block / canvas where this button is.
    Thanks all.
    Jacopo

    I'm not aware of any "session date button". A button on a form can be disabled using the set_item_property.
    Use the layout editor and double-click the button. It will tell you what button it is. The button will also be highlighted in the Object Navigator window.
    Message was edited by:
    Mark Roberts

  • How to disable button once user click once in an Applet?

    Hi,
    We are facing an issue with Applet level button.
    User is clicking multiple times on button and we don't want to allow users to click multiple times.
    So that How to disable the button after clicking once.
    Thanks,
    Sandep.

    Since you don't saying what version of Siebel you are on, I assume
    8.0 or later.
    You can use this on if you applet class is CSSFrame, CSSFrameList, or any of their subclasses.
    On the applet add, Applet User Prop:
    Name
    CanInvokeMethod: InvokeWF
    Value
    [DisableButton]='N' OR [DisableButton] IS NULL
    More info here:
    http://download.oracle.com/docs/cd/B40099_02/books/ToolsDevRef/ToolsDevRef_UserProps6.html
    On the applet add, Applet User Prop:
    Name
    Named Method
    Value
    "InvokeWF", "SET", "DisableButton", "Y"
    More info here:
    http://download.oracle.com/docs/cd/B40099_02/books/ToolsDevRef/ToolsDevRef_UserProps21.html
    Make sure the field DisableButton is active (Use Force Active on BC if the field isn't active)
    Make sure the field has "Immediate Post Changes" set to true on the BC.
    Axel
    PS: Don't use scripts if you can solve the problem with user props, WF, .... Scripting should
    be you last resort.

  • How to disable Buttons based on condition.

    Hi
    Need your help to disable button based on condition.
    Please refer the application:
    http://apex.oracle.com/pls/otn/f?p=34797:5:110582943383419::NO:::
    login credentials:
    workspace: vsanthanam
    user: vijay
    pswd: apex_demo
    In the above application, i have 2 buttons in page 5, (Report1 and Report2)
    Where i have to disable button based on the following conditon:
    i) USER whoever has Admin value 'Y' in my table can access the button.
    for this i've written a Button Condition : Type (EXISTS)
    select 1 from apex_extra_values where rtrim(lower(empname)) like decode((select Admin from apex_extra_values
    where rtrim(lower(empname))=rtrim(lower(V('APP_USER')))),'Y',rtrim(lower(V('APP_USER'))))
    note: i have empname same as my APEx user name. with Admin access 'Y'.
    By using this code i can able to hide the button for users who has no Admin access.
    But my requirement is : i have to show the button even if the user is not Admin, but to grey out (disable the button - no action)
    I tried using javascript function:
    function disableButton(pThis)
    pThis.disabled=true;
    But either of this (exists condtion or JAvascript function) works in my case and not both.
    Any pointer on this would be highlt appreciated.
    Thanks
    Vijay

    Couple of things:
    1. I would never use v('APP_ITEM') but :APP_ITEM - it is faster and there is no need to use this function within an application
    2. The way you are doing this check is not the best approach. You should create an authorization schema and run this once per session. Whatever this authorization is returning as a result you can check using the following Function returning boolean:
    IF apex_util.public_check_authorization ('MY_AUTH') THEN RETURN TRUE; ELSE RETURN FALSE; END IF;
    See this example on authorization issues:
    http://apex.oracle.com/pls/otn/f?p=31517:148
    3. As far as disabling a button is concerned I think I explained the options. I also have an example on that here:
    http://apex.oracle.com/pls/otn/f?p=31517:143
    whereby it is not disabling but hiding a button.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to disable buttons in ADF form so it can be reused

    I would like to reuse the same Human Task ADF form for multiple User Activities in the same BPM 11g process definition.  The only difference between the User Activities in the process are the outcomes (buttons) allowed.  For example, in some User Activities, the outcomes allowed are APPROVE and REJECT.  In others, it might be APPROVE, REJECT, and REPROCESS.  Is it possible to hide, or disable, buttons in a Human Task ADF form based on some settings done in the User Activity, or something passed to the Human Task ADF form?
    I started digging, and I see in the jspx file for the form, there is an attribute named "visible" that is set as follows on the button:
    <af:commandToolbarButton actionListener="#{invokeActionBean.setOperation}"
                           text="#{wf:getResourceValue('APPROVE', 'bindings.customActions')}"
                           disabled="#{!bindings.APPROVE.enabled}"
                           action="#{invokeActionBean.invokeOperation}"
                           partialSubmit="false"
                           visible="#{wf:isCustomActionAvailable('APPROVE', 'bindings.customActions')}"
                           id="ctb2">
        <f:attribute name="DC_OPERATION_BINDING" value="bindings.APPROVE"/>
    </af:commandToolbarButton>
    So if I can figure out a way to pass flags to the form, and then use those in the setting of the "visible" flag, would that do it?  Is there a better method?
    Thanks,
    Joe A.

    Set the binding to the button in the managed bean based on the input form parameter. For example if parameter value is paramValue1
    <task-flow-definition id="sourceTaskflow">
      <input-parameter-definition>
          <name>inputParameter1</name>
          <value>#{pageFlowScope.paramValue1}</value>
          <class>java.lang.String</class>
       </input-parameter-definition>
    </task-flow-definition>
    Set binding to not enabled.
    #{!bindings.CreateInsert.enabled}
    Some relevant references
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/oct2010-otn-harvest-183714.pdf
    Using Parameters in Task Flows

  • How to disable trackpad when mouse attached?

    I used to be able to disable the trackpad when i was using a mouse by going into trackpad system prefs. With the new version of trackpad, I can't seem to do that. Is there a way to disable the trackpad when my mouse is attached?

    I would like to be able to disable the trackpad too, as I was before 10.5.06. At present I get an otherwise useful instruction video when I hit 'trackpad' in 'system preferences'. Since I have seen the video before and know by now what the trackpad can do, I really miss the earlier available option of disabling it when I don't need it.
    Any advice on how to solve this issue would be appreciated.
    DB.

  • How to disable fade when mute/unmite "Line In" on Audigy

    Hello !
    My works require to listen many audio sources - that is way I get Audigy 2. When I mute (or unmite) Line In (and some other inputs) Audigy 2 make smoothness increase/decrease audio level. It is fine for many users, but I do NOT want it. I need imediately actions.
    How can I remove this ? Maybe registry setting ? Anyhelp will be OK.

    I have same problem. Sound card automatically makes fade-in during recording from line-in. So I can't record my guitar. Each recorded sound has increased volume in the beginning. How to disable such feature? Does anybody know?

  • How to deactivate buttons after click??

    Hi experts,
    i want to deactivate two buttons on click of one.
    Add
    Delete
    on click of Add.....it should deactivate Add and Delete Button....
    how can i do that????

    *****define following internal table
    Internal table used to exclude keys from status bar
    DATA: BEGIN OF IT_EXTAB100 OCCURS 10,    "Controls Functions for screen-no (e.g.0100)
            CODE(4) TYPE C,
          END OF IT_EXTAB100.
      Excluding keys before display of status bar
        CLEAR IT_EXTAB100. REFRESH IT_EXTAB100.
        MOVE: 'ADDS' TO IT_EXTAB100-CODE.
        APPEND IT_EXTAB100.
        MOVE: 'DELT' TO IT_EXTAB100-CODE.
        APPEND IT_EXTAB100.
        SET PF-STATUS 'xxxx' EXCLUDING IT_EXTAB100.
    XXXX is the pf-status defined

  • How to disable alarms when iCal is off

    Hi all,
    I might be missing something here, but I believe there used to be two settings to turn off alarms in 10.4 and 10.5:
    1) disable all alarms
    2) disable alarms when iCal is off
    Did option 2) disappear in 10.6? I am really missing this feature.
    Thanks for your insights

    I too would like to know a way around this problem. In the prior version of iCal, you could enable alarms only when iCal was running. I routinely sync three computers, sometimes hours to days apart. So unless I remember to turn alarms off prior to shutting down the machines, the alarms are not properly updated upon syncing when an idle machine is turned back on.
    Hope this makes sense. Either way, it would have been better if Apple had not gotten rid of this feature in the new iCal.
    Eddie

  • How to disable button immediately after pressing

    Hi
    In my save button there is a code for insertion of data in database.
    In my application when i press save button first time the IE progress bar shows progress but if suppose the user presses the button again
    then the data wil get saved twice.
    Now if i put a code in button action method to disable it will function only when it will be called in between user can press the button.
    How to arrest users for clicking???
    If you have any idea please help me out.

    How about setting the button to:
    yourButton.setVisible(false);
    So when your button action is called, this is the first action that is called before your code insertion lines so the button will disappear when clicked e.g.
    public String yourButton_action {
    yourButton.setVisible(false);
    ....code insert data......
    return null;
    Or set the "return null" to return a new page.
    Of course, if you wanted it to be visible again after the insertion then you would set
    yourButton.setVisible(true);
    Alternatively, you could setup a counter that would check the number of times the button was pressed and make the button visible (or invisible!) when conditions are met.

  • How to Disable Buttons Dependng upon a WLS group

    Hi guys,
    I have been working on a portal framework application in which i want to enable/disable certain command buttons on a page depending upon the Group in WLS to which the user belong too.
    The scenario is like this:-
    i am having a user named Mark in WLS which belong to three groups in WLS - author, hr and rnd.
    and there is a Command Button called Upload. So this Upload button should be enabled only if at least one of the group user belong to is "author".
    If there is another user which belong to groups hr, rnd and approve, in that case the button should be disabled.
    Any help Please
    Thanks

    In such a case you could simply create a method in a managed bean to execute the logic.
    Something like this should work:
    public boolean getUserIsOnlyAuthor(){
            ADFContext context = ADFContext.getCurrent();
            boolean isAuthor = context.getSecurityContext().isUserInRole("author");
            boolean isHr = context.getSecurityContext().isUserInRole("hr");
            boolean isRnD = context.getSecurityContext().isUserInRole("rnd");
           if(isAuthor && !isHr && !isRnd)
                return true;
           else
                return false;
    }And on your page:
    <af commandButton rendered="#{yourBean.userIsOnlyAuthor}" text="Upload"/>After rereading your question I am a little bit confused :)
    Do you mean that the button only should be enabled when the user belongs to author and only author so if a user belongs to auther + hr, the button should be disabled?
    In the code example above you will have following scenario:
    User belongs to only author: button will be enabled
    User belongs to author + hr: button will be disabled
    User beloings to author + rnd: button will be disabled
    Is this correct or should the button always be displayed when the user belongs to author, no matter what other groups he has?
    If this is the case, it's even more simple. You don't need a managed bean and you can do just this:
    <af:commandButton rendered="#{securityContext.userInRole['author']}" text="Upload"/>

  • How to disable buttons in Search help screen ?

    Hi All,
    How do we disable Print button in customer search help ?
    We want that nobody should be able to take a printout of Customers from Search help result. Hence we want to disable the print button which comes in Search help.
    Any idea how do we go about it ?
    Regards,
    Ashish

    Hi there,
    you should be able to do that with the search help exit. Try replacing the PF-STATUS for instance. I am not sure if this works though!
    For instance:
    IF call_control-step = 'PRESEL'.
    SET PF_STATUS 'ZZ' OF PROGRAM 'ZZZ'
    ENDIF.
    Or you might call the existing PF-STATUS and use EXCLUDING.
    Roy

Maybe you are looking for

  • Issue in Creation of XML file from ABAP data

    Hi, I need to create a XML file, but am not facing some issues in creation of XML file, the in the required format. The required format is -<Header1 1st field= u201CValueu201D 2nd field= u201CValueu201D>    - <Header2 1st field= u201CValueu201D 2nd f

  • How to add a new field in migo transaction (header level)

    hi guru's can you please tell me how to add a field in migo transaction? i want to add a field in header data and that too under "general" tab. i dont have data regarding that field. and when we enter a value for that field in migo, it has to take .

  • Acrobat Pro 9 with comments crashes

    I'm having problems with consistant crashes from acrobat files marked with comments. They are PDF files that have been sent to several users and commented on. Crashes when InDesign CS4 (6.0.2) is open and go back and forth between InDesign and Acroba

  • Converting Word Templates from 2003 to 2013 Version

    Hello.  I work at a school environment and most of our secretaries had been running Office 2003.  They have a lot of Word templates.  Recently, as we have decided to upgrade Office to 2013, we have the problem of hundreds of old templates that need t

  • SpaceX seeking full-time LabVIEW programmer to join Texas team!

    Please email [email protected] for more info. General Description below... The Company SpaceX is a US based space technology company founded by its residing CEO and CTO, Elon Musk, the former co-founder of PayPal. The company's goal is to re