Refer to nested button from DocumentClass

I have navbar_mc on the main stage. Within navbar_mc is button1_btn
How can i reference this button with an eventListener from the DocumentClass?
I have the following in the document class:
this.navbar.button1_btn.addEventListener(MouseEvent.CLICK, clickHandler);
but get the following error when i compile: TypeError: Error #1009: Cannot access a property or method of a null object reference.
also, there are many buttons within navbar_mc, how can i make an elegant switch statement function (in the DocumetnClass) for all of them. To reiterate, with an eventListener for each button, how do i reference the correct one from a single function, in this case clickHandler?
Thanks in advance!!!

Are you trying to add the listener before the object is on stage - ie is the clip on stage at frame 1? If the clip is on frame 1, then you wouldn't get that error from the event listener anyway...  You can use the currentTarget property of the event in your click handler to get the clip/button that was clicked.

Similar Messages

  • Remove EDIT button from FPM ToolBar

    Hi All,
    I am new to FPM, and I am working on SRM 7.0. In the Monitor Shopping cart WD application, after search event, a list of Shopping Carts are displayed, when we click on one of the SC number, the SC screen opens as a new Pop-up.
    Here we have an EDIT button, and we need to remove this button from this screen.
    Technical Details(EDIT button):
    Application: /SAPSRM/WDA_L_FPM_OIF
    Web Dynpro Component: FPM_OIF_COMPONENT
    Window Information: FPM_WINDOW
    View Information: CNR_VIEW
    Configuration ID: ZSAPSRM_WDCC_FPM_OIF_SC_PROFNL
    Technical Details(SC screen):
    Application: /SAPSRM/WDA_L_FPM_OIF
    Web Dynpro Component: /SAPSRM/WDC_UI_SC_DOFC_HD
    Window Information: IV_L_FPC_CA_HDR
    View Information: V_SC_BOFC_HD
    Configuration ID: /SAPSRM/WDCC_FPM_SC_HD_PR
    Appreciate any help on this.
    Thanks,
    Prabhakaran

    Hi Prabhakaran
    You will need remove the static usage of config id ZSAPSRM_WDCC_FPM_OIF_SC_PROFNL and make use of dynamic component configuration depending on the particular scenario.
    Create two configuration id's ZSAPSRM_WDCC_FPM_OIF_SC_PROFNL1 and ZSAPSRM_WDCC_FPM_OIF_SC_PROFNL2. Set visible property of Edit button as visible in the first config ID and none in the second.
    Now assign this config ID dynamically depending on the scenario. If scenario is Monitor SC, then assign config ID ZSAPSRM_WDCC_FPM_OIF_SC_PROFNL2, else assign config ID  ZSAPSRM_WDCC_FPM_OIF_SC_PROFNL1.
    Please refer the below document for usage of dynamic component configuration.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/70337875-167f-2e10-daa7-a1c69d55ee95
    Hope this helps.
    Regards
    Lorraine

  • Hide 'Change Layout' button from alv toolbar

    Hello All,
    can anyone let me know how can we hide the change layout button or exclude the change layout button from the ALV tool bar using OOPS . what's the fcode for it.
    Thank You !
    Ravi

    Hi Ravi,
    Please refer to this [Program|http://www.saptechies.com/disable-some-standard-buttons-from-alv-display/].
    Hope this helps.
    Regards,
    Chandravadan

  • Nested button in mc

    Hi -
    I have an FLA with movie clips that I'm using as buttons
    (button1, button2, etc). Inside "button4" are layers with button
    instances (not mc's as buttons) that make up a submenu (sub4_1,
    sub4_2, etc). The buttons have different looks for Up, Over, etc.
    Each of the buttons will have getURL's to load html
    pages...eventually.
    The problem is - I can't "reach" these sub-buttons. When I
    test the movie I don't even get the different btn states. I'll get
    the right reaction if I put the sub-button on the main timeline but
    not when it's nested in the button4 timeline. I've tried every
    addressing scheme I could find but still not working.
    Please - what am I doing wrong?

    Aaaargh - indeed I do!
    I've been struggling with these buttons from the outset and
    attached is the code that solved the first issue (courtesy kglad).
    So - what I'm learning is, since button4's onRollover has
    already been defined - it's not getting this other message and by
    extension nothing within it, like sub4_4, can be addressed. And
    that's why sub4_4 is not defined - even tho' it is really there.
    BTW - that other code you asked me to try (trace($k);)
    returned "instance7".
    So - can anything be done?
    I appreciate your help.
    JL

  • Nested Buttons

    Hi guys,
    i am a fresher in actionscript... i have a problem with my
    flash file
    i have a problem with a nested button... i have a main button
    But_main and which has 2 buttons in it.
    the problem i am facing is:
    before telling u the problem i will give u a brief about my
    flash file....
    - my file has a button and the button by default has a mouse
    over effect where it scales up but 25%.
    - It also has 2 text nested in it which is also are buttons.
    my problem:
    when i am on the main button it scales up but once it comes
    across the text button it scales down automatically.
    i knw y it happens.... thats because it goes over another
    button so its out off the main button and on the text button.
    but can any one tell me the solution how can both my button
    work simultaniosly
    i hope i am abel to explain my problem properly...
    pls help...

    Takeing a guess here but i think i know what hes trying to
    say....
    he has a button say called Dave_BUT in this button he has a
    text like a label. now i could be wrong but what i think he is
    saying is that when he trys to scale the buttons text from 1 point
    to another it goes wrong as it pases over another button..
    Answer i belive is really basic flash Treat the button as a
    scene in it self create symbol "button" then you got ya 3 states
    and your 4th being hit area. Select which state you wish to change
    ie if its ya over state then use the 1st frame and then insert key
    frame. after inserting youre key frame you should be able to insert
    a simbol, say youre text... then open that as a symbol and if i got
    this right you shoudl be able to insert frames thus creating an
    animation inside the buttons state...once you have done that youl
    end up with Dave_BUT that you can drag n drop into youre
    scene....mental note here you should also be able to insert action
    script for the button also....in case this sounds like gobledy
    ****** check this tutorial out which i came across explains it
    better than i
    ps the info im trying to forward to you is at the end of this
    tutorial btu to be honest the guy rocks so watch whole movie he
    makes it so simple...
    http://tutorials.learnflash.com/videos/freebeginCreatingButtons.html
    hope it helps

  • Loading movie through button from child clip

    I have a portfolio page with several trailer thumbnails (a portfolio list). If you click on each, the page changes and you see the trailer in a video player, plus more info about the film. I used two frames in the timeline: the first frame has the clip with the thumbnails (port_list). The second frame has a movie clip container and the video player. The idea is that pressing the respective button from port_list will load the details of that movie and the movie into the video player. I am using this script:
    ZSQ_but.onRelease = function (){
    _parent.gotoAndStop("por_details");
    _parent.myplayer.contentPath = "videos/ZSQ.flv";
    _parent.por_details_cont.attachMovie("ZSQ_details","ZSQ_de tails",0);
    Even though the script looks alright (and works alright if at the root level), it will not work from the child clip. What am I doing wrong?? Please see the attached fla file. Somone hinted that the AS for loading the player and the container is not on the frame where the player and the container are. If that is the reason, how can I address this issue?

    if 'movie' is just a layer on the timeline you do not need to
    reference it in your path.
    Just use _root.chapters.gotoAndPlay(2);
    paths only need to reference nested levels of
    movieclips

  • Disable some standard buttons from ALV display

    Hello All,
    I am creating an ALV display using object oriented approach. I know how to exclude some of the standard function buttons from the list.
    But suppose instead of deleting, the requirement is to disable (I mean grayed out)
    some standard buttons from ALV. Could anyone please comment on how to do this.
    Many thanks in advance.
    Regards
    Indrajit

    Hello Indrajit
    The following sample reports shows how to disable toolbar functions. Run the report and the push the ENTER button repeatedly.
    *& Report  ZUS_SDN_ALV_EVT_TOOLBAR
    *& This sample report explains the handling of event TOOLBAR in order
    *% to activate or inactive buttons of the ALV toolbar.
    *& Based on: BCALV_GRID_DEMO
    *& Procedure: Copy BCALV_GRID_DEMO and replace entire coding  OR
                copy screen '0100' and GUI status 'MAIN100' from
                BCALV_GRID_DEMO to this report.
    REPORT  zus_sdn_alv_evt_toolbar.
    TYPE-POOLS: abap, cntb, icon.
    DATA:
      ok_code                TYPE ui_func,
      gt_sflight             TYPE TABLE OF sflight,
      g_container        TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
      g_grid1               TYPE REF TO cl_gui_alv_grid,
      g_custom_container    TYPE REF TO cl_gui_custom_container.
    PARAMETERS:
      p_inact    RADIOBUTTON GROUP grp1  DEFAULT 'X',  " delete buttons
      p_dele     RADIOBUTTON GROUP grp1.               " inactivate buttons
    PARAMETERS:
      p_newbut   AS CHECKBOX  DEFAULT ' ',  " add new button
      p_newddm   AS CHECKBOX  DEFAULT 'X'.  " add dropdown menu
          CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-DATA:
          md_cnt    TYPE i.
        CLASS-METHODS:
          handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
            IMPORTING
              e_object
              e_interactive
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
          CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_toolbar.
    § 2.In event handler method for event TOOLBAR: Append own functions
      by using event parameter E_OBJECT.
        DATA:
          ls_toolbar  TYPE stb_button,
          ls_menu     type STB_BTNMNU.
    E_OBJECT of event TOOLBAR is of type REF TO CL_ALV_EVENT_TOOLBAR_SET.
    This class has got one attribute, namly MT_TOOLBAR, which
    is a table of type TTB_BUTTON. One line of this table is
    defined by the Structure STB_BUTTON (see data deklaration above).
    A remark to the flag E_INTERACTIVE:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            'e_interactive' is set, if this event is raised due to
            the call of 'set_toolbar_interactive' by the user.
            You can distinguish this way if the event was raised
            by yourself or by ALV
            (e.g. in method 'refresh_table_display').
            An application of this feature is still unknown...
        ADD 1 TO md_cnt. " a simple counter
      (1.a) Inactivate toolbar buttons
        IF ( p_inact = abap_true ).
          LOOP AT e_object->mt_toolbar INTO ls_toolbar FROM 1 TO md_cnt.
            ls_toolbar-disabled = 'X'.
            MODIFY e_object->mt_toolbar FROM ls_toolbar.
          ENDLOOP.
      (1.b) Delete toolbar buttons
        ELSE.
          DO md_cnt TIMES.
            DELETE e_object->mt_toolbar INDEX 1.
          ENDDO.
        ENDIF.
      (2) Add new button
        IF ( p_newbut = abap_true ).
        Add separator to separate default and new buttons
          CLEAR: ls_toolbar.
          ls_toolbar-butn_type = cntb_btype_sep.  " separator
          APPEND ls_toolbar TO e_object->mt_toolbar.
        Add new button "DETAIL"
          CLEAR: ls_toolbar.
          ls_toolbar-function  = 'DETAIL'.
          ls_toolbar-icon      = icon_detail.
          ls_toolbar-quickinfo = 'QuickInfo'.
          ls_toolbar-butn_type = cntb_btype_button.
          ls_toolbar-disabled  = abap_false.
          ls_toolbar-text      = 'Details'.
         ls_toolbar-checked = ' '.
          APPEND ls_toolbar TO e_object->mt_toolbar.
        ENDIF.
      (3) Add new dropdown menu
        IF ( p_newddm = abap_true ).
        Add separator to separate default and new buttons
          CLEAR: ls_toolbar.
          ls_toolbar-butn_type = cntb_btype_sep.  " separator
          APPEND ls_toolbar TO e_object->mt_toolbar.
        Add new dropdown menu "DETAIL"
          CLEAR: ls_toolbar.
          ls_toolbar-function  = 'DDMENU'.
          ls_toolbar-icon      = icon_detail.
          ls_toolbar-quickinfo = 'QuickInfo'.
          ls_toolbar-butn_type = cntb_btype_dropdown.
          ls_toolbar-disabled  = abap_false.
          ls_toolbar-text      = 'DD-Menu'.
         ls_toolbar-checked = ' '.
          APPEND ls_toolbar TO e_object->mt_toolbar.
        ENDIF.
      ENDMETHOD.                    "handle_toolbar
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
          MAIN                                                          *
      SELECT * FROM sflight INTO TABLE gt_sflight.
      CALL SCREEN 100.
    END-OF-SELECTION.
          MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
      SET PF-STATUS 'MAIN100'.
      IF g_custom_container IS INITIAL.
        CREATE OBJECT g_custom_container
               EXPORTING container_name = g_container.
      Instantiate ALV grid control
        CREATE OBJECT g_grid1
               EXPORTING i_parent = g_custom_container.
        CALL METHOD g_grid1->set_table_for_first_display
          EXPORTING
            i_structure_name = 'SFLIGHT'
          CHANGING
            it_outtab        = gt_sflight.
      Set event handler for event TOOLBAR
        SET HANDLER:
          lcl_eventhandler=>handle_toolbar FOR g_grid1.
      ENDIF.
    $Comment: Toolbar can be modified on-the-fly
      g_grid1->set_toolbar_interactive( ).
    ENDMODULE.                    "PBO OUTPUT
          MODULE PAI INPUT                                              *
    MODULE pai INPUT.
      to react on oi_custom_events:
      CALL METHOD cl_gui_cfw=>dispatch.
      CASE ok_code.
        WHEN 'EXIT'.
          PERFORM exit_program.
        WHEN OTHERS.
        do nothing
      ENDCASE.
      CLEAR ok_code.
    ENDMODULE.                    "PAI INPUT
          FORM EXIT_PROGRAM                                             *
    FORM exit_program.
    CALL METHOD G_CUSTOM_CONTAINER->FREE.
    CALL METHOD CL_GUI_CFW=>FLUSH.
      LEAVE PROGRAM.
    ENDFORM.                    "EXIT_PROGRAM[/code]
    Regards
      Uwe

  • Lack of Previous/Nest buttons on individual topic pages

    I reall miss the above. Any chance they could be returned? It's much more time consuming to have to go back to discussion page each time.

    Thanks, It would really cut the back and forth time.
    From:
    adobe-admin <[email protected]>
    To:
    "Larry G. Schneider" <email address deleted by host]>
    Date:
    09/19/2011 10:54 AM
    Subject:
    Re: Lack of Previous/Nest buttons on individual topic pages Lack of Previous/Nest buttons on individual topic pages
    Adobe Forums
    Re: Lack of Previous/Nest buttons on individual topic pages
    created by adobe-admin in Forum comments - View the full discussion
    I?ve been told no, it was removed from the core platform a while ago due
    to performance issues. But I will bring it up again.
    Replies to this message go to everyone subscribed to this thread, not
    directly to the person who posted the message. To post a reply, either
    reply to this email or visit the message page: [
    http://forums.adobe.com/message/3925276#3925276]
    To unsubscribe from this thread, please visit the message page at [
    http://forums.adobe.com/message/3925276#3925276]. In the Actions box on
    the right, click the Stop Email Notifications link.
    Start a new discussion in Forum comments by email or at Adobe Forums

  • Need to generate XML report  (when user clicks the button)from Application Express 4.0.0.00.46

    I am new to Apex so I invoke all the APEX GURUS to help me !!!
    Here are details.
    When the user hits a button from APEX page he can download an XML report
    here is the parameterized SQL query:

    Duplicate thread: https://community.oracle.com/message/11325665

  • Can we remove the Continue button from Quiz Results?

    Hi Everyone,
    Is there any way to remove the continue button from the Quiz Results page?
    I have a captivate file in which there is a Thank you slide at the end after the Quiz results slide. Now, here's the problem - The user is just finishing the quiz and closing the browser tab - which is not showing the completion status inside LMS. The user must need to view the Thank you slide  -  so that the LMS can respond as "Completed" status.
    Now, I want to remove the Continue button on Quizzes result slide so that user doesnot need to go ahead to next slide to complete the course. And i will put the Thank You message here in Quizzes result slide only.
    Can I remove the continue button from the Quiz Results page so that it can be the last slide?
    Regards
    Vikas Sharma

    Removing the Continue button from the Quiz Results slide is NOT a good idea in my experience.  Clicking the Continue button triggers functions in Captivate to terminate the quiz and commit the score to the LMS.  If this button is not clicked, Captivate may not be sure the person has decided they're done with the quiz and wants their score to be captured by the LMS at that point.  There are often other buttons on the Quiz Results slide to offer the user the option of Retaking or Reviewing the Quiz.  Only the Continue button is designed to take them further beyond the Quiz Result slide.
    Like yourself, I have also found learners often fail to grasp the importance of the Continue button and don't realise they need to do something extra (beyond reaching the Quiz Results slide) in order for their score to be captured.  So what I usually do is rename the Continue button to something more meaningful such as: Register Your Score, or Record Quiz Results Now.  Having a name like this (and making the button nice and large and bold so that it's not easy to miss) clearly tells people that they need to click this button if they want their score to be retained.  It's just a simple change, but it practically eliminated all issues we had with people just closing down their browser when they saw the Quiz Results.

  • How can I remove the Star Button from the Address Bar?

    How can I remove the Star Button from the Address Bar? There's no obvious way of doing it. Is there any about:config value related to it?

    https://addons.mozilla.org/en-US/firefox/addon/no-star-button/

  • How to refer to another EJB from different root

    Hi ,
    Is there any way in JDeveloper to refer to EJB's from another context root ( Technically different application ) from the EJB's in the current context root. ? Am seeing a couple of ways, but looking for something better if possible
    1) Reuse the source code from the other application
    2) Define the other EJB as a Service, use a Service lookup to get the business intent of the service.
    Please advice !!

    Done.

  • [Question] New Button from Toolbar which creates a new Outlook Mail?

    Hello together,
    I am faced with an issue by using a button from the toolbar in order to create a new outlook mail.
    Do you know the functionality from html?
    href="mailto:email@email?subject=CRM%20Feedback&body=Bereich%20(z.B.%20Opportunity%....
    This coding will create a new outlook mail an fills it with information when the user click this link. It is also possible to implement it via a button.
    Now, I want to implement these function in my component, escpecially in the toolbar.
    I have created a new button, but how can I provide it? Is there a possibility at all?
    Thanks!
    Regards,
    Marcus
    Edited by: Marcus Findeisen on Mar 8, 2011 4:55 PM

    Just define the following coding for your button...
        ls_button-text     = 'Outlook mail'.
        ls_button-tooltip = 'Outlook mail'.
        ls_button-on_client_click = 'javascript:window.open ("mailto:email@email?subject=CRM","mywindow1","width=100,height=100,scrollbars=no,menubar=no");'.
        ls_button-page_id  = me->component_id.
        ls_button-enabled  = abap_true.
        APPEND ls_button TO rt_buttons.
        CLEAR ls_button.

  • "Save as pdf" button from InDesign

    Is it possible to make a "save as pdf" button from InDesign ?
    Best regards, Mette Louise

    Well, I'd say that, but if the button is to run Acrobat JavaScript it comes back to an Acrobat forum. But my question is: what would it do? The file is already a PDF.

  • How to use buttons from a different theme in current theme ?

    Hi Friendsl,
    I was just wondering how can I have those nice looking buttons from Theme-2(Builder Blue ) use in Theme-13(Classic Blue).
    I created a copy of theme-2 button template in theme-13 and called it "My Button".
    Now when I went into the button properties and changed the template to "My Button", it doesn't work like that.
    Am I missing some thing else here ?
    Please help.
    Thanks
    Raj

    Well it won't work that way because the css files referenced in your current theme are different than those in the one you want to use so Button X in theme 1 will look different from Button X in theme 2. When I've wanted to do that kind of thing, I've had my own theme and changed the CSS files or if I only want to override a few things, I create my own css file with a particular class that I want and then make the button use that class so as not to be overriden by the theme's classes.
    Cheers
    Kofi

Maybe you are looking for

  • PFCG push button, not appearing on the SAP Easy menu screen in CRM 7.0

    Hi Experts, PFCG push button is not visible on the SAP GUI, Easy Access menu screen in CRM 7.0. But I see it appearing on the CRM 2007 SAP Easy Access screen. So how to make it appear on the SESSION_MANAGER screen, that is Easy Access Menu screen. I

  • Top 10 transactions in terms of dialog steps

    Hi, I have a client that I need to compare their top 10 transactions in terms of dialog steps to the SAP average.  I don't know where to go to get that average.  I know not all systems are the same and I also know this is pretty much an impossible ta

  • Laserfiche - Do you split your volume?

    Hi! On Laserfiche, can you please give me your opinion as to whether you split your volumes or not, and why. The vendor told me none of his clients splits them, back when we started using LF, but since ours is getting just around 500 GB maybe it's ti

  • Installing new CS5 over trail version

    Should one uninstall the trial version of CS5 and install the CD or can one just type in the new S/N from the CD and it's a done deal? cheers, JB

  • How to recover sun solaris 10 password

    i have install virtual machine some day back and set password for user name root. today when i try to login on that machine i forget the password.what should i do in order to recover the password for root.