Play the sound gun while the button is pressed.

Hello

I want my uzi sound to play when you press space and I know how to do this, but

I want the sound to play for 2 images then the same sound should play again and stop the first of them starts from the beginning, when the space is pressed. In the opposite case they overlap only eachother and that sounds weird.
And when the key is released the sound that is already beginned should play in it is Finnish.

Thank you.
Sorry for my English.

Post edited by: antworker

I assume that the code is in a loop.

Create a new movieclip, attach your sound uzi in his first first image, set the mode of synchronization of your sound to convey to a 2nd non-key and drag the movieclip on the stage of the timeline that contains your code.  assign the movieclip an instance name, for example uzisound_mc.

You can modify your code to:

if(Key.isDown(Key.SPACE)){uzisound_mc.play()} else {uzisound_mc.stop();}

Tags: Adobe Animate

Similar Questions

  • Note the time that the button is pressed

    Hi all! I am a beginner in Labview and I encountered a problem. I want to know how long the button is pressed, but I have no idea how to go about do. I know how to find the total of the delivery of the program by using the flat sequence and time of the last image to subtract away the time of the initial image. But I have no idea how to do to add to the audit whether the button is pressed and gain time. My main goal is to find the time the button is pressed (from push button until the exit button) and the total program, run time.

    Please help me! Thanks to all in advance!

    Hi 8212349829,

    You can store values in a shiftregister of an iteration to iteration.

    You should not use this big a timeout. Do not forget that the timeout again with all the other events of 0.

    Time is at a time when the event occurs (it should be the internal counter that starts with the start-up of the pc). Type contains information about the type of event, click with the right button on the output and select create constant, control or indicator to see the possible values.

    Mike

  • How can I get caps lock display to display in the bar when the button is pressed the task. It allows to show.

    Display of CAPS LOCK in the taskbar when the button is pressed. What HE show.why not now?

    Hello

    ·         What operating system do you use?

    ·         What is the brand and model of the computer?

    ·         If you are using a desktop computer, what is the brand and model of the keyboard?

    ·         Were there recent changes made on the computer before the show?

    You receive notification of Caps lock and Num lock ON or OFF on the taskbar only if the keyboard manufacturer's software has been installed. You must contact the manufacturer of the software.

    If you have the software already installed, but always the notification is not invited on the taskbar, then you can try to uninstall the software program and feature and put it back in the rear seat.

    Link: Uninstall or change a program

    http://Windows.Microsoft.com/en-us/Windows7/uninstall-or-change-a-program

  • Play/stop sound on a single button (AS3)

    Hello

    When you click the first button, it should start the song, when you click a second time on the sidelines, it should stop the song. How can I do that with actionscript 3?

    concerning

    Simon

    A very basic example:

    You would need 3 var:

    private var _sound:Sound;
    private var _soundChannel:SoundChannel;
    private var _soundChannelPosition:Number = 0;
    

    Then, create a sound:

    _sound = new Sound(new URLRequest("some.mp3"));
    

    Stop/play the sound when you click on:

            private function click(e:MouseEvent):void {
                if(_soundChannel == null){
                    _soundChannel = _sound.play(_soundChannelPosition);
                } else {
                    _soundChannelPosition = _soundChannel.position;
                    _soundChannel.stop();
                    _soundChannel = null;
                }
            }
    
  • If the button is pressed, validation

    Hello

    I have the form of data entry invoice where I enter all the necessary values.while the button "submit" on the form I want to check if the date of the invoice is greater of 30 days or not? If it is less than 30 days I have to display message saying cannot present Bill because the invoice date is less than 30 days only.

    I have to create a process of pl/sql and assign it to the button or how it works?
    How to apply this conditional logic in pl/sql? do I have to declare a Boolean variable in pl/sql?

    Here are my requirements:
    (1) when the button pressed and the invoice date is less than 30 days, just display error message and do nothing and creates a branch to the same page
    (2) when the button pressed and the invoice date is more than 30 days, store all the values entered in the database and the branch of the
    to the success page.


    Thank you
    Manoi.

    Published by: user518071 on September 11, 2009 11:00

    Hi Eric,.

    Assuming that you have created your form using the wizard page, you should already have a process of "process row of...» "that records the data and a branch that redirects the user to the page of your success.

    The only thing you need to do, is to add an element of Validation on your page that checks the entry date.

    On the definition of your page, click the 'Create' in the section of postings and use the following settings:

    1 - item level validation - click Next
    2 - Select your item of page - click Next
    3 PL/SQL - click Next
    4 - function returning a Boolean - click Next
    5 - validation name: (enter a meaningful name for you - for example, P1_DATE_VALIDATION)-click Next
    6 - validation:

    BEGIN
     IF TRUNC(SYSDATE) - TO_DATE(:P1_DATE,'DD/MM/YYYY') < 30 THEN
      RETURN FALSE;
     ELSE
      RETURN TRUE;
     END IF;
    END;
    

    (NOTE: replace P1_DATE with the name of date and replace "DD/MM/YYYY' with the date format string used)

    Error message: (enter here your error message if the date is too recent) - click Next

    7 - what key: (select your submit button) - click on create

    Then, when you enter the data and send the page, this validation is performed. If the date is too recent, the validation fails and the Directorate-General and the "process of line of...» ' are not executed - the user is simply returned to the page that displays your error message now.

    Andy

  • How to disable the left Alt key as the taskbar pop-ups when you try to play the game then press the left Alt key

    Original title: left disabling Alt Taskbar pop-up Menu window

    Hello

    I have problems with the taskbar. Every time I tap my left Alt key twice, then left Alt + (1-6) a context menu appears. It's the same thing as right click a tab on your taskbar for anyone who is struggling to recreate my problem. Right Alt does not cause this problem.

    It is very bad news for me as the focus of changes in context menu of what I do. I play video games in my free time and have game left keybinds for Alt + 1,2 & 3. I will support on these keybinds quickly all while playing. This will cause the context menu for taskbar activate and I'll be tabbed out of my game.

    I searched for weeks trying to solve this problem and I have not found any that is worked. I tried to disable the jump lists. I tried to change the registry for a right click on the taskbar. I saw patches of this forum and several others and nothing I found works.

    Recently, I contacted Microsoft to the it Department by phone and said they knew exactly how to fix this and if I have to pay $50 to one of their technicians have to connect to my computer that they would have this problem corrected in the blink of an eye. I find this limit extortion honestly and I hope someone had this problem and can provide steps on fixing it.

    Thank you

    Ryan LeBlanc

    Thank you for your answer, but the answer you provided is for a question that is different from what I was living. Your link has solved a problem with someone who has the taskbar pop up when their mouse/cursor passes over. My problem was to have a drop down of the taskbar appear whenever I type left Alt + 1/2/3/4 etc.

    However, I have since fixed. If there is anyone else out there with this problem, it's a hardware problem with my keyboard. I couldn't get anyone to recreate my problem by pressing left Alt + 1, etc. (although you can recreate my problem to click with the right button on a program in the task bar), so I reset my left Alt key. After resetting my left Alt key this problem does occur more (yay)

    Thank you

    Ryan LeBlanc

  • Slide advances when the button is pressed only

    : confused
    I placed a button 'next' on my slides and don't want the user to be able to move the blade until the audio is playing... How can I do this? Is it possible to disable the bar of Captivate that appears at the bottom of the published presentation, or is there a setting somewhere?

    Thank you

    Thanks it worked perfectly!

  • using the key to toggle the button and retain a mechanical Action

    I'll put in place to control the race of a stepper motor and I have 2 buttons for jogging forward and backward to jogging. These buttons have the mouse down and mouse events sends commands to the motor controller. The mechanical action of the buttons are set to release the latch.

    I would also use the previous Page and Next Page on the keyboard to toggle these keys. But I would like the button to act in the same way that the mouse when the button is pressed and held the button remains pressed and released with the release of the key.

    However when I press on and press and hold the button continues to activate / deactivate. Is has something to do with the repeat button, but I don't know how to operate it. Any advice would be appreciated.

    I've attached an example of how I started. The mouse down press the reverse button opens a dialog box, but the key does not work and when the key is held down the button flashes. Page Up for forward and Down to the opposite Page.

    Concerning

    Terry

    Simply use another event and manages press button from the bottom to the top in the same way. The button using local variables while active, you can switch to event.

    I don't know why you use latch action. Why not with the button until this that released and value change events?

  • Problem of setting a value for the hidden item click on the button with processes action or pl/sql dynamic

    Apex 4.1

    Oracle 11g

    I have a page which consists of a main and several sub-regions area.  I have a pl/sql process in after the header SET_DISPLAY(:P400_DISPLAY:='MAIN';))

    Three subregions have a contional show where P400_DISPLAY = STORE.  It works in the hiding of the sub regions.

    Now, I want to change the value P400_DISPLAY to the STORE to show the subregions when I hit a button.

    I tried to create a dynamic action for the click on the Add button, but get the following error:

    The selected button uses a model of 'button' that does not contain the #BUTTON_ID substitution string #.

    I went to the models and found:

    Substitution strings

    Top

    Substitution strings are used in sub models to reference the value of the components. This report details use of string substitution for this model.
    Substitution string Referenced De Description
    #LINK #.YesModelTo be used in an attribute "href".
    #JAVASCRIPT #.NO.To be used in an "onclick" attribute
    #LABEL #.YesModelButton label
    #BUTTON_ATTRIBUTES #.NO.The attributes button
    #BUTTON_ID #.NO.ID generated button will be ID either the static button if defined, or if not will be a generated ID internally in the format 'B ' | [Internal ID of the button.

    I then tried to create a page process, pl/sql,: P400_DISPLAY: = 'STORE '; If the button is pressed.  The action of the button is submit page. However, it does not change the value of P400_DISPLAY and the subregions are hidden.

    Suggestions please on how to fix the template or change the value of P400_DISPLAY?

    The question of the root, it's that, even if you change the value of the element of your page, it is not visible to other areas of the page until it is in the session. Thus, any other action based on the value of the element of your page. the visibility of a control, a report based on the value of the item, etc. will be affected by changing the value of the item page until it has been changed in the session. Even after that, items are stored in the session, then you must do something to influence the revalued value. To see the effect of this, observe that your page will load and assesses the value of the element of your page, it sees which is the "MAIN" and mask areas. However, he didn't reassess after that.

    Then; your choices for this value set at the session are send the page, or use JavaScript to set the value in the session. If you use the latter, you will have to do extra work to make visibility tests be re - run, so, let's stick with the submit method.

    What you did above sounds correct to do this but, there are a lot of decisions, that you might have done that may have caused things to do not occur in the correct order.

    First of all, we will confirm that what I describe above is your problem. From the development environment, load the page, click on the button to change the value and submit. Now, click on the link marked the Session. He is always at HAND? If the answer is "Yes"; That's your problem.

    Let's start with your calculation after the header. You set it to * only * run if the current value of the element of your page is null? If this isn't the case, it's your problem.

    Load the Page-> Item set to 'Hand' by calculation-> click on the button--> Item set to STORE-> Submit-> Page Load-> point by calculating the value 'hand '.

    See the problem?

    Assuming that's not the question, you have created a branch to the same page, right? What is your process for the branch point? Is it * after * Validation, computation etc.? Because if not, you are not changing the value before that didn't get to submit.

    I bet that's the first question, but take a look at these.

    See you soon,.

    -Joe

  • Click the button to read Animation reverse!

    Hi guys,.

    I need some help here. I hope you experts out there can give me an example.

    I have therefore 3 buttons.

    Click on the button 1. He will play the animation.

    Click on the button 2. He will play the reverse animation on 1 button and then play the animation press 2.

    Click on the button 3. He will play the reverse animation the button 2 and then play the animation the button 3.

    Click on the button 1. He will play the reverse animation press the 3 button 2 and then play the animation button 1.

    Thank you.

    Here is an example in CC version 2 build 2.0.1.268

    https://app.box.com/s/5tofguocivejysber15z

  • Press the button on parallel port signal to trigger a process

    I just need to connect a pushbutton on the parallel port to set it as a signal of the beginning of a process.

    When the button is pressed, labview runs a process.

    Kindly help me how to do this, the prayer of wiring

    Lines of data to use as input Some parallel ports can be configured for use as inputs data lines. This depends a lot on how the manufacturer has designed the parallel port. With some models the data lines can be read in the same way that we read the lines of control, leading them to logic high, so they will take the value of an external signal. However, most parallel ports require that you set the bit of sense for entry. It is bit 5 of the control register (base + 2). If the port is capable of it, setting the high bit for effect to sort of lines-State so it can be driven on the outside. Sometimes it is also necessary activate the 6 bit high or low. However, it is noted that some manufacturers actually block those bits so that the software can edit them. An example is shown below in Figure 7.

  • Disable the button by using the node property

    I used a button which has the button is pressed again and again, I want this button to get disabled when needed up to 6. I used a business structure that compares the value when it is greater than 6, it gets the true value and the structure of the case must turn off the button, but I run the code the button is already disabled.

    Can someone please guide me where I made mistake.

    Kind regards

    Ather

    In the case of range? and downstairs is the two True in any given iteration of the loop, you will write to the serial port twice with only about one millisecond between the Scriptures. Is that what you want? The remote device can handle two sequential writes?

    The code in the two structures case is identical. It is usually better to make a Subvi of duplicated code. Then if ever it needs to be changed, simply change it one place.  If you use the decimal string number, simply two cases on the internal structure of the case.

    It is not necessary to have two close functions of VISA for the same session. In fact one of them always generates the 1073676418 warning: the specified object reference is not initialized.

    This is a cleaned version a little with most of above changes implemented.

    Lynn

  • How to save the data to the new file, when you press the button

    Hello.

    Run a program that reads data recorders seconds and displays a trace on the screen.

    What I want, is that when I press a button, the program will ask for a file name and begins to record data to the file, and continues to do this as long as the button is pressed.

    When I press the button again, the program asks the name of the file again, so I can select a new file to write.

    I've included a simplified version of my program that works by asking the file name at the beginning.

    How can I change the program it starts a new file every time that the key again.

    Kai,

    I changed the example that I gave you to LV8.0, but I have never used the option 'Save for the previous version' before, so I don't know if it will work.

    I have combined the start and stop of recording in a single button (just change the text to all what you need) and I used the 'value' property to pass the path between cases. The path can be formatted as you have in your version, don't forget to use the string conversion function filepath.

    Just in case where it doesn't work on your version of LV I've attached a screenshot of the block diagram.

    Hope this helps, let me know if you have more problems with this.

    Easy.

    Darren.

  • Impossible to click on the buttons for the timed loop.

    Hello!

    I have a loop that is timed with a pace set by the user. And when the loop is running, I can't push any button of my GUI to stop it...

    I have to wait until a mistake or I stop the race.

    I can't put the diagram is too big and I think I don't have the right, but you have ideas?

    Ask me for more details.

    Thank you

    bejard wrote: timed loop is just in a structure of the event and I put 10 ms or 100ms.

    The program runs correctly (with this loop delay of 10ms/100 ms) like in the beginning, but I can't push any button or even change the tabs during the loop.

    You shouldn't have long extensions inside the event.  Which is supposed to stop your timed loop?

    I think that you have the option "Lock the front until the end of the occurrence" lit.  It will not press anything, until the end of everything for this case (including the timed loop).

    According to my experience, using a loop timed in a Windows system is a complete waste and often adds more overhead and questions.  Instead, I really think you need to use a State Machine.  When the button is pressed, you tell your state machine to move to the State the code inside your timed loop tracks.  You can use the State with the structure of the event to time your loop.  If you can go behind your state of event to your processing loop structure.  Just set the timeout on the structure of the event at any rate of loop you really want to.

  • change the value of the button cluster

    Hi all

    I wrote a program that has 5 poles and all groups contain a STOP"" button. the program can stop when the button is pressed.

    When I press the button, the value of the button goes to False and else False. I want to come True. so I tried using the 'value' property and set the value "False".

    but it is still true.

    I use event structure to see that the value changes. and set to 'Stop the value changes' all buttons in a single event.

    How can I change the value of the false button?

    Thank you

    Ritesh


