How to play music when clicking a button?

Hello There
Could someone help me a bit to get started?
My first attempt is to just create a scene, in which clicking
a button it starts to play a mp3 file. I did get it to start it to
play as a backround music after reading the help file, and tried
also find source code from internet and also here without success.
So, could someone be so kind to give me a Lingo example code
snipplet, which would start playing the music immediately without
first importing the file (like streaming the file) if this is
possible and also small instructions how to assign it to the button
(so, not as a backround music).
I just got the Adobe Director 11 couple of days ago, and my
wife is starting to get angry for me for sitting with my NB all the
evenings without any progress,,,
Thanks, in case someone answers…

Thanks Sean, here is some more info for your answer:
Is it imported into a cast library, or is it an external
file?
I did try it to get working with an imported mp3 file and
also I would like to add fuctionality to use it as a link.
If it's an external file, do you need to give the user the
option to
choose a file from a list (or even a different directory), or
will the
sound file to be played always exist in the same (relative)
directory
with the same name?
The best would be a possibility to choose the file, and if
it's possible to set up a starting directory (like "My Documents\My
Music" for example), so that could work as a mp3 player.

Similar Messages

  • How to play music when no Internet connection is available?

    Is there a way to access music on iPod touch without an Internet connection, the area where I spend my vacations does not have great coverage, so it ***** to run without tunes!

    You just have to sync the music from your iTunes library to the iPod.
    iTunes: Syncing media content to iOS devices and iPod

  • Play movie by clicking a button/shape

    Hi
    How to play movie by clicking a button/shape? The only option I found in keynote is playing movie by clicking the movie rectangle.
    Thanks
    zlf

    I am using TimerTask in my JSP page to print some message:
    <%
                      Timer timer = new Timer();
                      TimerTask monitorTimerTask = new Monitor();
                      timer.schedule(monitorTimerTask,1000,1000);
    %>
    <%!
         private class Monitor extends TimerTask{
              int i = 0;
              public void run(){
                       System.out.println("TimerTask ["+i+"]");
                       ++i;
    %>And to stop the TimerTask daemon, I created the following function:
    <%!
         public void stopTimerTask(){
              if(monitorTimerTask != null){
                   System.out.println("Stopping the Timer Task");
                   monitorTimerTask.cancel();
    %>Now, I am trying to call funtion "stopTimerTask()" by click of a button in JSP page. The function is being called BUT the daemon keeps on printing the text message to the console. It means the above function is not able to stop the TimerTask.
    What to do?
    Please help!
    Thanks,
    sumit

  • How do I get my iTunes to playing music  when laptop is closed?

    How do I get my iTunes  in my mac book pro to playing music when laptop is closed?

    Mac notebooks: How to use your computer in closed clamshell
    InsomniaX

  • How to display the details of particular order when click on button in sapui5

    Hi Experts,
        How to display the details of particular order when click on button in sapui5?
    I Have a requirement that is i want display all the list of orders coming from backend as shown in image below
    then in that i have a button when i press the button  it need to display the details of particular order as shown in image below
    Please help me .
    Thanks & Regards
    chitti

    Does anyone know how to display the index of current desktop?
    Brute force - - I have written the number of the Desktop directly onto the wallpaper picture I am using for each Desktop  (easy to do with Preview).
    All Desktops are using different wallpaper photos, so they are easily recognized by the color scheme, and in the upper left corner is the number.
    Regards
    Léonie

  • I want to do banners ,how can we do  when click the same button (next button)  it must show differen

    i want to do banners ,how can we do  when click the same button (next button)  it must show different images . cam any one help

    Check out my blog with samples on Edgehero.
    http://www.edgehero.com/articles/interactivity

  • Hi,does anyone know how the Iwatch will play music when it is not near a bluetooth device as it is stated in the feature setting..Icloud streaming,internal hard drive?

    Hi,does anyone know how the Iwatch will play music when it is not near a bluetooth device as it is stated in the feature setting..Icloud streaming,internal hard drive?

    I did not hear them state the feature requirements directly in the streaming even but there are statements on the Apple website that clearly say that an iPhone is necessary.  I'm guessing that other than Bluetooth for pairing with the iPhone, it's just not technically possible to fit any other radios such as WiFi or LTE into that form factor or battery capacity.  I don't even remember them mentioning if it had a speaker or could pair directly with bluetooth headphones.
    While I'm hoping that the watch has a reasonable stand-alone feature set, they didn't make it clear what exactly it can and can't do without an iPhone nearby.  I also hope that they communicate this better in the coming days.

  • How do I configure my bluetooth on my iPod Touch 4G to automatically play music when connected and to connect as media not a phone?

    Is there any way to have my iPod Touch automatically start playing music when it connects to my car stereo via Bluetooth?
    Also, I would like the option to connect to my car stereo as media only and not as a phone. My car stereo supports the ability to connect to a phone via Bluetooth simultaneously with another device such as my iPod Touch as a media source. The problem is that if my iPod Touch connects first it will force out my phone from connecting via Bluetooth since it connects as a phone as well as media. I have been able to make this whole setup work by turning both my phone's Bluetooth off and my iPod Touch's Bluetooth off. Then turning my phone's Bluetooth on first and allowing it to connect. Then changing the Bluetooth option on my phone to only connect as phone. Then turning my iPod Touch's Bluetooth on and that works just fine. Both devices respond perfectly but for that to work I have to do that process everytime I get into my car. Is there anyway to set this up so I don't have to go through all of this hassle?
    Btw my iPod Touch has been updated to version 4.3.5.
    Any suggestion, comments, or concerns would be helpful.
    Thanks,
    Jon

    If you store itunes andn iphoto library on the TC you could be in trouble. The TC has no auto backup mechanism.. it is simply unable to work as a true NAS. It has no media servers. It is slow.. it is very easy to corrupt libraries especially in connection over wireless. In general we recommend people do not do this.
    If you go ahead anyway.. apple have specific instructions for moving the libraries.. do follow it.
    I am not sure if the SONOS can play directly from itunes library or has to use an itunes server.. remember the TC is a dumb as a board router with no media servers. Apple TV also need an active itunes to work AFAIK.. you cannot play files.. unless you JB the ATV.
    Also be careful as SONOS does not like apple names.. use all SMB compatible names.. short, no spaces pure alphanumeric.
    Finally yes,.. at last .. you can extend the wireless in the TC using another apple router.. you cannot extend wireless using any other brand.

  • How to switch to another page when clicking a button

    I have a main frame consits of many button.What I need to do when click
    a button,it switch to another page?
    Thanx....

    Try this, it should work.
    // not tested
    JButton linkButton = new JButton("<html><a href=\"http://forum.java.sun.com\">link to<br>forum</a></html>");

  • How to hide a TextField when clicking another button

    Hello!
    I've been able to generate a TextField to appear when clicking a button, but when I click on another button, to display some more information, I still have the first TextField displayed.  I've had a look around, but not been able to find anything to help me with getting the first to disappear.  Can anyone provide any ideas for this?
    The code I'm using for displaying the TextField is:
    button10.addEventListener(MouseEvent.CLICK, fl_ClickToPosition);
    var fl_TF:TextField;
    var fl_TextToDisplay:String = "Send disply to the right screen/projector";
    function fl_ClickToPosition(event:MouseEvent):void
    fl_TF = new TextField();
    fl_TF.autoSize = TextFieldAutoSize.LEFT;
    fl_TF.background = true;
    fl_TF.border = true;
    fl_TF.x = 300;
    fl_TF.y = 100;
    fl_TF.text = fl_TextToDisplay;
    addChild(fl_TF);
    Many thanks in advance

    all your buttons should call the same function. 
    because each button probably triggers different text to be displayed, you can use an object or dictionary to associate the buttons and their text:
    // execute these two lines and your function once at the start of your app
    var dictionary:Dictionary=new Dictionary(true);
    var fl_TF:TextField;
    function fl_ClickToPosition(event:MouseEvent):void
    if(fl_TF&&fl_TF.parent){  /
    fl_TF.parent.removeChild(fl_TF);
    fl_TF=null
    fl_TF = new TextField();
    fl_TF.autoSize = TextFieldAutoSize.LEFT;
    fl_TF.background = true;
    fl_TF.border = true;
    fl_TF.x = 300;
    fl_TF.y = 100;
    fl_TF.text = dictionary[e.currentTarget];
    addChild(fl_TF);
    ////////// and for each button use something like:
    button10.addEventListener(MouseEvent.CLICK, fl_ClickToPosition);
    dictionary[button10] = "Send disply to the right screen/projector";

  • Home page safari shortcut fails to play music when minimized

    I made a homepage shortcut to safari (music.google.com) which stops playing music when minimized. If I launch safari directly and navigate to music.google.com music continues to play when minimized. Symptoms are identical IOS5 & IOS5.01.  Any suggestions?
    Thanks in advance for any guidance
    Pete

    I accessed the GarageBand site and not being sure how one would play an audio loop there, I clicked the little green arrow next to "Rational Eyes" near the top. This put up a little black window that said "MP3 Player (GarageBand.com)" with a line of text that said "Report problems by clicking the 'HELP' button above.", but there was no help button other than the item on the tool bar of the site window. There was no sound.

  • How to play music through my external hard drive through iTunes on my mac?

    I recently purchased a external hard drive for my mac for my movies and music, as my disc was almost full.
    I have spent HOURS searching how to play music through my itunes without transferring them onto the mac.
    BUT everytime I click media destination folder in prefrences and advance, the whole music library in my external hard drive folder is  greyed out, and when i click it nothing happens.
    PLEASE someone help...

    First, a brand new drive is likely formatted for use with Windows.  You need to reformat it for use with Mac.
    Pondini: Formatting,  Partitioning, Verifying,  and  Repairing  Disks... - http://web.me.com/pondini/AppleTips/DU.html
    Second, you are better off moving the whole iTunes library to the external drive, not just the media.
    iTunes: How to move [or copy] your music to a new computer [or another drive] - http://support.apple.com/kb/HT4527
    Quick answer if you use iTunes' default preferences settings:  Copy the entire iTunes folder (and in doing so all its subfolders and files) intact to the other drive.  Open iTunes and immediately hold down the Option (alt) key (shift on Windows), then guide it to the new location of the library.
    Do not confuse moving your whole folder and library with moving just media files as in
    iTunes for Mac: Moving your iTunes Media folder - http://support.apple.com/kb/HT1449

  • Doesn't play music when docked

    My iPhone 4 does not play music when docked on any type of docking station or when I plug it into my iTrip in my car. It still charges just fine, but immediately stops playing music when plugged in. When it is plugged into external speakers, it stops playing on its own speakers as well.
    I also have an unrelated problem that came up yesterday: my phone's power button is jammed up. I cannot even push it anymore. This is my 3rd iPhone in less than a year that has had this problem. I don't think I push the button very hard at all, not anymore than anyone else. What makes this happen, and can I get it fixed without paying out the *** and without taking it apart myself? I got my phone from Best Buy as I don't have an Apple store within 150 miles of me. I am currently using AssistiveTouch instead, which is just plain annoying. Please help with either problem if you can!

    Recently, I have the same problem but with my B&W Zeppelin, and it turned out it was the problem of B&W and has sent it for service.

  • How to play music from iPod through Windows Media Player

    I don't want to insult anyone's intelligence .... but just in case anyone hasn't yet figured it out, here's how to play music from your iPod on a computer that does not have iTunes installed:
    On your computer, connect the iPod to iTunes and click on it's name. Then under the general tab, check "allow disk use". Your iPod will then act as a USB hard drive and will then show up as a drive in My Computer. Now all you need to do is to create a Music folder on it and then copy all your music to it!
    Your iPod's USB hard drive should show up under My Computer on most Windows computers. Therefore providing the computer has Windows Media Player installed, you will be able to play all your music on it! This saves you having to bother with portable/travel speakers, some of which sound terrible anyway!

    UKNightOwl wrote:
    ... providing the computer has Windows Media Player installed, ...
    ... This saves you having to bother with portable/travel speakers,
    Mains lead for the computer is a bit of a problem on the bus though!

  • How to play music via bluetooth in my car

    I can not find any information on how to play music via bluetooth in my car?
    I can play my iphone via a cable but Im sure I sholud be able to play via bluetooth shouldnt I with my smart phone?
    Please help. J

    Thank you thank you thank you!
    It was so easy it was ridiculous, all by using the "throw" button. Again thank you

Maybe you are looking for