YES AND NO buttons!!

HOw do you implement a yes and no button and what it does if you press yes and no?

public static void createConfirmDialogButton() {
        int result = JOptionPane.showConfirmDialog(new JPanel(),
                "What do you want (Y/N) ??");
        if (result == JOptionPane.YES_OPTION) {
            //Do or add method/code
            JOptionPane.showMessageDialog(new JPanel(), "You selected Yes ;)");
        } else if (result == JOptionPane.NO_OPTION) {
            //Do or add method/code
            JOptionPane.showMessageDialog(new JPanel(), "You selected NO!!!!");
    }Hope this helps !

Similar Messages

  • How to display warning message box with yes and no buttons

    Hi,
    I am writing the code to delete emp details from database.
    I want to display warning message with yes and no buttons after clicking the delete button in the same page, if yes is clicked, i want to invoke delete() method in AM.
    Is it possible, if yes pls suggest me how to do it.
    Thanks
    Message was edited by:
    user536125

    This is being discussed in
    warning message(dialog page) to be displayed in the same page
    Thanks
    Tapash

  • Paramform=yes and submit button

    Hi all,
    I'm trying to deploy a new report from web (just want to put a link to that report)
    This report takes 2 parameters from user input, my link looks like that : http://myserver:myserverport/reports/rwservlet?server=myserver&report=myreport.rep&desformat=pdf&destype=cache&userid=xxx/xxx@xx&paramform=yes
    From that url I get a paramform with my 2 parameters which i fill in, then i click on the "submit query" button, but nothing happen, it just reload the same page and never display my reports which run fines when i put the parameter in the url.
    I've look in the reports queue manager and my report are show as executed successfully.
    Can anybody point me what i'm missing for my reports to be display when i click that button?
    I'm using Report Builder 9.0.4.0.33 , for the moment i'm trying to run the reports against an Windows 2000 IDS 9.0.4.1 OC4J instance, and will deploy it on an Redhat 3 ES IAS 9.0.4.2
    Thanks in advance.
    (sorry for my poor english)

    Arun, I am just learning my way around reports in the 10g world so take my suggestion with a grain of salt.
    Look at adding a "pfaction=" param to your report_others parameter on the report object. It might look something like this:
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no p_1='||:block3.deptno||' pfaction=reports/rwservlet?_hidden_server=rep_server&report=my_report_name&paramform=no&destype=printer&desname=\\print_server\HPLaserJ4240n&desformat=pdf&userid=scott%2Ftiger%40oradev.world&p_1='||:block3.deptno);
    The sample I pasted above gives more params than you need but I think the pfaction param that is passed in the report_others param of the object basically tells the "Submit" button what to do. I also used a hard coded text string for most of the example where you would probably want to make it more dynamic.
    The rp2rro library can handle the encoding of characters to make it URL safe i.e. @ = %40, etc.
    See the document below for more details, it also has an encode function example:
    http://www.oracle.com/technology/products/forms/pdf/10g/frmrepparamform.pdf

  • Alert YES and NO

    Hi,
    How do you get an alert message to have a YES and NO button.
    I am using the following code, and all it shows is OK:
    _root.mxca.show(question, "Payment Successful?", Alert.YES |
    Alert.NO, null, payClickHandler);
    AND...
    How do I open another alert message after the YES button is
    pressed?
    Thanks for any help,
    ~Oni.

    Unfortunately, there is no cross-browser support for opening a confirmation dialog that is not the default OK/Cancel pair.
    I would suggest using a Javascript library that can build a DOM-based dialog instead.  Try Jquery UI:
    http://jqueryui.com/demos/dialog/
    If you know how to include jQuery files (.js, css) in to extension, then let me know.
    i'm  tryng to do extension with jQuery.
    Cheers!

  • Yes, No and Cancel Buttons on Pop-Up for BACK or NEW button

    Hi Experts,
    First scenario:
    We have crated few mandatory fields in incident when ever we are not filling the mandatory fields and try to SAVE (Incident Tool bar button) the Incident, it will Check for any Error Messages, before saving the Document,
    If entries not found in mandatory fields record will not get saved.
    This functionality we are controlling in EH_ONSAVE method of the SRQM_INCIDENT_H/IncidentOV.
    Second scenario:
    But After filling few fields in Incident screen, If I click on NEW button for a new incident or BACK button ,  it give one popup with message Do you want to  save the changes ? With Buttons Yes, No and Cancel. If I click on the Yes button Incident gets saved with an IRN number without entry of any mandatory data.
    How can I control the second scenario as first scenario? Please suggest how to controll Yes, No and Cancel Buttons on Pop-Up for BACK or NEW button as SAVE button.
    Thanks in advance
    Chand

    hi,
    you can control  the pop-up SAVE button without saving your details or write your ownlogic on pop-up save.
    please refer to this post.
    Re: Suppress POP-UP
    regards
    Ismail

  • How to externally trigger the execution of TestStand with a start and abort button through a digital interface?

    Hello,
    I'm Currently evaluating TestStand as an alternative for an in-house developed Test Sequencer.
    To start our own Test Sequencer we use a small box, connected to a DIO board. The box has a start button and an abort button. The box also has a pass, a fail and a running led.
    The interface with this box is made via some digital lines of a PCI-DIO-96.
    In our own Test Sequencer we have groups named Init, Run, Abort, Exit.
    The Init group is executed at startup (only once). It is used to initialize all the HW and SW. -> I guess this is the Pre UUT Loop callback in TestStand.
    The Exit group is only executed once at the end of the day when the application is terminated. It is used to free all the used hardware and cleanup all the resources. This probably is the Post UUT Loop Callback in TS.
    When a product needs to be tested, the operator presses the "start" button which triggers our own Test Sequencer and the run and abort group are being executed (first the run group, afterwards the abort group).
    When the product is being tested the "running led" of the little box lights up to indicate to the operator that the application is running. (only when the run and abort group are running)
    The Run group has all the functional tests in it. (MainSequence)
    The abort group is used to put everything back in it's original state after the test on this single product is done. (Post UUT)
    When executing the tests and something goes wrong (operator gets stuck in a clamper, ...) the operator can still press the abort button and then the execution immediately jumps from the currently executing step in the run group to the first step of the abort group. So, when something goes wrong, immediately the abort group is called.
    At the end of the run and abort group, if no errors occured, the "pass led" lights up. If one or more steps went wrong the "fail" led lights up.
    This setup can also be used to test multiple product in parallel. At that time all the different parallel testers have such a small box which contains a "start" and "abort" button and a pass, fail and running led. (it is possible that they are all connected to the same PCI-DIO-96 board. )
    My question:
    Is it possible to do something similar like this in Teststand? If yes, is there an example available that shows me how to do this in TestStand? (externally trigger the execution of TestStand)
    Typically, in the Init group (Pre UUT Loop) the digital interface box gets initialised.
    In the Close group (Post UUT Loop) the digital interface box is taken out of scope.
    Note: The PCI-DIO-96 board to which the digital interface box is connected will also be used in the rest of the developed application (MainSequence, ...)
    What's really important for me is that I can create a process model that all the application developers in our organisation can use. I really don't want any of the application developers (limited software experience) to mess around in all the features of TestStand.
    For them it's important that they just add the function DigitalInterfaceBoxInit () in the Pre UUT Loop Callback and the DigitalInterfaceBoxClose () in the Post UUT Loop Callback, and then everything works!
    It is important that the appliation developers do not have to create any global variables, other functions, synchronisations, parallel sequences, ... in TestStand. All this needs to be done with a simple call to the DigitalInterfaceBoxInit function.
    Thanks in advance for all the help!
    Best Regards,
    Dennis Vanotterdijk
    [email protected]

    Dennis-
    Your application sounds very well suited to TestStand's abilities. I am also quite impressed with your knowledge of how TestStand's architecture is arranged when you are still just considering whether or not to use it.
    I think that TestStand would work really well for you in this application. Like you mentioned it will provide you with a form of standardization for your application developers to work from. It also provides the flexibility for you to add your custom routines in many different places. TestStand also makes parallel and batch testing much easier in TS 2.0 so that you could develop one test for your product and execute different instances of it in parallel to test multiple products at once.
    As for your specific question about how to c
    ontrol TestStand using a DIO board. I think this is very feasible and should not be too difficult. Since TestStand provides you the ability to create a custom operator interface your operator interface could monitor the status of your DIO board and launch/abort executions based on the read values. Usually the executions are launched/aborted when a button on the GUI is pressed however, I do not see any thing different about basing the action on a DI signal vs a mouse click. I am sure your application is more involved than this high level description but from the sounds of it I think it is very possible to do with TestStand.
    Based on my experience of building test systems with TestStand and your description of the application, I would feel very confident in using TestStand to achieve all the goals you mentioned. If you have further detailed questions on how one of your features might be implemented, feel free to contact one of our Application Engineers or email us at www.ni.com/ask
    and we would be glad to help you.
    Best regards,
    Richard McDonell
    National Instruments

  • I connected my iphone 4s that i unlocked for t-mobile. I plugged it into itunes, and it asked me to update to ios6. I accepted the download and update button. it told me it needed 8 hours. i closed my laptop. not shut down. i opened and it wants restorin?

    I connected my iphone 4s that I unlocked for t-mobile. I plugged it into itunes, and it asked me to update to ios6. I accepted the download and update button. It told me it needed 8 hours. I closed my laptop, not shut down. I re-opened the laptop a few hours later, and it wants restoring?? Whats going on?! i want my iphone back! PLEASE HELP. I'M LOST!!! (I synced my iphone to my computer if that helps at all).

    Yes, and, I try to restore. I have the T-Mobile sim card in it just to clarify. It will not let me get passed that, it does not accept the t-mobile sim card. i tried restoring it using wifi, cellular, and i cant get i tunes. I am scared that if i take the tmobile sim card out and put the at&t one in just to complete the restoration process that the iphone will lock again and not read the tmobile sim card, then all my hard work has gone for nothing. ( this whole process was caused by me trying wanting to empty my pictures onto my computer because i did not have any storage space left). <--- that may not be as important, but i included it just because.

  • TS3367 When trying to use FaceTime I can't because it says it is turned off in settings, it then ask do I want to turn it on , tap for yes and it sits there spinning. Face time is on in settings?

    When trying to use FaceTime I can't because it says it is turned off in settings, it then ask do I want to turn it on , tap for yes and it sits there spinning. Face time is on in settings?

    Have you tried signing out of your Apple ID, restart the iPad and then start all over again?
    Go to Settings>iTunes & App Stores>Apple ID. Tap the ID and sign out. Restart the iPad.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Then go back to Settings>iTunes & App Stores>Apple ID. Sign in again. Then go to Settings>FaceTime>On. See if it will stay turned on and it it does, sign in and setup.

  • How can i create forward and back buttons for a dreamweaver slideshow?

    Hi
    I am an illustrator attempting to create a website in dreamweaver (basically it will be an online portfolio). I would like to have a box/slideshow with images of my work that someone can browse through by clicking 'next' and 'back' buttons. Does anyone know how to do this? I have been trying to find out how to do this for ages - i dont want to use flash if possible as i am worried about making the site too complicated. I know how to make swap image thumbnails, but i think my site would be more user friendly (and look more professional) if i could have next and back buttons. Would this involve complicated css code (which scares the life out of me!) or is there a relatively easy way to do it? I have got two 'dreamweaver for idiots' books, but neither of them cover this topic. Can anyone help?

    If you are using CS4, there is a Command to create a Web Album... this does it automatically for you.
    Otherwise, you can create this manually.  Say you have 3 pages,
    page1.html  (is the index page of the album)
    page2.html
    page3.html
    Therefore, using ordinary text links
    Home would link to page1.html
    Previous would link to page3.html
    Next would link to page2.html
    You would need to make adjustments naturally to each page as you move along with the gallery pages, changing the previous and the next links as needed.  Below is a a basic example of setting up the links in a simple table structure.  You would also then style the table layout as you see fit - yes, using css preferably  :-)
    <table>
    <tr>
    <td><h2>MY GALLERY OF PHOTOS</h2>
    <a href="page3.html">Previous</a> | <a href="index.html">Home</a> | <a href="page2.html">Next</a>
    </td>
    </tr>
    <tr>
    <td>
    <br>
    <a href="../images/img_2401_jpg.jpg"><img src="../images/img_2401_jpg.jpg" border=0></a><br>
    </td>
    </tr>
    </table>
    Here's an article on creating an album using the DW Command I mentioned earlier. You could create the album and then copy and paste the code into a current page if you've already designed on.,... not too difficult, I just tested it.  You do however, need to have Fireworks to process the images.
    http://livedocs.adobe.com/en_US/Dreamweaver/9.0/help.html?content=WSc78c5058ca073340dcda91 10b1f693f21-7ad1.html
    You could also check out the Lightbox effect which is very popular:
    http://www.lokeshdhakar.com/projects/lightbox2/
    Or do a google search for 'jquery'.  There are different album effects using that framework as well.
    Hope some of this helps  :-)
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    Book: Ultimate CSS Reference
    http://www.sitepoint.com/launch/005dfd4/3/133
    http://twitter.com/nadiap

  • Brightness and contrast buttons on monitor is not working

    I have a lenovo 3000H series desktop. Suddenly the brightness and contrast button on the monitor has stopped working. Please help.

    Yes, I did restore it twice plugging it on the computer and using itunes and the hold/sleep/power off button wont still respond.
    No matter how long I push it, it won't do anything so the screen or device won't shut off.
    Everything else is working fine.

  • Creation of satic and dynamic buttons in a view

    Hi,
    I have created a dynamic button using the code..
    DATA: lr_container TYPE REF TO cl_wd_uielement_container,
            lr_button TYPE REF TO cl_wd_button.
      CHECK first_time = abap_true.
      lr_container ?= view->get_element( id = 'ROOTUIELEMENTCONTAINER' ).
      cl_wd_matrix_layout=>new_matrix_layout( container = lr_container ).
      lr_button = cl_wd_button=>new_button( id         = 'BUTTON'
                                            text       = 'My Button'
                                            on_action  = 'ACTION' ).
      cl_wd_matrix_head_data=>new_matrix_head_data( element = lr_button ).
      lr_container->add_child( the_child = lr_button ).
    its working fine and iam able to see the button .....but when i create another button thorugh layout design its going for dump....whats the reason .?
    Cant we create static and dynamic buttons at a time?
    Thanks,.
    Shailaja Ainala.

    Hi Shailaja,
    Yes you can add static and dynamic ui elements together in the same view.
    The possible problem here could be the way in which the ui elements are added.
    You have created the dynamic button under the root container uielement.
    What about you static button ? Check your layout and layout data property.
    Thank You,
    Radhika.

  • Blackberry HUB "Show Read Filed Emails" ON AND OFF button SERIOUS Gmail PROBLEM NEED BUG FIX ASAP!

    Its been for years (starting from 10OS Version 10.2 ) I couldn't see filed/labeled emails in my Z30/Z10 Blackberry HUB of my Gmail account, but I just downloaded Blackberry Blend and it started to show all my filed/labeled emails, but I still cant see them in my Blackberry HUB! Maybe you can tell me how to make Read Filed Emails visible in Blackberry HUB too?
    Blackberry HUB >> Settings >> Display and Actions:
    Show Read Filed Emails is ON
    Show Sent Emails is ON
    Both are turned on, but I still cant see them like on Blackberry Blend.. On search field then I type specific email from filed/label from my Gmail account I immediately finds it, but then I go back to Blackberry HUB all I can see just emails from inbox and single sent emails and YES "SYNC ALL EMAIL FOLDERS" IS SET TO ON AND "SYNC TIMEFRAME" IS SET TO FOREVER (''Sync All Email Folders'' is set ON and ''Sync Timeframe'' is set FOREVER).
    Here is picture of email settings:
    http://forums.crackberry.com/attachments/blackberry-10-os-f269/338662d1425451994-read-filed-messages...
    I want to see all emails in devices Blackberry HUB like in Blackberry Blend desktop! What should I do to make it happen?
    I find out that then I click on the Blackberry HUB > Settings > Display and Actions: "Show Read Filed Emails" to ON or OFF again and again, view in Blackberry Blend immediately changes in order I did ON or OFF, that's pretty amazing, but Blackberry HUB DOESN'T RESPOND AT ALL! View is the same doesn't matter if I change it ON or OFF.
    View in Blackberry Blend starts to look the same like in phones Blackberry HUB then I click "Show Read Filed Emails" OFF, it looks like Blackberry HUB doesn't respond to ''Show Read Filed Emails'' ON and OFF button at all, ITS ALWAYS OFF! What should I do next??
    I'm using Blackberry Z30, but I have Z10 too and it also doesn't work and it looks like this "Show Read Filed Emails" not working button bug is on all 10 OS devices except Blackberry Blend desktop version which works perfectly confirms it.
    I'm using Gmail and I have latest Blackberry 10 OS version OFFICIAL 10.3.1.1565
    Here is a picture how it looks then ''Show Read Filed Emails'' ON and OFF:
    (first is OFF, second is ON)
    http://forums.crackberry.com/attachments/blackberry-10-os-f269/338513d1425416890-read-filed-messages...
    As you can see then ''Show Read Filed Emails'' is ON, Blackberry Blend changes and I can see all my emails (and there are a lot of unread ones! (sorry I blurred some of my emails for privacy)), but in my devices Blackberry HUB there is no changes and its displaying the same thing like ''Show Read Filed Emails'' was OFF. I miss a lot of emails and its really annoying and I think you understand why.. Blackberry Blend desktop version is a savior today, but THIS IS NOT A SOLUTION!
    Any FIX suggestions ASAP?
    UPDATE:
    I tried a lot of times to delete and sign in again and again, but it looks like only Blackberry Blend respond to every setting changes! Blackberry HUB doesn't respond AT ALL! Devices Blackberry HUB only show INBOX and SENT MESSAGES all the time, but if "Display Style" in Blackberry HUB is set to "Conversation" SENT MESSAGES disappear from devices Blackberry HUB too (in Blackberry Blend is everything FINE!) if they are part of CONVERSATION FILED/LABELS EMAILS!!
    All issues I been searching all this years and everyone was blaming Gmail, but it looks like ALL THIS YEARS THIS WAS Blackberry HUB "Show Read Filed Emails" ON and OFF button BUG/PROBLEM which doesn't work on devices Blackberry HUB and today Blackberry Blend desktop version CONFIRMS IT!!
    Yes Yahoo accounts FILED/LABELS EMAILS with devices Blackberry HUB works FINE, but Gmail - NOT and NEED FIX ASAP!

    Newest edits in here:
    http://forums.crackberry.com/general-blackberry-discussion-f2/please-send-very-important-10os-device...
    100% FIX SOLUTION GUARANTEE for Gmail archived/labeled Emails not showing problem!
    How to fix it? FIX "Show Read Filed Emails" button to respond to ON and OFF devices Blackberry HUB for Gmail accounts - NOW IT IS ALWAYS OFF if you press ON or OFF!
     "Show Read Filed Emails" button ON and OFF for Gmail account works on Blackberry Blend desktop version!
    Error/Bug: Blackberry HUB do not show Gmail labeled emails
    Main problem: Blackberry HUB "Show Read Filed Emails" button doesn't respond to ON AND OFF and is always OFF fo Gmail account.
    Main problem: ALL Blackberry 10OS devices Blackberry HUB"Show Read Filed Emails" button ON AND OFF doesnt respond with Gmail accounts!
    Works with: Blackberry Blend desktop version responds to "Show Read Filed Emails" button ON AND OFF with Gmail accounts! (pressing "Show Read Filed Emails" button ON and OFF again and again, view in Blackberry Blend immediately changes in order you press ON or OFF, but Blackberry HUB is always on OFF)
    "Show Read Filed Emails" button doesn't work with: Gmail accounts
    Status: NOT FIXED!
    OS version: Blackberry 10 OS version OFFICIAL 10.3.1.1565
    PROBLEM FOUND!
    I created new Gmail account send 5 test emails and made first 2 test emails labeled and made step by step set up on my Blackberry 10OS device to confirm this ''Show Read Filed Emails'' button BUG/PROBLEM/ERROR:
    1. I signed in with my Blackberry 10OS device like this:
    http://forums.crackberry.com/attachments/blackberry-10-os-f269/338846d1425503380t-gmail-archived-lab...
    2. When I set on Gmail account settings "Sync Timeframe" is set to FOREVER and "Sync All Emails Folders" is set to ON
    http://forums.crackberry.com/attachments/blackberry-10-os-f269/338847d1425503392t-gmail-archived-lab...
    3. And at last I go to devices Blackberry HUB and see this:
    http://forums.crackberry.com/attachments/blackberry-10-os-f269/338856d1425505143t-gmail-archived-lab...
    As you can see it doesn't matter if "Show Read Filed Emails" button is set to ON or OFF, Blackberry HUB doesnt respond at all, but Blackberry Blend view changes at same second then I press.
    CONCLUSION: "Show Read Filed Emails" button ON and OFF BUG/PROBLEM/ERROR for Gmail accounts is confirmed and it STILL NOT FIXED!
    Please spread the word to people who have all the power to influence and accelerate processes to FIX this VERY SERIOUS ISSUE or please tell me there could I send this FIX SOLUTION to to get fastest respond and get it FIXED ASAP. THANK YOU!
    STILL NO FIX!

  • Next and Previous Buttons, n00b edition

    OK, I am trying to construct a "timeline" flash file, where
    basically you click either a next or previous button to move
    through different frames, and I think I know how to do everything
    other than the next and previous buttons. Two questions:
    Would this be easier as AS2.0 or AS3.0?
    If I use AS3, would this code work, and is "my_mc" simply the
    name of the layer with the navigable frames?
    next_btn.addEventListener(MouseEvent.MOUSE_UP,buttonPressed);
    prev_btn.addEventListener(MouseEvent.MOUSE_UP,buttonPressedprev);
    function buttonPressed(event:MouseEvent){
    my_mc.nextFrame()
    function buttonPressedprev(event:MouseEvent){
    my_mc.prevFrame()
    Sorry if this is confusing, I am such a n00b I don't even
    know how to ask questions properly.

    sholditch,
    > This is a huge help and one of the better explanations
    of AS
    > coding I've ever seen. Thanks a ton.
    Thanks!
    > However, I think I may be jumping ahead too much.
    Sure, no worries. It's definitely dizzying at the beginning.
    > Follow up questions, n00b style:
    >
    > 1. What would be the equivalent of the nextFrame()
    method
    > for previous? Tried searching help and googling, but
    getting
    > too much other stuff to wade through.
    Google absolutely rocks, but I hear ya ... you have to be
    willing to
    wade through numerous search results. Fortunately, the Help
    docs usually
    get you directly to your answer -- and quickly, at that -- if
    you just know
    how to navigate them. If you're using Flash CS3, the Help
    docs are local,
    though optionally available online. If you're using Flash
    CS4, the docs are
    online and open in a browser, in either case, what you're
    looking for
    specifically is the ActionScript 2.0 Language Reference (if
    you're using
    AS2) or the ActionScript 3.0 Language and Components
    reference (if you're
    using AS3).
    AS2:
    http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=Part2_AS2_LangRef_1.html
    AS3:
    http://help.adobe.com/en_US/AS3LCR/Flash_10.0/index.html
    In the case of AS2, you'll click on the lefthand side. Open
    up
    "ActionScript 2.0 Language Reference," then "ActionScript
    classes," and
    you're in. In the case of AS3, you'll see the classes already
    listed on the
    lefthand side.
    Now ... you've coded up your button, which means you
    consulted the
    Button (AS2) or SimpleButton (AS3) class to see what was
    available to you.
    (I'm speaking hypothetically, of course. When you've become
    more
    comfortable with the docs, this will often describe your
    initial steps.)
    You want to code up a button symbol, so that means you've
    looked up the
    Events heading for the appropriate class to see what this
    object can react
    to, such as a button click. You've found your event --
    onRelease or
    MouseEvent.CLICK -- and have associated that event with a
    custom function.
    Now, you're on to the next step. In this case, the object
    you're
    looking for is no longer a button. It's a movie clip, because
    you want this
    function to send the main timeline forward or backward.
    Again, your first
    question is always: a) what object am I dealing with? Here,
    it's the
    MovieClip class, so that's where you flip to. Your second
    question is: b)
    what category am I looking for? If characteristics, look up
    Properties; if
    something the object can do, look up Methods; if something
    the object can
    react to, look up Events. In this case, you want to send the
    timeline
    somewhere. That's something the timeline (that is, this
    particular movie
    clip) can do. The things-an-object-can-do category is
    Methods, so that's
    where you flip to.
    You'll see a decent selection in either language, including
    the common
    gotoAndPlay(), gotoAndStop(), and so on. You'll also see
    nextFrame() and
    prevFrame(). Bingo! (Note, both versions of the language rely
    on something
    called inheritance, which behaves just like it sounds. Just
    as we humans
    inherit traits from our predecessors, most classes inherit
    traits from other
    classes up the family tree. In the AS3 docs, you'll see a
    "Show Inherited
    Public Methdods [or Properties, or Events]" hyperlink. If you
    need more
    detail, be sure to click that link. In the AS2 docs, the
    inherited items
    are listed in a box beneath each heading. Any given class may
    or may not
    have inherited items.)
    So you really don't have to wade too far. Think of what
    object you're
    dealing with, then jump to the relevant category.
    > 2. How do I make the next and previous buttons the only
    > controls that will move to the next or previous frames?
    I
    > plugged in the code into a separate as_layer and when I
    > test the scene it just goes through the frames
    automatically.
    Movie clips (including the main timeline) just animate
    naturally -- they
    *want* to move -- so if you want a timeline to stop, you have
    to instruct it
    to. Here again, you'll look up the MovieClip class and,
    because you want to
    find out how to *do* something (how to stop this movie clip),
    you'll jump to
    the Methods section. Sure enough, there's a MovieClip.stop()
    method.
    In frame 1 of your main timeline, simply type stop(), and
    that'll do it.
    The reason it works is because you're invoking a MovieClip
    method on a
    MovieClip instance -- the main timeline. If you wanted to
    stop a movie clip
    symbol, you'd have to give it an instance name, then invoke
    the method on
    that particular instance, like this:
    myMovieClip.stop();
    ... in which case, myMovieClip is the instance name, and this
    clip happens
    to site in the same timeline as this code appears.
    Alternatively, you could enter the timeline of that movie
    clip and
    simply put stop() in its own first frame. That would do it
    too. In either
    case, you've invoked a MovieClip method on a particular movie
    clip. All you
    ever need is an object reference (implicit, because you're in
    that object's
    scope) or an instance name (or a variable that, by some other
    mechanism,
    refers to a particular object) and then you're set. With that
    reference in
    hand, you simply name the reference, put a dot, then invoke
    the desired
    property, method, or event.
    In the case where you simply invoke stop() on the main
    timeline, you
    *could* reference the main timeline directly, like this:
    this.stop();
    The "this" keyword is a special reference that refers to
    whatever scope
    its in. Because your code appears inside a keyframe, its
    scope is the movie
    clip in which that keyframe appears, therefore "this" -- in
    that context --
    refers to that movie clip. But as I showed earlier, you can
    also simply
    leave off the prefix object reference because Flash will know
    what you mean
    (that is, which movie clip you mean).
    Eventually, when you're more comfortable, you'll reference
    instances of
    other kinds of objects, such as sounds, text formatting
    objects, and more.
    In those cases, your object reference -- an instance name, or
    a variable --
    will act the same way, but you'll only be able to invoke
    functionality from
    the relevant class.
    If you have Sound instance, for example, you couldn't do
    this:
    mySound.gotoAndPlay(15);
    ... because sounds don't have timelines, and the Sound
    class's Methods
    section doesn't feature a gotoAndPlay() method. And that
    totally makes
    sense, right?
    > If you have a beginner's guide to actionscripting,
    focused
    > on AS3, I will buy it today.
    I'm happy to keep answering your questions here, but yes, I
    do have a
    few books you might be interested in. If you're using Flash
    CS3, you might
    consider Tom Green's and my Foundation Flash CS3 for
    Designers (friends of
    ED) (
    http://tinyurl.com/2k29mj),
    and if you're using Flash CS4, you'll want
    the current version of that book (
    http://tinyurl.com/5j55cv).
    Bear in mind,
    these are "foundation" books, so they cover all of Flash, not
    just
    ActionScript. Still, there's tons of ActionScript in either
    one
    (exclusively AS3, by happenstance), and we've received
    positive feedback on
    the ActionScript Basics chapter, in particular.
    I also recently finished an AS2-to-AS3 migration book for
    O'Reilly
    http://tinyurl.com/2s28a5),
    but that one may not be especially useful for
    you, because it focuses more on developers who have a basic
    understanding of
    AS2 but feel bewildered when it comes to AS3.
    There's also my blog, (quip.net/blog), which has tons of AS2
    stuff, and
    is slowly growing new AS3 content. One of my co-authors for
    the O'Reilly
    book, Rich Shupe, co-authored an ActionScript 3.0 book
    specifically for
    beginners, so take a look, read the reviews, and see if the
    publisher offers
    sample chapters. They often do, and that's usually a good
    indicator -- to
    me, anyway -- of how a particular author's style gels (or
    doesn't gel) with
    your particular learning style.
    David Stiller
    Contributor, How to Cheat in Adobe Flash CS3
    http://tinyurl.com/2cp6na
    "Luck is the residue of good design."

  • Mapping enter and esc to ok and cancel buttons

    Hi,
    Does java's fine API offer any method of mapping Enter and ESC to OK and Cancel buttons in a customized JDialog?
    The current way I'm doing it is through a brute force of adding a KeyListener to every component in the dialog box (in an automated way), is there another way?
    Any suggestions would be appreciated.

    Uh oh, should I be scared because he knows more about
    Swing than just about anyone?
    Yes. Because if you really get stuck then he won't help you and then you are doomed.
    If anybody was rude it was him, and if anybody is an
    idiot it's you. See how easy it is to make claims
    without providing any reasons or rationale?Reasons and rationale have been provided but I guess you didn't grasp them the first go around so here goes.
    1) You were impatient
    You waited 30 minutes before whining and bumping. That is impatient. Nobody is being paid to deliver answers to you.
    2) You posted in the wrong forum.
    This is not the Swing forum is it? No it is not.
    3) You should learn to search
    If you had searched for even up to 15 minutes (and you wouldn't have needed this long) then you would have had your answer in half the time. Searching saves YOU time.
    4) You were rude
    When the facts (and please note the use of the word "fact" not personal opinion) above were pointed out to you then you were rude.
    Finally the "you are an idiot" problem. I will give you this is the most subjective of the lot although given that you cannot dispute ANY of the above facts (although you seem to be trying and that's helping to make the case that you're quite the idiot) that's really not saying much.
    However, it seems to me that if Person A wants the assistance of Person B (who is a valuable resource of information for person A and others) it does not seem wise for Person A to be rude to person B. So in the case of Person A who is rude to Person B who they are relying on as a free resource we can make the assertion that Person A is an idiot.
    In case you couldn't follow that you are Person A.

  • Hide Ok and Cancel buttons in a Popup

    JDev 11.1.1.5.0
    I am using an <af:popup> component. By default, when I run it shows Ok and Cancel buttons at the bottom. I don't want these two to be shown.

    Yes. I just found it right after posting this. So unmarked this thread as a question.

Maybe you are looking for