Maybe you are looking for

  • Cannot select "Wake on Lan" option in Vista - Qosmio G20

    Hello If I go to Device Mgr/network/IntelPro100VE/properties/adapter management, I can't check the box for "allow this device to wake the computer". The box is empty and greyed out. (The Qosmio is connected to a LAN at home). 1 could someone with a G

  • The USB-6212 Setup error, invalid data

    Hello I am using a USB-6212 with LabVIEW 8.5.1 and DAQmx 8.7.1.  When I plug the USB cable in I get the prompt to install the drivers for it.  But I get a message that says that "these data are incorrect" and that the appliance has not been installed

  • HP dv6-6102ax Memory Upgrade

    I have a HP dv6-6102ax running windows 7 Home Premium 64-bit, a 2 x 4 GB modules of RAM installed (@ 1333 MHz) total of 8 GB of RAM. Here is the link of my spec: http://support.HP.com/us-en/document/c02910560 The link above shows in detail the charac

  • order of color toner

    I have a CP1525nw I love a little. But recently, I have lack of toner and had to replace the cartridges. Somehow I seem to have screwed up and removed the existing cartridges before installing new and am now unsure of the order that the cartridges go

  • How can I fix the green screen on some videos. 15 - g018dx

    Please tell me how to fix the green screens on the videos.  It's on utube and facebook.