Button: On 1st Click do this, on 2nd Click do that, etc

Hello all,
I have a button, and I want to have certain actions attached
to this button depending on how many times someone has clicked on
it.
Pseudo-code in my head would be something like this:
if this is frame 1, then
if button click is first click, play audio file #3
if button click is second click, play audio file #2
if button click is 3rd click, advance to next frame
end if
Is this possible in Flash using ActionScript? Am I thinking
about this the correct way?
Thanks in advance!

No problem. Just initialize a variable to keep track of the
clicks. Then on button click, check the value of the variable and
act accordingly (including incrementing the variable).
Hope that helps!

Similar Messages

  • Over the past week the Mac mail app on my iPad 2 has become locked in vertical orientation and only in the orientation such that the bottom is orientated toward the menu button. Any advice? This is the only app that seems to have been affected.

    For the past week or two, my Mac Mail app for my iPad 2 has been stuck in vertical orientation. This is the only app that is similarly affected. Moreover, it will only orient itself such that the bottom is toward the menu button on the iPad.  Please advise if you have a solution.

    Try closing the Mail app via the taskbar and see if it rotates when you re-open the app : from the home screen (i.e. not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work also do a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Tag_relatedproducts image jumps on 1st click & then links to correct image on 2nd click

    tag_relatedproducts image jumps on 1st click & then links to correct image on 2nd click - strange coding glitch! Should link to correct image on 1st click (& not jump) http://meluka.worldsecuresystems.com/bedroom/Drawers/chest-of-drawers-42 Was functioning correctly

    It looks like those related images are being affected by your zoom script that lets you zoom the main product image.  In your page template or page you have this code:
    jQuery(document).ready(function(){
        jQuery('div.image img').wrap('<span style="display:inline-block"></span>').css('display', 'block').parent().zoom({on:'click'});
    You likely added this to make your main product images capable of zooming.  I bet this all started acting weird when you put the zoom effect in.  Basically, your jQuery above is saying, "Find any IMG element in my DIV with the class of "image" and do some stuff like wrap a span, update the css and execute the zoom behavior on the image's parent element"
    The problem is that your related products are inside your div.image container so that jQuery call is affecting those images too.
    You have two options:
    Move your {tag_relatedproducts} tag outside or after the div.image. That should solve it.
    OR update your zoom image jQuery statement above from jQuery('div.image img") to jQuery("#zoom img") which is more specifically targeting the #zoom link which should only have the main product image in it
    Good luck!

  • Firefox frequently freezes. I can't click on anything (tabs, menu buttons, bookmarks, etc.) The only button that works is the upper right close button which when clicked will ask me if I want to "save & quit." Then I have to restart. Help fixing this?

    Frequently when I use Firefox it will all of a sudden freeze. It no longer will accept any user input from the keyboard or mouse. I cannot click on any of the open tabbed pages I have or on my bookmarks or any of the menu buttons. Nothing works. When it happens if it is loading a page it will just freeze in the middle of loading it. I've tried to see if the freezes are caused when it loads certain types of content (java, flash, etc...) but there seems to be no rhyme or reason as to when it happens or with what types of pages. I cannot find a pattern. The ONLY button that works is the close button in the upper right hand corner (X). I can click on that and then Firefox will prompt me with it's regular message asking me if I want to save and quit, quit, or cancel. I'll hit save and quit and then reopen Firefox. It opens my tabs and if I was in the middle of a post it generally will still remember the text I've typed (except Facebook!).
    It's beginning to drive me nuts and I'm really hoping to find a fix to this.

    You will also notice that your shift key will be emulated. Meaning that keys you will try to press will press but they will act like you are pressing the shift key when you are doing them.
    Try this, minimize the firefox window by pressing the tab on your taskbar. After doing that maximize it again. You will magically be able to click any link on your page. When you navigate to a new page however, the entire situation will start all over. My only remedy is rebooting and hoping it doesn't happen again soon.

  • When user clicks on button the document linked to this path must be display

    hi sap masters,
    i am developing a screen prog in which i have a requirment which is i have pushbutton called WEB.
    When user clicks on button the document linked to this path must be displayed
    ex :  www.google.com
    how can i display can i have some info please.
    thank you,
    pasala.

    Hi,
    Kindly go through the below programs....
    RSHTML01                       Demo for HTML Control: Use as general WWW browser
    SAPHTML_R3HTTP_DEMO            Demo for HTML Control: Use as general WWW browser
    SAPHTML_UI_DEMO                Demo for HTML Control: Use as general WWW browser
    UPWB_HTML_DEBUG                Demo for HTML Control: Use as general WWW browser
    Hope it helps.
    Regards
    Arbind

  • While trying to restore os x and erase content, some problem about voice software came up and the computer asked me to restart and try again by clicking restart button. When I did this, the machine went to a gray start up screen and will not progress.

    While trying to restore os x and erase content on my MacBook pro, some problem about voice software came up and the computer asked me to restart and try again by clicking restart button. When I did this, the machine went to a gray start up screen with an apple and will not progress. I've waited more than 30 minutes and tried restarting again by holding the power button. Also, restore cd 1 will not eject so the computer will no longer move past the gray screen with spinning circle. Restore CDs had never beeused and were still in packaging in the original box. Ran hardware test just to check, and it came back as normal. Now what? I live nowhere near a genius bar :(

    computer asked me to restart and try again by clicking restart button.
    That's called a kernel panic...
    Since the install disc won't eject, try starting up while holding down the C key. If the Mac won't boot while holding down the C key, try ejecting disc by either holding down the mouse while starting up or holding down the Eject key while starting up.
    Try booting from your install disc so you can run Disk Utility in case the startup disk needs repairing.
    Insert your install disk and Restart, holding down the "C" key until grey Apple appears.
    Go to Installer menu and launch Disk Utility.
    (In Mac OS X 10.4 or later, you must select your language first from the installer menu)
    Select your HDD (manufacturer ID) in the left panel.
    Select First Aid in the Main panel.
    (Check S.M.A.R.T Status of HDD at the bottom of right panel. It should say: Verified)
    Click Repair Disk on the bottom right.
    If DU reports disk does not need repairs quit DU and restart.
    If DU reports errors Repair again and again until DU reports disk is repaired.
    When you are finished with DU, from the Menu Bar, select Utilities/Startup Manager.
    Select your startup disk and click Restart
    While you have the Disk Utility window open, look at the bottom of the window. Where you see Capacity and Available. Make sure there is always 15% free space.
    What is a kernel panic
    Mac OS X Kernel Panic FAQ
    Resolving Kernel Panics

  • I have to always sign into my email when I click the stay signed in button, how can I overcome this issue?

    I installed email notifier, which puts an envelope down in the lower right hand corner (along with the date, etc.) and then all I had to do was click on that and it would take me to my in box. Recently, I have to log in each time I want to open my email, even though I tell to keep me signed in. How can I correct this and go back to what it was.

    I too would like to know why this is? It seems to have been only the last few months where I have this issue.
    Anyone?
    Cheers.

  • How can I turn-off the apps which I have opened once in ISO 7.0.2. In previous version of ISO it was easy to turn- the opened apps by double clicking on home button and then click and hold on respective apps then click on cross sign.

    How can I turn-off the apps which I have opened once in ISO 7.0.2. In previous version of ISO it was easy to turn-off the opened apps by double clicking on home button and then click and hold on respective apps then click on cross sign but in this version I could not do so and my iPad appears slower.

    Close inactive apps
    1. Double tap the home button to bring up the multi-tasking view
    2. Swipe the app's windows upwards to close
    3. The app will fly off the screen

  • Why does clicking on the Firefox button or right-clicking bring up either a very small thumbnail or a zoomed in view of the menu options?

    Whenever I click on the Firefox menu button or right-click on a hyper link within the broswer, instead of a menu of choices, I am presented with either a tiny thumbnail of the page I am on and the menu expanded (also very tiny). After moving the mouse, the thumbnail disappears and becomes a hyper-zoomed display of the menu that should have displayed. The zoom really looks like what an assistive-reading display would look like.

    hello, please try [[Upgrade your graphics drivers to use hardware acceleration and WebGL|updating your graphics driver]] (this should be the right link for your model & system:
    http://support.amd.com/us/gpudownload/windows/Pages/radeonaiw_vista64.aspx), or in case this doesn't solve the issue, disable hardware acceleration in ''firefox > options > advanced > general''.

  • I have a 2nd generation iPod that only displays an image of the cord, and an arrow to connect to iTunes. I've done this and it says it needs to be restored. Tried that but I get an error: 1611.  Any suggestions?

    I have a 2nd generation iPod that won't do anything but display the Apple logo for a brief second then an image of the cord suggesting it should be connected to iTunes. I tried to restore it via iTunes but I get an Error: 1611. It does nothing else.  I tried turning off using both buttons...nothing. Any suggestions?

    Error 1611: This error may indicate a hardware issue with your device. Follow the steps in this article. Alsoattempt to restore while connected with a known-good 30-pin Dock Connector cable, computer, and network to isolate this issue to the device. The MAC address being missing or the IMEI being the default value (00 499901 064000 0) can also confirm a hardware issue. Out-of-date or incorrectly configured proxy or security software, such as FoxyProxy, can cause error 1611. To troubleshoot third-party security software, follow these steps.
    Above from:
    http://support.apple.com/kb/TS3694#error1611
    Note it could be a hardware problem

  • Platform is iMac OS X 10.8.5 and iPhoto 9.4.3, signed in to iCloud and selected Photo Stream. Got an invite via email to subscribe to a Photo Stream and when I click on Subscribe to this Photostream, it tells me that I need specs that I already have.

    Platform is iMac OS X 10.8.5 and iPhoto 9.4.3, signed in to iCloud and selected Photo Stream. Got an invite via email to subscribe to a Photo Stream and when I click on Subscribe to this Photostream, it tells me that I need specs that I already have.

    Thanks for responding. When I open the email and click on Subscribe to this Photo Stream, this is the message I get:
    To subscribe to Pamela Mccormack’s “Baltimore Zoo” photo stream on your iPhone, iPad, iPod touch, or Mac, open your invitation in the Mail app, and click the Subscribe button in the message. 
    To subscribe you need to be signed in to iCloud on: 
    an iPhone, iPad, or iPod touch with iOS 6 or later, or
    a Mac with OS X 10.8.2 or later and iPhoto 9.4 or Aperture 3.4 or later
    So I have Mac OS X 10.8.5 and iPhoto 9.4.3 installed.

  • HT1476 i-phone3 wont recharge; initially home button wouldn't work. Applied the 'auto-touch button thing' via settings. This worked until I ran out of battery life. Now it won't recharge either via laptop (usually does) or wall switch. Just a blk screen.

    i-phone3 wont recharge; initially home button wouldn't work. Applied the 'auto-touch button thing' via settings. This worked until I ran out of battery life. Now it won’t recharge either via laptop (usually does) or wall switch. Just a blk screen.

    In general theory, one now has the Edit button for their posts, until someone/anyone Replies to it. I've had Edit available for weeks, as opposed to the old forum's ~ 30 mins.
    That, however, is in theory. I've posted, and immediately seen something that needed editing, only to find NO Replies, yet the Edit button is no longer available, only seconds later. Still, in that same thread, I'd have the Edit button from older posts, to which there had also been no Replies even after several days/weeks. Found one that had to be over a month old, and Edit was still there.
    Do not know the why/how of this behavior. At first, I thought that maybe there WAS a Reply, that "ate" my Edit button, but had not Refreshed on my screen. Refresh still showed no Replies, just no Edit either. In those cases, I just Reply and mention the [Edit].
    Also, it seems that the buttons get very scrambled at times, and Refresh does not always clear that up. I end up clicking where I "think" the right button should be and hope for the best. Seems that when the buttons do bunch up they can appear at random around the page, often three atop one another, and maybe one way the heck out in left-field.
    While I'm on a role, it would be nice to be able to switch between Flattened and Threaded Views on the fly. Each has a use, and having to go to Options and then come back down to the thread is a very slow process. Jive is probably incapable of this, but I can dream.
    Hunt

  • MD04 - no release button available when clicking on purchase requisition

    Hi experts,
    A purchase requisition has been created that needs to be released.
    This can be done via ME54 which works fine. Another possibility is via MD04 - click on the purchase req. number. A pop-up occurs and there should be a release-button (green flag).
    My question:
    What might be the problem, if the same user can release a PR by using ME54 but not by using MD04? He doesn't see the release button when he clicks on the PR-number within MD04. 
    I checked the user's roles and profiles which are the same as for another user where both ways work fine.
    Release procedure without classification is used.
    Thanks in advance and regards,
    Ina

    the user uses a different navigation profile.
    assign the purchasing navigation profile in MD04 via menu Environment > navigation profile

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

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

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

  • Button can be clicked only 4 times within 24 hours?

    I want to create a JSP page which has one button. Requirement of project is that button can be clicked only four times within 24 hours. After 24 hour it should again allow to click button for max four times. How can I do this? Please help.

    Hi,
    In our project we implemented the same functionality,
    This can be simply achieved by object serialization.
    i.e you can store object with two attribute say clickCount , startDate and endDate.
    you should have seperate thread which does activate and deactivate operations on button with buttonactivateFlag.
    when button is clicked you should check for flag and do accordingly, if active increment clickCount, else dont allow.
    Thread part: thread update the endDate attribute in object by constant freqency, if startDate != endDate then next day.
    buttonactivateFlag = true;
    startDate = endDate = current date;
    clickCount = 0;
    I hope this will work fine!

Maybe you are looking for

  • Safari hangs and times out on pages with CGI scripts

    I don't know if this is a Safari problem or a system wide problem. I running OS 10.4.9 with Safari 2.0.4. When I try to load a page that begins with "http://cgi." it begins to load but hangs and eventually times out. Has anyone else run into this pro

  • Way to buffer all messages in XI queues

    Hi all, I am searching for a way to buffer all of my incoming and outgoing messages in the queues of XI. I heard a while ago that it should be possible to schedule the queues in XI. Our goal is that all messages that XI (3.0) receives and also all me

  • How to get fieldnames from Select * query ?

    How can I get the fieldnames returned with a SELECT * query ? When I use GetFieldName or GetFieldOriginalName I only get fieldnames of "*".

  • Officejet 6500 duplex printing paper jam

    Every time I run duplex printing, paper stucks inside duplexing unit. It just gets smashed. Is there a solution for that?

  • Using JRUN Datasource from CF

    I am running CF 6.1 on top of JRUN4. I've also have some java code that is packaged in a jar and available for invocation from CF. I would like to use a JRUN datasource from that Java code. Is this possible?