Audio jack play and pause/stop when you press the various buttons

Hi all

I do a simple radio interface and I have 6 buttons which I want to have that specific preset song playing of the button located in the library screening and stop/pause the current song when you press any preset button.

I tried to use the attachSound, with associated identifiers but don't know if it's the right way to go. He plays songs, but does not stop their...

{mc_FM1preset1.onRelease = Function ()}
{if(!this.) Toggle)}
this.gotoAndStop ("release");
radio_FM1. Text = FM1preset1
FM1value = 1

PlayFM1_1 = new Sound (this);
PlayFM1_1.attachSound (FM1preset1_song);
PlayFM1_1.start (0, 1);

PlayFM1_6.pause;
PlayFM1_5.pause;
PlayFM1_4.pause;
PlayFM1_3.pause;
PlayFM1_2.pause;

}
}


}
{mc_FM1preset2.onRelease = Function ()}
{if(!this.) Toggle)}
this.gotoAndStop ("release");
radio_FM1. Text = FM1preset2
FM1value = 2

PlayFM1_2 = new Sound (this);
PlayFM1_2.attachSound (FM1preset2_song);
PlayFM1_2.start (0, 1);

PlayFM1_6.pause;
PlayFM1_5.pause;
PlayFM1_4.pause;
PlayFM1_3.pause;
PlayFM1_1.unload;

}
}

then I tried just to put each piece in its own clip and using this code, but it still doesn't stop/pause the song.

Stop();

{mc_preset1.onRelease = Function ()}
mc_song1. Play();
mc_song2. Stop();
}


{mc_preset2.onRelease = Function ()}
mc_song2. Play();
mc_song1. Stop (1);
}

Does anyone have any suggestions? Any help would be great! Thank you!!!

Basically, I just need to know how to do the supported mc or button to STOP / to PAUSE the song that plays

Thank you!!!

-PAt

the sound class has no property of break.  It has a stop() method, you must use:

{mc_FM1preset1.onRelease = Function ()}
{if(!this.) Toggle)}
this.gotoAndStop ("release");
radio_FM1. Text = FM1preset1
FM1value = 1
       
PlayFM1_1 = new Sound (this);


PlayFM1_1.attachSound (FM1preset1_song);
PlayFM1_1.start (0, 1);
       
PlayFM1_6.stop ();
PlayFM1_5.stop ();  etc.
PlayFM1_4.pause;
PlayFM1_3.pause;
PlayFM1_2.pause;
       
}
}

}
{mc_FM1preset2.onRelease = Function ()}
{if(!this.) Toggle)}
this.gotoAndStop ("release");
radio_FM1. Text = FM1preset2
FM1value = 2
       
PlayFM1_2 = new Sound (this);
PlayFM1_2.attachSound (FM1preset2_song);
PlayFM1_2.start (0, 1);
       
PlayFM1_6.pause;
PlayFM1_5.pause;
PlayFM1_4.pause;
PlayFM1_3.pause;
PlayFM1_1.unload;
       
}
}

Tags: Adobe Animate

