Multiple buttons, same URL

I'm creating a banner in Flash CS4, using AS 3.0. I don't do a lot of Flash anymore, and never did much As 3.0, so I NEED HELP!
There are 4 instances of a button in this banner. They fade in and out throughout the banner. It's the same button, all are named "myButton" and they always need the same URL, but I can get this to work only on the first instance. The subsequent buttons are unresponsive.
This is the code on frame 1.
myButton.addEventListenener(MouseEvent.CLICK, onMouseClick);
function onMouseClick(e:MouseEvent):void
    var request:URLRequest=new URLRequest("http://www.tolpa.com");
    navigateToURL(request, "_blank");
I tried giving the instances different names ("myButton2," myButton3," etc. , and changing the code on frame 1:
myButton.addEventListenener(MouseEvent.CLICK, onMouseClick);
function onMouseClick(e:MouseEvent):void
    var request:URLRequest=new URLRequest("http://www.tolpa.com");
    navigateToURL(request, "_blank");
myButton2.addEventListenener(MouseEvent.CLICK, onMouseClick);
function onMouseClick(e:MouseEvent):void
    var request:URLRequest=new URLRequest("http://www.tolpa.com");
    navigateToURL(request, "_blank");
myButton3.addEventListenener(MouseEvent.CLICK, onMouseClick);
function onMouseClick(e:MouseEvent):void
    var request:URLRequest=new URLRequest("http://www.tolpa.com");
    navigateToURL(request, "_blank");
etc.
But this produced an error about duplicate functions.
Any help would be greatly appreciated. Thank you for looking!

You need to have unique names for all the buttons.  By naming them all the same only one of them gets the listener code assigned to it. 
You can assign the same listener though.  Your second attempt shown would have been correct if you just had one function for all of them to share...
myButton.addEventListenener(MouseEvent.CLICK, onMouseClick);
myButton2.addEventListenener(MouseEvent.CLICK, onMouseClick);
myButton3.addEventListenener(MouseEvent.CLICK, onMouseClick);
myButton4.addEventListenener(MouseEvent.CLICK, onMouseClick);
function onMouseClick(e:MouseEvent):void
    var request:URLRequest=new URLRequest("http://www.tolpa.com");
    navigateToURL(request, "_blank");

Similar Messages

  • Multiple buttons on a single slide each connecting to a different url

    Using a trial version of Captivate 7.  I have a handful of slides where the customer wants to open different forms via url.  I tried using a button for each link, inserting the url and using the "enter" key for each of the multiple buttons.  Works fine with the mouse but for 508 folks who tab to the URL and hit the enter key ......... I get many instances where the incorrect url is activated.  Is there a way around this without assicning a different shortcut key for buttons where thare are more than one on a single slide?     Thanks

    Welcome to AD!
    Here is an article on using multiple ipods. I suggest method 1 and steer clear of method 3.
    http://support.apple.com/kb/HT1495
    For your point #1, sharing music on same PC between users, put it in a shared library & set permissions as directed here
    http://support.apple.com/kb/HT1203
    For #2, itunes doesn't have the capability to monitor folders for new content. You'll need to get something like the free program 'itunes folder watch'.

  • Multiple Portals with same url..

    hi,
    how can i have multiple portals having same url ? i will have a request
    parameter Portal name ,using this parameter i want direct it to the corr
    portal.
    Thanks
    vedant

    Yes, you can do that. You basically need to setup mod_osso agent in OAM.
    Oracle Portal behaves exact in the same way as any mod_osso protected application. If you are able to protect a standard HTML file on the webserver's operating system, you will be able to protect your Portal as well.
    Setup is not documented (yet).
    Thanks,
    EJ

  • IPhone SDK - Multiple buttons calling the same IBAction

    Hi,
    Can I call the same action with multiple buttons? I´ve just connected
    the action to the buttons in interface builder, but in the header file
    I can´t use - (IBAction)setOperator: (id)sender; as the parameter to the function, it always crash due to uncaught exception. If I use - (IBAction)setOperator; it
    works, but i can´t differentiate wich button was pressed.
    I don´t know if i can set the (id)sender parameter in the interface
    builder. Can anyone help me?
    Thanks,
    Pitteri

    .h file:
    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
    @interface CalculatorView : UIView {
    IBOutlet UITextField *txtResult;
    IBOutlet UIButton *btnMult;
    IBOutlet UIButton *btnDiv;
    @property (nonatomic, retain) UITextField *txtResult;
    @property (nonatomic, retain) UIButton *btnMult;
    @property (nonatomic, retain) UIButton *btnDiv;
    - (IBAction)setOperator:(id)sender;
    @end
    .m file:
    #import "CalculatorView.h"
    @implementation CalculatorView
    @synthesize btnDiv, btnMult, txtResult;
    - (IBAction)setOperator:(id)sender{
    //if btnMult pressed
    //bla bla bla
    //if btnDiv pressed
    //bla bla bla
    that´s my code. Hope u can help.
    thanks
    @end

  • Oracle Access manager 10.1.4 (coreid) multiple authentication for same URL

    I am evaluating oracle access manager hence new to this product.
    I have a requirement where i have a /wps URL.
    Users coming externally go through reverse proxy server to the final IIS web server. Internal user access IIS directly.
    /wps should be protected by reverse proxy using forms authentication
    while IIS server also protect /wps but should use basic authentication.
    Looks like policy is shared by all webgates so i can define one authentication method for /wps.
    Comparing this with CA Siteminder each agent have their own URLs to protect and so two agents can protect the same URL but with different authentication method. The single signon works as the protection level is same.

    I have not done what you are speaking of; so I would assume that Boland is correct. One thing that you may want to consider is making the external users log into another resource before they hit the /wps. If the other resource is forms protected and at the same authentication level (number on auth scheme), then they can hit the external login resource, get their OBSSO cookie, then slide right thru the basic authentication request of the current policy domain.
    Another idea would be to get a little more granular with your current policy domain. Have a file that's protected with forms auth in your policy domain that the external users authenticate to. Remember, this could be as simple as a dummy page that just does an HTTP redirect.
    Good luck.
    --Aaron                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Multiple Instances of PeopleBooks on same url

    Hi
    I am on PTools 8.50 and FSCM 9.1
    Windows 2008 64bit, SQL Server 2008
    Can you please advise the steps to perform to install both PeopleTools PeopleBooks and FSCM PeopleBooks at the same url?
    The steps in Note 834786.1 didnt work for me
    Also please note that installing the applications peoplebooks first and then tools also didnt work
    Thanks
    Cyril
    Edited by: cyrilt on Apr 7, 2010 4:06 AM

    If you want to host the peoplebooks at the same URL as the application, you'll need to install the Peoplebooks in the PSOL folder of the webserver for the application. What you basically do is firstly stop the webserver which is running your application. Then install the Application Peoplebooks and finally the PeopleTools peoplebooks. During the installation it will ask where your PS_HOME is located (in this case the location of the PeopleSoft folder) and where the PSOL folder is located. For example D:\APPS\PT850\HR91DEMO\webserv\peoplesoft\applications\peoplesoft\PSOL.war.
    In steps:
    - Install application peoplebooks (FSCM9.1) in the PS_HOME where your application is installed (do not generate a search collection when it asks you)
    - Install PeopleTools PeopleBooks (PT8.50) in the same PS_HOME, if it asks to overwrite please select YES TO ALL. When it's done it'll ask you to create a search collection, select yes.
    There is no need to install another webserver since you're hosting it on the same webserver as your application. When you're done installing just start up your webserver again and the PeopleBooks should be available at http://{host_name}:{port_nr}/PSOL/htmldoc/index.htm
    To display the Help link on each PeopleSoft page you'll have to modify your webprofile so the Help URL reflects the location of your PeopleBooks. The URL should be like this: http://{host_name}:{port_nr}/PSOL/htmldoc/f1search.htm?ContextID=%CONTEXT_ID%&LangCD=%LANG_CD%
    When that's done just bounce the webserver and you should have a Help link on each page.

  • How to use one pop up window for multiple buttons and input fields?

    Hi Experts,
    I have created a pop up window that will be opened from multiple buttons in the same view. There are input fields that the data will be populated from a pop up window.  How can I set up which button that a pop up window is opened from? I also would like to populate the data from a pop up window to the input field next to a clicked button. There are 6 buttons and 6 input fields that share the same pop up window. I would very appreciate your responses.
    Thank you,
    Don

    Hi,
    Try creating 2 context attributes, one in your component controller and the other in the pop-up view. Bind the attribute of pop-up view to the component controller attribute.
    In the main view, on click of every button set a unique code in the controller's context which helps you in identifying the button clicked. Since u have created a binding to the pop-up view attribute the value flows from the controller.
    In the init method of your pop-up view, check the value of the attribute and based on that display which ever UI elements are required.
    Eg:
    On Button 1 click set value "B1", Button 2  value "B2" etc. In the init() of pop-up view u can check the values and perform the required operation:
    if(("B1").wdContext().currentContextElement().getButtonIdentifier()){
    else...{
    Hope this helps you.
    Regards,
    Poojith MV

  • How to create multiple buttons in ALV Toolbar in Webdynpro ABAP

    Hi all,
    I am trying to create multiple buttons in Webdynpro  ALV toolbar, please go through the code.
    What happening is, second button is replacing the first one.
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
       lo_cmp_usage =   wd_this->wd_cpuse_alv_table( ).
       IF lo_cmp_usage->has_active_component( ) IS INITIAL.
         lo_cmp_usage->create_component( ).
       ENDIF.
       DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
       lo_interfacecontroller =   wd_this->wd_cpifc_alv_table( ).
        DATA lv_value TYPE REF TO cl_salv_wd_config_table.
       lv_value = lo_interfacecontroller->get_model(
       DATA lr_buttonui1 TYPE REF TO cl_salv_wd_fe_button.
       DATA lr_buttonui2 TYPE REF TO cl_salv_wd_fe_button.
       DATA button1 TYPE REF TO cl_salv_wd_function.
       DATA button2 TYPE REF TO cl_salv_wd_function.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).
    How can I overcome this??
    Thanks
    Eshwar

    Hi Eshwar,
    The button Ids are same for both the buttons in your code. You need to change it as BUTTON1, BUTTON2.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON1')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON2' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).

  • Multiple Buttons in JTable Headers:  Listening for Mouse Clicks

    I am writing a table which has table headers that contain multiple buttons. For the header cells, I am using a custom cell renderer which extends JPanel. A JLabel and JButtons are added to the JPanel.
    Unfortunately, the buttons do not do anything. (Clicking in the area of a button doesn't appear to have any effect; the button doesn't appear to be pressed.)
    Looking through the archives, I read a suggestion that the way to solve this problem is to listen for mouse clicks on the table header and then determine whether the mouse clicks fall in the area of the button. However, I cannot seem to get coordinates for the button that match the coordinates I see for mouse clicks.
    The coordinates for mouse clicks seem to be relative to the top left corner of the table header (which would match the specification for mouse listeners). I haven't figured out how to get corresponding coordinates for the button. The coordinates returned by JButton.getBounds() seem to be relative to the top left corner of the panel. I hoped I could just add those to the coordinates for the panel to get coordinates relative to the table header, but JPanel.getBounds() gives me negative numbers for x and y (?!?). JPanel.getLocation() gives me the same negative numbers. When I tried JPanel.getLocationOnScreen(), I get an IllegalComponentStateException:
    Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
    Can someone tell me how to get coordinates for the button on the JTableHeader? Or is there an easier way to do this (some way to make the buttons actually work so I can just use an ActionListener like I normally would)?
    Here is relevant code:
    public class MyTableHeaderRenderer extends JPanel implements TableCellRenderer {
    public MyTableHeaderRenderer() {
      setOpaque(true);
      // ... set colors...
      setBorder(UIManager.getBorder("TableHeader.cellBorder"));
      setLayout(new FlowLayout(FlowLayout.LEADING));
      setAlignmentY(Component.CENTER_ALIGNMENT);
    public Component getTableCellRendererComponent(JTable table,
                                                     Object value,
                                                     boolean isSelected,
                                                     boolean hasFocus,
                                                     int row,
                                                     int column){
      if (table != null){
        removeAll();
        String valueString = (value == null) ? "" : value.toString();
        add(new JLabel(valueString));
        Insets zeroInsets = new Insets(0, 0, 0, 0);
        final JButton sortAscendingButton = new JButton("1");
        sortAscendingButton.setMargin(zeroInsets);
        table.getTableHeader().addMouseListener(new MouseAdapter(){
          public void mouseClicked(MouseEvent e) {
            Rectangle buttonBounds = sortAscendingButton.getBounds();
            Rectangle panelBounds = MyTableHeaderRenderer.this.getBounds();
            System.out.println(Revising based on (" + panelBounds.x + ", "
                               + panelBounds.y + ")...");
            buttonBounds.translate(panelBounds.x, panelBounds.y);
            if (buttonBounds.contains(e.getX(), e.getY())){  // The click was on this button.
              System.out.println("Calling sortAscending...");
              ((MyTableModel) table.getModel()).sortAscending(column);
            else{
              System.out.println("(" + e.getX() + ", " + e.getY() + ") is not within "
                                 + sortAscendingButton.getBounds() + " [ revised to " + buttonBounds + "].");
        sortAscendingButton.setEnabled(true);
        add(sortAscendingButton);
        JButton button2 = new JButton("2");
        button2.setMargin(zeroInsets);
        add(button2);
        //etc
      return this;
    }

    I found a solution to this: It's the getHeaderRect method in class JTableHeader.
    table.getTableHeader().addMouseListener(new MouseAdapter(){
      public void mouseClicked(MouseEvent e) {
        Rectangle panelBounds = table.getTableHeader().getHeaderRect(column);
        Rectangle buttonBounds = sortAscendingButton.getBounds();
        buttonBounds.translate(panelBounds.x, panelBounds.y);
        if (buttonBounds.contains(e.getX(), e.getY()) && processedEvents.add(e)){  // The click was on this button.
          ((MyTableModel) table.getModel()).sortAscending(column);
    });

  • Multiple buttons for a given validation

    I want the same validation to be done on the click of two buttons. In the "Conditional Validation Processing", I see we can
    "select a button" which allows us to select only one button.
    How can I select multiple buttons for a given validation?
    Is there a way or do I need to create another validation for the second button.
    Please advice.

    When you submit a page with a button the "request" value is set to the button name (not the displayed button label). After-submit events can check the request using :REQUEST or v('REQUEST') so you can build a condition like:   :REQUEST in ('APPLY','CREATE')..or you can use a built-in condition type that checks the request value like 'Request is Contained within Expression 1'.
    Scott

  • NS_BINDING_ABORTED error - Resubmits the same URL twice

    I have a website that has multiple tabs after successful log in. Each Tab is mapped to different URL. when I change from one Tab to other, at random, for one of the Tab URL, the NS_BINDING_ABORTED errors comes for first GET submission and behind the scenes, wihtout any further user interruption, the fire fox browser submits the same URL mapped to the tab second time. But we are not allowed to submit the same URL twice at any time. Because each time for the URL GET request, a unique GUID is appended. If the borwser re-submits the same URL with same GUID, the application throws an error message, hence user can not see the next tab on which he/she clicked.
    Interesting this is that the same website works fine in any IE browser. Why this is happening only for fire fox browser?

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
    [http://forums.mozillazine.org/viewforum.php?f=25 <br />
    You'll need to register and login to be able to post in that forum.

  • If i open same url in same browser without making signout in SharePoint FBA site, it login user again automatically which should not happened

    Hi All.
    I have SharePoint 2010 FBA site, and when user close there browser without logout button and if they enter same url in browser then it allow user to login on application which is security risk.
    So can you please help me to solve this problem.
    Thanks
    Ajit Shinde

    Hi Ajit,
    See this similar thread (with answers):
    https://social.technet.microsoft.com/Forums/en-US/5bf1dfdf-cc1c-422c-9c25-094fc7aaad61/user-details-retained-if-user-does-not-signout-and-closes-the-browser-and-opens-page-again?forum=sharepointgeneralprevious
    Nico Martens
    SharePoint/Office365/Azure Consultant

  • How to have the SAME URL saved in my different Favorites Folder?

    How can I have the SAME URL saved in Multiple Folders under my Favorites.
    For Example XYZ Site I want to save it under Music Folder and also under Movie folder and also may be under my Misc folder.
    I tried Copying and Pasting ... but either I could not or the FF does NOT allow me.
    I can do this under IE.
    Thanks!

    Hello,
    You should be able to copy and paste in Firefox. Its easier to do it in the Library:
    * Bookmarks [[Image: Bookmarks-29]] > Show All Bookmarks
    * For quick work, highlight bookmarks and use ctrl+c/ctrl+v to copy and paste
    It also works on the bookmark toolbar by bringing up the context menu (right clicking) and pasting via the context menu, assuming you navigate to the folder.
    It sounds like this is what you have been doing; can you describe what happens when you try copying? Note that if you copy a bookmark (or several) and paste it into a text editor such as Notepad to see if it is actually copying.

  • When button pressed: Multiple buttons

    Regarding the 'When Button pressed' condition available in various places (computations, branches, processes, etc), it offers me the option to select exactly one button.
    How can I make it so that I want the thing to fire when either Button 1 or 2 or 3 is pressed?
    Thanks

    Martin - Whenever a page is submitted with a button, the request value is set to a property from the button, either the button name for standard buttons or the request value attribute for item buttons. In either a PL/SQL expression condition or in some of the declarative condition types that look at the request value, you can compare it to a list of values that you're interested in.
    Note that the request value doesn't necessarily tell you which button was pressed. It tells you that some event set the request value. If your page can be submitted with a tab or with javascript that you put somewhere on the page, or if you've given multiple buttons the same request value, it's up to you to prevent ambiguity about the button-to-request mapping.
    Scott

  • Scriptui multiple buttons action

    I want to create a dialog consisting of multiple buttons. As a result I want value which button was pressed by user.
    The script (shortened to problematic part):
    // I'm looping through elements on layer 'warstwa' from kolorStart to kolorStop, 'k' is used for number buttons
                        for (i = kolorStart, k = 0; i <= kolorStop; k++, i++) {
                                  myButton[k] = myButtonGroup.add ("button", undefined, warstwa.pageItems[i].contents);
                                  myButton[k].label = warstwa.pageItems[i].contents;
                                  myButton[k].onClick = function () { wybranyKolor = myButton[k].label; myWindow.close(); }
    The result:
    but buttons don't work, wybranyKolor returning 'undefined'. If I change "wybranyKolor =  myButton[k].label" to "wybranyKolor =  myButton[k-1].label" I get proper answer but it is the same for all buttons so it looks that all buttons have the same acion assigned. How to get each button to has unique name which can be passed to variable?
    Propably I can achive the same with radio buttons' list but with buttons it is one click less for the user.

    sorry I don't understand your new question,
    you need this
    myButton[k].label = warstwa.pageItems[i].contents;
    you don't need this one
    myButton[k].onClick = function () { wybranyKolor = myButton[k].label; myWindow.close(); }
    replace with
    myButton[k].onClick = function () { wybranyKolor = this.label; myWindow.close(); }

Maybe you are looking for

  • Can't Install R7 of iTunes because QuickTime can't open the registry key

    When I try to update iTunes to R7 I get the message "Cannot open key: HKEYLOCALMACHINE\Software\Classes\QuickTime.QuickTime\CLSID Verify sufficient access or contact your support personnel" I've tried deleting QuickTime and the key but nothing has wo

  • Treasury workflow  not getting triggered .

    I have done all as given in the SAP doc ... The release procedure for the business partner has been set up using a Business Workflow, for which SAP has defined the standard role 20000053 'TRLOAPPROVAL' and the Workflow template WS20000263 'WSTRLOAPPR

  • Problem with Droid 4 (4Glte) producing static

    Recently got a Motorola Droid 4.   Phone causes intermittent static buzzing on PC speakers and clock radio whenever within about 3 ft.  Buzzing happens about every 30 sec and lasts about 10 sec.  Happens when phone is not being used. Not related to B

  • Clustering Problem on WLS 5.1 sp 2/3

    I've set up a multihomed machine running four instances of WLS 5.1 sp2 on           solaris 7. When I initially added them to a cluster and tested them for           serving JSPs everything seemed fine. I've since tried deploying an EJB           (wh

  • About place holder columns in reports

    hi gurus, i want to know about place holder columns, lexical parameters, matrix reports in reports with some common examples can any one guide me to do this.. any help is highly appreciated.. please reply...