Disable the 'play' button when you play the song

I have a play button and stop switch

When I click on the button play the song keeps repeating over and over again.

How do I stop this?

It's the code using im

var req:URLRequest = new URLRequest ("song.mp3");

var sound: Sound = new Sound();

var controller: SoundChannel;

function soundLoaded(event:Event):void

{

controller = sound.play().

play_btn.addEventListener (MouseEvent.CLICK, playSound);

stop_btn.addEventListener (MouseEvent.CLICK, stopSound);

}

function playSound(event:MouseEvent):void

{

controller = sound.play().

}

function stopSound(event:MouseEvent):void

{

controller.stop ();

}

sound.addEventListener (Event.COMPLETE, soundLoaded);

Sound.load() (req);

do not apply the play() method to your sound during playback.

Tags: Adobe Animate

Similar Questions

  • W700 disable lower mouse buttons when you use the stylus / wacom (Left Handed problem)

    Y at - it an easy way or function when the stylus is in contact with the cushion that disable MouseKeys? I'm left handed, so I continue to by clicking on the right button of the mouse on the palmrest. I want her to be an automatic feature when the pen touches...

    Thank you

    Thread in good time, thank you.

    I've recently updated some drivers and software and noticed the bottom buttons and track mousepad don't work anymore.  I thought that it was still one other lower Palm that I had to replace but after a restart I noticed the pad worked again until I logged in.

    I spent a bit of time trying to understand why and then see this post in the morning, search in the control panel and find the option that is selected in the mouse properties.

    Apparently the update of the driver selects disable as a default setting?

    In any case, I can now turn or turn off quickly after adding an icon in my taskbar.

  • How to create a button with rollover that appears in a different place than the button when you move?

    Hello

    How to create a button with rollover that appears in a different place than the button when you move by using only the Muse (reversal may be a different shape and color of the button). I managed to do it using Photoshop and the separate layers and import it, but it is not a good solution. All suggestions will be welcome.

    Thank you

    You can try to use the widget of the Composition of the ToolTip. In this way, the trigger area is isolated and a "State of reversal" can be placed anywhere on the screen (compared to the trigger).

    • Remove the two triggers additional default
    • Set to display the targets on working capital
    • Select hide all initially.
  • When you import a song from itunes for windows moviemaker I get the message (file cannot be imported because the game to version Recentepour the file codec is not installed)

    original title: codec

    When you import a song from itunes for windows moviemaker I get the message (file cannot be imported because the game to version Recentepour the file codec is not installed) how can I fix it?

    Install the codec.  Really.

    Something like GSpot to understand that one.

  • I get error Service disabled 0 x 80070422 when you install SP1 on Windows Server 2008 R2 (KB947821)

    original title: I get error Service disabled 0 x 80070422 when you install SP1 on Windows Server 2008 R2

    I get the above error if you use Windows Update or install SP1 from DVD.

    I found that the Windows Modules Installer Service is the service responsible for the error. It is configured to start automatically. When I go to the Dependencies tab I get a pop up that says: "Win32: the service cannot be started, either because it is disabled or because it has no enabled devices is associated to him."
    I disabled AVG during an installation attempt.
    I followed the troubleshooting steps, by running the update of preparation tool (KB947821 nothing helps.

    Hi Roy,

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please ask your question in the following forum.

    http://social.technet.Microsoft.com/forums/en-us/categories/

    I hope this helps.

  • Dynamically replace the spark icon button when you click on

    I'm looking to turn 'play' and the button icons 'pause' button in a video player, I developed.  It is a packaged application IOS so "ToggleButton" use is not recommended by Adobe. It is not mobile optimized.

    When you click on the button of the current icon should be replaced by another dynamically.

    How to do that generically - in essence, with traces hard coding to the assets inside the skin?

    I see a lot of examples where you can move an icon to a skin - like this http://blog.flexwiz.net/tip-easy-spark-icon-button/instance.

    But how did you then fail over to another icon on the fly when the user clicks on the button?

    Think I see how.  The value of the element of style "icon" in the AS button click handler.

    btnPlyPause.setStyle ("icon", "path_to_asset");

    Now just the logic of maintaining awareness of the State in which I am currently in - play or pause so I can choose the icon on the right.

    Cool.

  • How to get rid of the icon buttons when you type?

    Could someone explain to me how to get rid of these little icon buttons that keep popping up on the screen when I use my keyboard. Read on this forum that they are something to do with "apps"? What information and icons that appear when you drag to the top of the bottom of the screen? With the wording "parachuting" in the middle of the screen? If so, how do I "turn off" those little buttons, which appear in the bottom right of the screen and above? Can someone advise me on this?

    There is also a tin can that appear on the screen as when I use my keyboard, something "iCloud rental", with the word "done" there commit to get rid of this box. Can someone tell me how to stop this box from appearing when I type...

    You talking about icons like below?

    Or like these?

  • Change the State of the button when you press another button

    Hi all

    I have a simple enough question, but just does not know how I can do this... I'm trying to switch between the two types of waveforms (sine and square) on a graph using buttons and a box structure.

    I currently have two buttons A and B. When I press A, it turns into real and displays the waveform 1. When I press B, B turns into real and displays the waveform 2. However, when B is true, I still have a permit as true (hurry)

    I can't figure out how to change the status of a return to false when you press B and vice versa.

    I am fairly new to Labview so if anyone can refer to a position where it is already the answer or point to the right direction, that would be appreciated

    Thank you

    Rather than clutter up the code with the event hidden cases (!), controls (!), value properties (!) and variable (!) local (as suggested above but not recommended at all!) In addition, it does not even work correctly!), all you need is a control radiobutton that allows also to "no selection". See attached (LabVIEW 2013). You could also add a third Boolean value for the sine wave and not dismiss "no selection" to make the code even more if auto-documentent.

    I made the transparent container radiobutton to match your existing style.

  • Change the color of the text to the previous button when you click on a button

    Hi all

    If I said 7 buttons, each with text that changes color on turnover by using 'Up' 'Over' and 'Down' of the keyframes in the timeline buttons.  Is there a simple way to get the text of the button changes color when you click on it, stay that way, and then back to the original color once one of the other 6 buttons are engaged?

    The only thing I can get to prepare code pages for each button that changes the color of every other button regardless of whether it was active.

    See the code example would help a lot!

    Thank you!

    use:

    var previouslyClickedBtn:MovieClip
    var buttonA:Array = [content_mc.work_btn, next button and the rest of your buttons];
    var targetA:Array = [work_mc, etc.];

    for (var i: uint = 0; i<>
    .Ivar Button [i] = i;
    buttonA [i] .addEventListener (MouseEvent.CLICK, clickF);
    buttonA [i] .addEventListener (MouseEvent.MOUSE_OVER, overF);
    buttonA [i] .addEventListener (MouseEvent.MOUSE_OVER, overF);
    }

    function workOver(e:MouseEvent):void {}
    e.currentTarget.gotoAndStop ("over");
    }

    function workClick(e:MouseEvent):void {}

    {if(previouslyClickedBtn!=null)}

    previouslyClickedBtn.gotoAndStop ("up");

    }

    e.currentTarget.gotoAndStop ("down");

    previouslyClickedBtn = e.currentTarget;

    targetA [e.currentTarget.ivar] .gotoAndPlay ("enter");
    }

    function workOut(e:MouseEvent):void {}
    content_mc.work_btn.gotoAndStop ("up");
    }

  • How to disable automatic site loading when you type the URL?

    When I open a new tab in Firefox 13 and start typing a URL in the address bar, this creature automatically attempts to load some content already available based on the typical part URL and my history of site navigation. In most cases, this feature is very annoying. For example the tr to open http://www.broadband-forum.org/marketing/download/mktgdocs/MR-238.pdf and after that to visit http://market.yandex.ru.

    How to turn off this feature wicked for this creature?

  • Since the last update for FF, I have not been able to use my return/enter button when you type in the address bar. Help?

    Whenever trying to type something into the address bar, I'm able to use my enter/return key to go to the site. I hit the button the arrow to navigate around.

    Disable the AVG Safe Search via modules | Extensions. It blocks the Enter key.

  • Any way to disable Navigation (red box) when you use the hand tool?

    I work mainly on page 4: technical data sheets and find it easier to move using the hand tool to jump to another location. I'm embarrassed by the ceaseless appearance of what seems to be a (Heavy Red Box) Navigation frame that appears by pressing the hand tool to select a new location. Is it possible to disable this feature?

    You click and drag IMMEDIATELY to use the hand tool. There is no way to change this behavior.

    Bob

  • Disabling a button when you press it...

    Hello
    I want to disable a button pressing (to be more precise the last command to run...).
    Although the syntax... the name of push button... etc, I've written are correct:
    set_item_property ('test.psh_button', Enabled, property_false);

    the error that arises is: ORA-06502
    When I comment on this line of the source code is executed without error...

    Can you think of another way to accomplish this duty...?


    Note: I use Dev/2000 v.6i with patch12
    Thank you
    SIM

    You cannot disable the current element, if you need to access a different element and then disable the button

    WHEN BUTTON PRESSED

    do_key ('next_item');  -- navigate to another item so we can disable the buttonset_item_property ('BLOCK.BUTTON_ITEM', enabled, property_false);  -- disable the button
    

    Otherwise... as said previously, you should be able to disable the button if you
    Set the properties to be nonnavigable by mouse and press

  • How do I turn on/off other buttons when you are active?

    Hello community!

    I have many symbols that animate in when you click on and off when you click again on a both. Thanks again to vivekuma who helped me make this a reality.

    But then I realized that I also need to disable the other symbols when you're active and reactivated when it animates back out like in the example. I don't hold it against someone for laughs, but I tried to combine this link/unlink with this current var method but it's mostly the afterthought blind blind shooting

    Any help would be greatly appreciated!

    Hello

    Use the code below:

    1. in compositionReady Manager:

    Add:

    SYM. $(".) Elf"). Hide();

    sym.setVariable ('count', 200);

    this.checkIfActiveSymbol = {function (childSym)}

    var bActiveSymbol = sym.getVariable ("symName");

    If (bActiveSymbol & (bActiveSymbol! = childSym.name))

    Returns false;

    Returns true;

    }

    this.setActiveSymbol = {function (childSym)}

    var bActiveSymbol = sym.setVariable ("symName", childSym.name);

    }

    this.resetActiveSymbol = function() {}

    var bActiveSymbol = sym.setVariable ("symName", "");

    }

    2. click on handler for each btn symbol:

    Replace: use btn1 and btn accordingly for each symbol button.

    var childSym = sym.getSymbol ("btn1");

    var pos = childSym.getPosition ();

    If (! sym.checkIfActiveSymbol (childSym))

    return;

    If (pos< 499)="">

    sym.setActiveSymbol (childSym);

    sym.getSymbol("btn1").play("1");

    sym.getSymbol("btn1").$("name").fadeToggle ();

    sym.getSymbol("btn1").$("mailbtn").fadeToggle ();

    }

    If {(pos > 501)

    sym.resetActiveSymbol ();

    sym.getSymbol("btn1").playReverse (pos);

    sym.getSymbol("btn1").$("name").fadeToggle ();

    sym.getSymbol("btn1").$("mailbtn").fadeToggle ();

    }

    var number = sym.getVariable("count");

    sym.getSymbol("btn1").getSymbolElement (.css({"z-index":count});))

    sym.setVariable ('count', count + 1);

    HTH,

    Vivekuma

  • How can I disable the song or video preview by hovering the mouse in Windows Explorer?

    I have "Automatically opening of songs to the overview of track title" disabled in the library in Windows Media Player 12 tab, however, when I use explore and have my mouse pointing to a video or audio, Windows 7 automatically plays the file in a preview window. How can I disable this feature?

    Here is a picture to illustrate the problem I have: http://oi47.tinypic.com/2u43b00.jpg

    Hi Michael,


    Thanks for posting your query on the Microsoft Community.

    From your problem description, I understand that after turning off the feature in Windows media player, it always automatically plays the file in a preview window.

    I want you to try the following methods to resolve the problem.

    Method 1: Troubleshooting of Windows Media Player settings
    Open the troubleshooting Windows Media Player settings Troubleshooter
    http://Windows.Microsoft.com/en-us/Windows7/open-the-Windows-Media-Player-settings-Troubleshooter

    Method 2: if the issue continues, I suggest you to disable the features of media and restart the computer. After the restart I suggest to enable new media features and check.

    Disable the Windows media player.
    a. press the Windows + R, now type Control Panel press ENTER.
    b. now, click on programs and features.
    c. now the click left side turn Windows features ON or OFF.
    d. now, uncheck the box on the multimedia functions and click Yes.
    e. now, click ok and it will apply the changes.
    f. now click on restart now.
    g. This will disable Windows media player on the computer.

    To allow Windows media player follow the steps.
    a. press the Windows + R, now type Control Panel press ENTER.
    b. now, click on programs and features.
    c. now the click left side turn Windows features ON or OFF.
    d. now put a check mark on media features and click Yes.
    e. now, click ok and it will apply the changes.
    f. now click on restart now.
    g. This will allow Windows media player on the computer.
    Now, check the setting and see if it helps.

    Hope the above information helps.
    Get back to us if you need assistance about windows. We will be happy to help you.

Maybe you are looking for

  • 2013 iMac hangs in mode 'sleep'

    When I put my computer to sleep at night, most of the time when I wake up in the morning, it reports a report creash, this happens several times a week even when executing hardware checks that it does not find any problem.

  • Left arrow and arrow forwards are not lit and do not work.

    I have Firefox 3.6.13 on an IBM Thinkpad with XP. Yesterday I have the Firefox left arrow and arrow lights up and that they do not work. I can click with the right button on the drop-down arrow next to the button forward and see the list and choose a

  • Need drivers for Satellite L100 113

    Hello. where can I find the drivers for satellite 100-113? And why they ve been removed from your site? :( Yours sincerely Airidas

  • Apple tv closes when streaming from my ipad

    Apple tv closes when streaming from my ipad It is impossible to repair without unplugging everything.

  • Exchange of CD-ROM on my laptop

    How can I ask Toshiba about my problem?I have a problem with my optical drive.Can I change with Sony DW-Q58A?