Similar Questions

  • PowerEdge T410 won't do anything when you press the power button / stop.

    My work has recently retired this t410 server. It worked without any problems when he was arrested. I had to remove and destroy the hard drives from the system. After that, I was allowed to bring home for my own use. I installed a new sata drive and plugged into the power supply and a free sata port on the motherboard. I get nothing when I tried to boot the system. This version has the unique power. Power light only lights up when you press the test button. System fan is going at full speed, but stops when you release the power button. Also on the control panel lights 1,2 and 4 and HDD power on and turn until the test button is released. There is a single green light lit on the motherboard, while it is plugged. Apart from that, I have no response when you press the main power button. Can anyone tell how to try to get it up and running again.

    -Who-

    I have not received the answers more so I think that this issue is ignored. So I'll let everyone know what finally happened. I solved my problem after a lot of electrical testing. I found a diagram of the arrangement of the power dell power supply pins and I made myself the best possible meter test. After several rounds of tests, I found several pins that did not have the right voltage. I bought a new power supply. I installed and replace everything. I plugged into the system and it auto fed on itself. I loaded from an OS and it works perfectly.

    Problem solved

  • Hi, actually I want the program stops when you press the stop button. but the problem is the program is runing in loop only he doesn't return tile view deleted complete execution of any body can help me for this.

    Hi, actually I want the program stops when you press the stop button. but the problem is the program is runing in loop only he doesn't return tile view deleted complete execution of any body can help me for this.

    Here

  • Why Satellite Pro A300 does not start when you press the power button?

    Suddenly my new Satellite Pro A300 does not start correctly when you press the power button. The situation is the following: when I press the power button is displayed the opening of Toshiba (Leading Innovation) and the disappers image quickly. Then there is a black screen for about 30 seconds. There is a rectangular frame with the text Microsoft Corporation under. And nothing happens however long wait.

    In order to get with the trial starting I then shut down the computer by pressing the power button until the computer turns off. ("The hard way to close")
    Now, I press the power button shortly to turn on the computer. Then, the computer starts normally with the photo to open Toshiba and after a few seconds, I wonder to open the computer in safe mode or in normal mode. I now choose to open in normal mode and the computer opens normally and is ready to work.

    What should I do to get a normal departure procedure?

    When the laptop starts normally (after choosing normal mode) stop your laptop properly using START > shut down option. Next launch should be normal.

    When the OS is moving towards the low irregularly will always ask you how to start this new (secure or normal mode).
    The same thing happen on my Satellite A300.

  • A font I need is not available in italics. Corel Paint Shop Pro produces the police in italics when you press the Italic button in the software, but I don't see any way to do this in Illustrator. Help, please.

    A font I need is not available in italics. Corel Paint Shop Pro produces the police in italics when you press the Italic button in the software, but I don't see any way to do this in Illustrator. Help, please.

    Select the text and use the Warp tool to give a fake italic.

  • Satellite Pro M40: computer stops when you press the SHIFT key

    Sometimes when I press the shift key it wonder if I want to shut down the computer. It also changes the internet Explorer mode in full screen. When it arrives it will be continually for centuries and then suddenly stop. Then start again. It seems not to happen at any given time. I disabled the hot key in the Toshiba utility and which comes to the top of the Tower stops when I pressed the SHIFT key, it does not give me the option.
    It's really annoys me because I can't just think what to do.

    Thank you

    Hello

    It's very strange. It is the first time I heard about this issue.
    As much as I know the Toshiba utility cannot add additional functions to shift and make this key as a stop button.
    I have gift? don't know if you have installed the 3rd party applications that can change the keyboard feature, but you should check this possibility.

    In addition can also be a defective hardware. Maybe something wrong with the keyboard controller. But of course the diagnostic test is necessary.

  • ElliteBook 8460p will not be running when you press the Start button

    Hi Ant classmates.

    I am facing a problem with my 8460p ElliteBook. When I press the Start button it won't start and I need to apply some mechanical vibrarions so he reacts to the button. I guess that there is a problem with a connection inside. The thing is that he does not always fail, but it happens more often. I'm afraid to send it to HP support and resume with a message like "the problem didn't see the - up." I'm close to the date limit of warranty, but I need my laptop for 3 more weeks for professional issues. What should I do?

    Thank you

    Hello Angelica,.
    Welcome to the HP Forums.

    I'm sorry, but to get your question more exposure, I suggest posting in the trade forums, since it is a commercial product. You can click here for the link.
    http://h30499.www3.HP.com/hpeb/

    Thanks for posting on the HP Forums.

  • IPhoto crashes when you press the info button

    Since very recently, IPhoto crashes every time when I press the info button to enter people information a photo. I have version 9.4.3. running on OSX version 10.8.5. I added the first lines of pages and the pages or error report, if that can help anyone. I tried to repair the basis data, but without success. I am very grateful for any advice on this issue.

    Process: iPhoto [552]

    Path: /Applications/iPhoto.app/Contents/MacOS/iPhoto

    ID: com.apple.iPhoto

    Version: 9.4.3 (9.4.3)

    Generation information: iPhotoProject-720091000000000 ~ 1

    App item ID: 408981381

    The external application ID: 15017489

    Code type: X 86 (native)

    Parent process: launchd [139]

    User ID: 501

    Date/time: 19:50:47.475 2016-01-04 + 0100

    OS version: Mac OS X 10.8.5 (12F2560)

    Report Version: 10

    Interval since last report: 34492 sec

    Crashes since last report: 3

    Per-App interval since last report: 905 sec

    Per-App crashes since last report: 3

    Anonymous UUID: 23235B01-625D-2A47-6A8F-352C3092B10A

    Crashed thread: 0 dispatch queue: com.apple.main - wire

    Exception type: EXC_BAD_ACCESS (SIGSEGV)

    Exception codes: KERN_INVALID_ADDRESS at 0x00000000c53b6a10

    If you use iPhoto 9.4.5 or an earlier version, iPhoto will crash whenever you try to use maps. It is no longer supported.

    See:

    The first versions of iPhoto 11 started to plant for many users suddenly last month.

    There is a problem with the functionality of the site, because Google maps will no longer be supported.

    See the solution of Huxly647:

    Huxly647 , November 20, 2015 12:05 AM
    Re: iPhoto crashes after opening several times in reply to carvermon Useful

    I found a solution that works for me...

    1 goto /Applications/iPhoto.app/Contents/Resources

    2 delete the files 'googlemap.html' and googlesearch.html

    IPhoto no longer crashes, site does not work, but it doesn't bother me too much.

    Let me know if it works for you guys...

    Deletes two files "googlemap.html" and the googlesearch.html of iPhoto application bundle prevents the JavaScript running inside and causing the accident.  Log of course do the same thing. So it's pretty clear that something happened at the end of Google.

    To access the files inside the iPhoto application select it in the Finder and ctrl-click on it. Then use the command "Show Package Contents" from the menu.  Open the content subfolder and then resources.

    Do not try this fix without making a copy of the iPhoto application before trying to delete the two files of the entire application.

  • PC does not start when you press the power button, after that starts automatically as a ghost!

    I have HP Pavilion a6030in, my pc does not start when I press the power button / stop ther, but she starts automatically after some time after that, it works fine.

    Even once when I closed and leave it for a while and still the problem is not resolved.

    Help, please

    I solved the problem

  • Loop will not stop when you press the stop button

    Hello

    I have a LabVIEW program that includes a number of loops, but one of my curls (which surrounds a series of functions "Write TDMS") has a Boolean stop that transmits a signal through two GOLD and functions in a control of the loop (see aea of interest). My problem is that when I press the button stop the loop will not stop and will continue to save and write data that I didn't need a file.

    Could someone please help with this?

    Kind regards

    Aaron Broady


  • Tecra A4 does not light when you press the power button

    When I press the power on button it turns green for 4/5 seconds then turns off.
    "I do all the tests the support on the page:

    * Press on and press and hold the Fn key and press the F5 key repeatedly. If an image appears on the display, this indicates that the image has been activated to a connector for a monitor outside, causing only appear to be off the computer.

    * Connect the adapter to the computer.

    * Remove the battery and unplug the AC adapter and then connect only the AC adapter. Make sure that the power adapter is one that comes with the computer. Try to turn on the computer again, without the battery in the computer.

    * Plug the power adapter into a different plug.

    * The battery, ensure that there are enough energy to start the computer.

    * Press and hold the power switch for 10 seconds (to make sure that the computer is turned off). Wait five seconds, and then tap on and again, hold the switch for three seconds (turn on the computer).

    * Ensure that nothing beats (a sliding plastic cover) in the path by pressing the power switch.

    * Disconnect all devices (printers, pointing devices, keyboards, etc.) connected to one of the ports on the computer.

    * Remove any additional memory, beyond the computer built in memory, or the first module of memory in the computer. If the computer starts correctly, reinsert the memory and turn the computer back on. If it does not start successfully, memory can be inserted incorrectly, it may be defective or the support of memory may be damaged. "Try to replace the module memory."
    In vain:]

    You know? THX

    Hello

    There must be a hardware malfunction.
    You have tested a lot and nothing has worked
    I think there is not much to do, you all tired and I guess the authorized service provider could help you

    If your warranty is valid all should be done for free, so don t you worry and ask the experts ;)

  • Videos a pause when you press the volume buttons

    Hi, I have a problem while watching videos on YouTube or not... When I use the high and low volume keys, the video stops without reason and I find it so boring... I think it started about a month ago... Can solve us this problem? Thank you

    @Ehabg

    As I thought, the problem its caused by a third-party application, not a preloaded app, you need to uninstall app by app until you find the culprit.

  • Satellite C series - cursor will move only when you press the trackpad button

    Cursor on my mousepad suddenly stopped moving unless I have push button left or right, the cushion itself is not locked (fn + f5).

    Please help this is driving me crazy. I tried to uninstall drivers and reinstall but still will not work

    This behavior is very strange.
    Can you please tell us which model of laptop you have, what OS you are using and since when did you notice this problem?

    You use an external mouse at this time?
    When you open Mouse Properties try please use option restore all default values.
    If the problem persists, you can try to reinstall OS (recovery image) and test the functionality with the factory settings.

    In the case that the same problem my only explanation is that must be material junk.

  • Volume/brightness does not appear when you press the volume button on laptop keyboard

    Recently, when I went to change my volume, the small bar has not appeared on my screen, showing how much I was going to the top. Brightness bar did not show either and it's really annoying because I never know how it is until music strikes out. Any suggestions on how to fix it? I'm totally lost.

    Hello

    I apologize for the delay in responding. It seems that the user profile that you are using has gone corrupt. Try to create a new user profile and check if you have the same problems here as well.

    1. open user accounts by clicking on the button start the picture of the Start button, clicking Control Panel, clicking user accounts and family safety, then clicking on user accounts.

    2. click on manage another account. Need administrator permission if you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    3. click on create a new account.

    4. type the name you want to assign to the user account, click an account type, and then click on create an account.

    Create a user account
    http://Windows.Microsoft.com/en-us/Windows-Vista/create-a-user-account

    To fix the corrupted profile follow the steps mentioned in the article below.

    Difficulty of a corrupted user profile
    http://Windows.Microsoft.com/en-us/Windows-Vista/fix-a-corrupted-user-profile

    Try using the tool (SFC.exe) System File Checker to check and repair corrupt system files.  To do this, follow these steps:
    How to run scan SFC

    1. click on the Start button

    2. on the Start Menu, click all programs followed by accessories

    3. in the menu accessories, right-click on command line option

    4. in the drop-down menu that appears, click the "Run as Administrator" option

    5 If you have the enabled User Account Control (UAC) you will be asked to consent to the opening of the command line. You simply press the button continue if you are the administrator or insert password etc.

    6. in the command prompt window, type: sfc/scannow then press enter

    7. a message is displayed to indicate that "the analysis of the system will start.

    8. be patient because the analysis may take some time

    9. If all of the necessary files any replacement SFC will replace them. You may be asked to insert your Vista DVD for this process to continue

    10. If all goes although you should, after the analysis, see the following message "Windows resource protection not found any breach of integrity.

    11 after the scan finished, close the command prompt window reboot the computer and check.

    For more information, see the link below.

    http://support.Microsoft.com/kb/936212

    Let us know if this helps

    Concerning
    Anthony.

  • My laptop sometimes "out of Short" when you press the Start button, what happens in the repair of this anomaly.

    I use a laptop Acer Aspire 4540 (32 bit).  The problem started when the optical drive DvD - CD started to not start consistantly, gradually, the group became hotter than normal. Finally, which would not start up. I tried to follow the advice given on... disconnect the battery and by holding down the start 30 seconds button. But, to no success in remeding the problem.   Can you provice me with any advice that could help me solve this problem.

    Thank you.  gdb

    Hello

    The computer probably has a hardware problem and you should contact a real computer store
    (who makes his own internal service and no leeks and displays a Best Buy or any other)
    Department stores) or system manufacturer support. You cannot fix the hardware with the software.

    Acer - USA - Service and Support - drivers
    http://us.Acer.com/AC/en/us/content/support

    Acer - worldwide
    http://www.Acer.com/worldwide/selection.html

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

Maybe you are looking for