Help with first PHP Mobile Application

I´tm trying to build my first app to run on mobile devices,the problem is i cant configure the "WebRoot" and the "RootURL", in my first test,using wamp and running it local,it goes well,but when i´m try to put the web adress doenst work, i put on www folder the ZendFrameWork folder, as the same as Wamp does, but flashBuilder still don't recognize the web.Is there some PHP code i´m missing?or something else?

Hi,
I posted my solution at http://forums.adobe.com/message/3850560#3850560
There are some other suggestions.
p.s
Finally, I made it working. Thank you kokorito, Chriszzzzzzzzzzzz for your help.
As Kokorito suggested, I don't have to/ shouldn't modify the gateway.php.
In amf_config.ini,
for webroot, I used the document root (or server root) provided by my web hosting company.
;webroot = "C:/Program Files/Zend/Apache2/htdocs"
webroot = "/var/www/vhosts/mydomain.com/httpdocs/public"
For zend path, I specified the path of zend library located in my web hosting server:
zend_path ="/usr/local/php/ZendFramework-1.11.4-minimal/library"
Gateway.php reads amf_config.ini and use zend_path, library and services defined here to make new paths:
library ="/var/www/vhosts/mydomain.com/httpdocs/library"
services ="/var/www/vhosts/mydomain.com/httpdocs/services"
For amf directories, I used a full path such as:
amf.directories[]=/var/www/vhosts/mydomain.com/httpdocs/services
Finally, for the mysql server, I used localhost which my web hosting server points to, since gateway.php is runing on the server.
public $server = "localhost";
A different web hosting may use a different address.
.flexProperties is a config file in Flash Builder 4.5 for PHP. I set such as
serverRoot="/var/www/vhosts/mydomain.com/httpdocs/public" serverRootURL="http://mydomain.com"

Similar Messages

  • Need help with first applescript@Quicktime- can't figure out a few lines...

    Ok guys I need help, here is what I want to happen. I want the script to just shorten a movie file. It should be so simple!!
    lengthofmovie = film length
    set time range from 0 to (lengthofmovie-1)
    save the movie as a new file
    That is all I want done, I am ripping my hair out of my head trying to do this. Please help me!!
    Here is my code so far:
    with timeout of 86400 seconds
    display dialog "Before beginning batch processing, make sure QuickTime Player is set to the desired export settings, and all videos to be processed are in a folder named ‘Input’ on the desktop." with icon note
    tell application "Finder"
    set the startup_disk to the name of the startup disk
    end tell
    set user to do shell script "whoami"
    set inputfoldername to "Input"
    set input_folder to startup_disk & ":Users:" & user & ":Desktop:" & inputfoldername & ":"
    set user_desktop to startup_disk & ":Users:" & user & ":Desktop:"
    set output_folder to startup_disk & ":Users:" & user & ":Desktop:Output:"
    set file_extension to "_export.mp4"
    try
    tell application "Finder"
    make new folder at user_desktop with properties {name:"Output"}
    end tell
    end try
    try
    set thefolderlist to list folder input_folder without invisibles
    repeat with x from 1 to count of thefolderlist
    set the_file to input_folder & item x of thefolderlist
    set output_file to output_folder & item x of thefolderlist & file_extension
    tell application "QuickTime Player"
    activate
    open the_file
    //change timeline, trim NEED HELP HERE
    export front document to output_file as MPEG4 using most recent settings with replacing
    close front document
    end tell
    end repeat
    on error
    display dialog "This script requires a folder named ‘" & inputfoldername & "‘ located on the desktop." with icon stop
    end try
    beep
    end timeout

    Hi plashd,
    First, I must confess that I don't know much about QuickTime. Nevertheless, while trying to understand your problem, I discovered that the AppleScript dictionaries of QuickTime Player and QuickTime 7 were very different from one another, and was unable to use the “export” command of QuickTime Player. However, I finally was able, with the following script, to use AppleScript to shorten a QuickTime movie and save it under another name:
    *set the_file to POSIX file "/Users/pierre/Desktop/MVI_0503.MOV"*
    *set output_file to "/Users/pierre/Desktop/NewMVI0503.MOV"*
    *tell application "QuickTime Player"*
    activate
    *open the_file*
    *tell front document*
    *trim from 1 to (duration - 5)*
    *save in output_file with replacing*
    *close without saving*
    *end tell*
    *end tell*
    Hope it can help.

  • I need help with DW, PHP & MySQL please.

    Hello, I am new to website development and am trying to set up a form for collecting data on my website and have a question that I can’t find an answer to anywhere else. I was wandering if someone there would be kind enough to help?  I am using Dreamweaver in CS4 and my host already has PHP & MySQL installed on the server that I can use.  My question is: Do I need to download XAMP or WAMP on my computer before trying to connect my form to the server?  Also, do I need to change the page I am putting the form on to .PHP extension or can I just embed the PHP form into an existing HTML page?
    Most of the training tutorials I’ve read don’t start at the most basic beginning but rather expect people to already have a basic knowledge of the topics they are trying to learn.  If anyone knows the best place to get answers to the most basic questions like this one or a beginners guide to working with DW, PHP & MySQL I will gladly go there rather than waste your time on questions you’ve probably already answered a bezillion times.
    Thank you for the help.

    Strictly speaking, you don't need XAMPP or WAMP on your local computer. But if you're serious about getting involved with PHP/MySQL, you should definitely set up a local testing environment with one or the other. It's safer and more efficient. Don't expose all your errors on a live server. You can find instructions on  how to set up a testing environment here: http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php.html.
    To develop with PHP, you should always use a .php file name extension. Any other choice is very rare.
    There's a tutorial on building your first dynamic website with DW here: http://www.adobe.com/devnet/dreamweaver/articles/first_dynamic_site_pt1.html.
    For more in-depth help, you might want to consider grabbing hold of a copy of "The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP". (Yes, I wrote it, so it's a bit of shameless self-promotion, but you'll find it answers many of your questions - and probably a lot you hadn't even thought of.)

  • Integration of oracle apps R12 with thirdy party mobile application

    Hi All,
    Any can help how to integrate third party mobile application with our R12 apps..
    please share any documents on it .

    Hi;
    Please check Steven Chan blog
    https://blogs.oracle.com/stevenChan/entry/mobile_devices_ebs
    Regard
    Helios

  • Help with port forwarding to application

    Help needed to Port Forward on to my PS3. 
    I need to forward the following ports: 
    UDP: 3074; 3659; 6000
    TCP: 80; 443; 3659; 10000 - 10099; 42127
    Have previously given the PS3 a static IP, set the port forwarding rules and then forwarded to the IP address, but it appears the ports have not opened as expected.
    Help Keith

    I can only see one image which just shows the application mapping, but no indication as to whether you had clicked the "apply" button.
    Why are you forwarding ports 80 and 443, are you running a webserver on the PS3, as those ports are used for web serving.
    As a matter of interest, your port 80 is showing as open at the moment, so is the PS3 turned on, or is port 80 mapped to something else instead?
    What I would like you to do is to start from the beginning, with just the single TCP port number 3659 assigned to the PS3.
    It will mean removing the other assignments, but it will make things a bit easier.
    If you could do that please, and then we can do some tests.
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • Help With Some PHP

    On
    www.imagesandwords.org.uk/andrewjamesrp/
    I had a go with a PHP CSS switcher using a tutorial from,
    www.alistapart.com/articles/phpswitch/
    and I can't seem to get it working.
    I want to do some more complex changes in the css but for now am just trying to work out the php. Can anyone help me? I am not sure what information to inclue but I have done my damndest to follow the tutorial.
    You can see that the page isn't in the root directory but the php and css files are in the andrewjamesrp folder.
    Thanks
    Martin

    Thanks Nate
    Here's the link: http://imagesandwords.org.uk/andrewjamesrp/index.html
    Here's switcher.php
    < ?php
    $set = $_GET['set'];
    setcookie ('sitestyle', $set, time()+31536000, '/', 'www.imagesandwords.org.uk', '0');
    header("Location: $HTTP_REFERER");
    ?>
    Here's my < head>:
    < link href="stylemain.css" rel="stylesheet" type="text/css" media="all"/>
    < link rel="stylesheet" type="text/css" media="screen" title="User Defined Style" href="<?php echo (!$sitestyle)?'stylemain':$sitestyle ?>.css" />
    < link rel="alternate stylesheet" type="text/css" media="screen" title="Red" href="red.css" />
    < link rel="alternate stylesheet" type="text/css" media="screen" title="Blue" href="blue.css" />
    < link rel="alternate stylesheet" type="text/css" media="screen" title="Green" href="green.css" />
    < /head>
    And here's the switch in the < body>
    < li id="red">< a href="./switcher.php?set=styleone">1</a></li>
    < li id="green">< a href="/switcher.php?set=styletwo">2</a></li>
    < li id="blue">< a href="switcher.php?set=stylethree">3</a></li>
    I have used different ways of referencing the switcher.php there because I am not sure how to do it. This page is a practice in my own site so the index.html is not in the true root.
    I have changed the file extension to .html and I think my host uses PHP 4.2.something. Or not PHP 5.
    Regards
    Martin

  • Help with html / php contact form

    Hi guys I was hoping to get some help with a contact form on my website, to be honest I havent a clue about php but kind of okay with html thats why the php code is just a copy and paste from some website, just trying to marry it up with the html but getting errors.
    Hopfully one of you can see the problem.
    Error on Submitting:
    Notice: Undefined variable: name in \\nas44ent\Domains\g\gethinhayman.co.uk\user\htdocs\send_form_email.php on line 69
    Notice: Undefined variable: message in \\nas44ent\Domains\g\gethinhayman.co.uk\user\htdocs\send_form_email.php on line 75
    We are very sorry, but there were error(s) found with the form you submitted. These errors appear below.
    The Name you entered does not appear to be valid.
    The Comments you entered do not appear to be valid.
    HTML Code:
    <section id="contact" class="four">
                                                                <div class="container">
                                                                          <header>
                                                                                    <h2>Contact</h2>
                                                                          </header>
                                                                          <form method="post" action="send_form_email.php">
                                                                                    <div class="row half">
                                                                                              <div class="6u"><input type="text" class="text" name="name" placeholder="Name" /></div>
                                                                                              <div class="6u"><input type="text" class="text" name="email" placeholder="Email" /></div>
                                                                                    </div>
                                                                                    <div class="row half">
                                                                                              <div class="12u">
                                                                                                        <textarea name="message" placeholder="Message"></textarea>
                                                                                              </div>
                                                                                    </div>
                                                                                    <div class="row">
                                                                                              <div class="12u">
                                                                                                        <a href="http://www.mywebsite.co.uk/email_form.php" class="button submit">Send Message</a>
                                                                                              </div>
                                                                                    </div>
                                                                          </form>
                                                                </div>
                                                      </section>
    php Code:
    <?php
    if(isset($_POST['email'])) {
        $email_to = "my email address";
        $email_subject = "Mail from Site";
        function died($error) {
            // your error code can go here
            echo "We are very sorry, but there were error(s) found with the form you submitted. ";
            echo "These errors appear below.<br /><br />";
            echo $error."<br /><br />";
            echo "Please go back and fix these errors.<br /><br />";
            die();
        // validation expected data exists
        if(!isset($_POST['name']) ||
            !isset($_POST['email']) ||
            !isset($_POST['message'])) {
            died('We are sorry, but there appears to be a problem with the form you submitted.');      
        $first_name = $_POST['name']; // required
        $email_from = $_POST['email']; // required
        $comments = $_POST['message']; // required
        $error_message = "";
        $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
      if(!preg_match($email_exp,$email_from)) {
        $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
        $string_exp = "/^[A-Za-z .'-]+$/";
      if(!preg_match($string_exp,$name)) {
        $error_message .= 'The Name you entered does not appear to be valid.<br />';
      if(strlen($message) < 1) {
        $error_message .= 'The Comments you entered do not appear to be valid.<br />';
      if(strlen($error_message) > 0) {
        died($error_message);
        $email_message = "Form details below.\n\n";
        function clean_string($string) {
          $bad = array("content-type","bcc:","to:","cc:","href");
          return str_replace($bad,"",$string);
        $email_message .= "Name: ".clean_string($name)."\n";;
        $email_message .= "Email: ".clean_string($email)."\n";
        $email_message .= "Message: ".clean_string($message)."\n";
    // create email headers
    $headers = 'From: '.$email_from."\r\n".
    'Reply-To: '.$email_from."\r\n" .
    'X-Mailer: PHP/' . phpversion();
    @mail($email_to, $email_subject, $email_message, $headers); 
    ?>
    <?php
    ?>

    PHP CODE:  SaveAs send_form_email.php
    <?php
    if(isset($_POST['email'])) {
        // EDIT THE 2 LINES BELOW AS REQUIRED
        $email_to = "[email protected]";
        $email_subject = "Your email subject line";
        function died($error) {
            // your error code can go here
            echo "We are very sorry, but there were error(s) found with the form you submitted. ";
            echo "These errors appear below.<br /><br />";
            echo $error."<br /><br />";
            echo "Please go back and fix these errors.<br /><br />";
            die();
        // validation expected data exists
        if(!isset($_POST['name']) ||
            !isset($_POST['email']) ||
            !isset($_POST['message'])) {
            died('We are sorry, but there appears to be a problem with the form you submitted.');     
        $name = $_POST['name']; // required
        $email_from = $_POST['email']; // required
        $comments = $_POST['message']; // required
        $error_message = "";
        $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
      if(!preg_match($email_exp,$email_from)) {
        $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
        $string_exp = "/^[A-Za-z .'-]+$/";
      if(!preg_match($string_exp,$name)) {
        $error_message .= 'The Name you entered does not appear to be valid.<br />';
      if(strlen($message) < 2) {
        $error_message .= 'The message you entered does not appear to be valid.<br />';
      if(strlen($error_message) > 0) {
        died($error_message);
        $email_message = "Form details below.\n\n";
        function clean_string($string) {
          $bad = array("content-type","bcc:","to:","cc:","href");
          return str_replace($bad,"",$string);
        $email_message .= "Name: ".clean_string($name)."\n";
        $email_message .= "Email: ".clean_string($email_from)."\n";
        $email_message .= "Message: ".clean_string($message)."\n";
    // create email headers
    $headers = 'From: '.$email_from."\r\n".
    'Reply-To: '.$email_from."\r\n" .
    'X-Mailer: PHP/' . phpversion();
    @mail($email_to, $email_subject, $email_message, $headers);
    ?>
    <!-- include your own success html here -->
    Thank you for contacting us. We will be in touch with you very soon.
    <?php
    ?>
    HTML Code -- save as html page.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Contact Form</title>
    </head>
    <body>
    <section id="contact" class="four">
    <div class="container">
    <header>
    <h2>Contact</h2>
    </header>
    <form method="post" action="send_form_email.php">
    <div class="row half"> <div class="6u">
    <input type="text" class="text" name="name" placeholder="Name" />
    </div>
    <div class="6u">
    <input type="text" class="text" name="email" placeholder="Email" />
    </div>
    </div>
    <div class="row half"> <div class="12u">
    <textarea name="message" placeholder="Message"></textarea>
    </div>
    </div>
    <div class="row">
    <div class="12u">
    <input type="submit" name="submit" value="Send">
    </div>
    </div>
    </form>
    </div>
    </section>
    </body>
    </html>
    Upload both to your Apache server to test.
    EDIT:  changed typo on Submit button -- valuse to value.
    Nancy O.

  • Need Help regarding a simple mobile application

    Hello friends,
    I am bit newbee to J2ME technology.
    I have basic understanding about MIDLETS.
    Friends,i am designing an instant messenger using midlet.
    Could anyone send some idea's of how to design a CHAT application.IF some one can give a small code of implementing it could be really helpful....
    Looking for your help!!!
    Thanks In Advance !!!
    Regards,
    RAHUL

    You have been no help but I will post again hoping someone else can reply....
    Here is a more exact detailing of what I am trying to do:
    I am hosting a text file here:
    http://www.geocities.com/biocx/entertainer.txt
    And when I open up MMAPI Demo and go to simple player, and then URL and paste this in, it plays the simple rtttl/midi file. It is doing this through RingToneConverter.
    Now all I want to do, and this is the part I need help with, is while it is playing, I want the notes to be displayed on screen. Can anyone help me with this! I have tried and every time is gives me a problem saying that the RingToneConverter Class isn't abstract and I cannot print to screen...
    If someone could help me with this, it would be greatly appreciated.
    Thank you,
    Mike

  • Help with after effects cc application manager error

    ok i have a issue when i install adobe after effects cc it comes up with cant start trial application manager is damaged or corrupted and i downloaded adobe aplication manger 8 and it gives me this error
    does anyone have any ideas as i lost on what to do now
    thanks in advance elfen

    After checking we performed the test Next:
              Remove all fonts except the original.
              Test opening After Effects project => OK
              Then we submitted the most used by the graphics progessivement fonts.
    The problems is many Fonts, Thanks for your help Will  
    Cdlt

  • Need help with simple php files

    I have simple php files that are setup with includes for a header, sidebar and footer... all other data is within the file. There is no dynamic info on the pages, yet I cannot get the files to load up in InContext. Is there a way to make this work?
    I can get an html file to work flawless, but something seems to stop the php file from working.
    Thanks,
    Ken Henderson

    What I mean is, whenever I try to edit any file with a php extension, I get a 404 error... even a simple file with no includes. I created a php file with one line of text within an editable region and I still could not edit it with InContext.
    The site I'm trying to work with is http://www.thunderbirdchemical.com
    The homepage is index.php
    The simple test file I made is test.php
    Thanks for your help.
    Ken

  • Please help with developing a simple application

    I have small reference book that is falling apart, that I can no longer get a copy of, and would like to get it put onto my iphone. It's a book I use often.
    I just want to be able to put in a number or title name and have the app find the text. I'm prepared to enter all the text, but have no idea where to go from there. It's only for mine and my brother's use, so not worth paying for it to be done.
    Can anyone help me?
    Thanks in advance,
    Kerrie.

    Hi Kerrie,
    The resources provided here: http://developer.apple.com/ will help you create an iPhone application.
    If you don't want to create the app yourself, you can look for a consultant here: http://consultants.apple.com/
    -Jason

  • Help with MySQL/PHP Connection

    Hi,
    I'm making a site that requires the storage of information via MySQL.  I've set up my testing server, and it connects fine.  When I try to add a MySQL connection, however, I keep getting the "HTTP Error Code 404: File Not Found" error.  I've tried using both the MySQL server provided by my web host and one hosted on my own computer (using "localhost" as the server), but both give me the same error.  The error box says that perhaps:
    1) There is no testing server running on the server machine.
    2) The testing server specified for this site does not map to the http://**mywebsite**.com/_mmServerScripts/MMHTTPDB.php URL.  Verify that the URL Prefix maps to the root of the site.
    I'm certain it's not #1, because both of my MySQL servers work fine outside of Dreamweaver.  But I'm not quite sure what #2 is saying.  Any help?
    Thanks in advance.

    nickf77 wrote:
    I have my testing server set up at my FTP account that came with my hosting package.  Should it not be?
    It's not ideal, but you can do it that way. The principle is still the same.
    When using a remote connection, the value of Host directory is the same as you use for FTP connections to your remote site. In many cases, this is left blank, is simply a forward slash, or is something like public_html. In any event, it's the root level of your website.
    URL prefix is also the root level of your site, but expressed as a URL: http://www.example.com/.
    Host directory and URL prefix must both point to the same place. The first is a path, the second is a web address.

  • Help with Flex - PHP - and SQL Server

    Good afternoon,
    I have been working on this problem for over a week and am at
    my wit's end. I am trying to create an application that will allow
    me and my fellow statisticians to share code easily. The
    technologies at my disposal are Flex, PHP and SQL Server 2005. The
    web server is IIS. I have downloaded and installed the PHP driver
    for SQL Server 2005 and am able to query the database and generate
    XML. The problem I'm having is that I can't return the XML from PHP
    to Flex.
    If I execute the php code in a web browser and view the
    source, it looks like XML. I can then cut and paste the exact same
    code into an xml file and read it in from the harddisk and the tree
    will populate. Can anyone please help me? I don't have flex builder
    so I it's hard for me to use trace and view what is going on.
    Thanks in advance,
    Eric Graves

    Thanks for the suggestion. I have tried every permutation of
    e4x path notation I can think of. You're right, you're not supposed
    to need the root level as that's supposed to be returned in the
    result. So you should only need to reference first level after the
    root. When I do this and launch the .SWF I get a completely empty
    tree.
    I think the problem lies somewhere in my understanding of
    what format Flex needs returned from a HTTPRequest. It's my
    understanding that it just needs to be XML. As far as I can tell,
    that's what I'm sending it. On the PHP side, does it have to be
    cast a special way? Everything I've seen just shows people using
    ECHO to output the XML data.

  • Please help with m-audio mobile pre driver not connecting with garageband08

    hey i just updated my powerbook G4 with leopard and lost my m-audio (mobile pre) driver in system preferences so i downloaded it b/c i don't have my original disc, the downloaded version shows in my system preferences now but won't appear in the garageband preferences audio/midi input, my only choices are built in mono/sterio. any ideas? besides finding the disc? i'd really appreciate any help as my band is trying to record a cd.

    Yeah, the Mobile Pre is not going to work on Leopard until M-Audio updates their drivers, unfortunately.
    There is one workaround that I've gotten to work, but it probably won't work for most folks. If you have two partitions on your system, one with Leopard and one with Tiger, you can get the mobile pre to work in Leopard. It's a bit odd, but it does work.
    First, boot into you Tiger partition that has the Mobile Pre drivers installed and verify that the system sees and can use the Mobile Pre.
    Now, boot into Leopard. Your Leopard system should now see the Mobile Pre and you should be able to use it until you have to reboot the Leopard system.
    If you have an external HD with Tiger installed, you might also be able to get this to work w/out having to repartition your system. Just install Tiger on the external HD, boot from it, then install the Mobile Pre drivers.
    Hope this helps and possibly provides some temporary relief until M-Audio updates their drivers....

  • Help with playing sound in applications

    im new to java and i was practicing playing sound in a swing application but the problem is that when i press the play button no sound is played...here is my code
    import javax.swing.*;
    import java.applet.AudioClip;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.io.File;
    public class JukeBox extends JFrame {
        private JLabel label;
        private JPanel panel, buttonPanel;
        private JComboBox playList;
        private JButton play, stop;
        private URL url1, url2, url3, url4, url5, url6;
        private AudioClip[] musicList;
        private AudioClip current ;
        public JukeBox() {
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            setSize(500, 120);
            setLocation(50, 50);
            setTitle("JAVA JukeBox");
            url1 = url2 = url3 = url4 = url5 = url6 = null;
            current = null;
            try {
                url1 = new URL("file", "localhost", "C:\\Documents and Settings\\KADA\\IdeaProjects\\Sound\\bottle-open.wav");
                url2 = new URL("file", "localhost", "C:\\Documents and Settings\\KADA\\IdeaProjects\\Sound\\BP2.mp3");
                url3 = new URL("file", "localhost", "C:\\Documents and Settings\\KADA\\IdeaProjects\\Sound\\fhm.aiff");
                url4 = new URL("file", "localhost", "C:\\Documents and Settings\\KADA\\IdeaProjects\\Sound\\jungle.rmf");
                url5 = new URL("file", "localhost", "C:\\Documents and Settings\\KADA\\IdeaProjects\\Sound\\spacemusic.au");
                url6 = new URL("file", "localhost", "C:\\Documents and Settings\\KADA\\IdeaProjects\\Sound\\trippygaia.mid");
            } catch (MalformedURLException e) {
                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
            musicList = new AudioClip[7];
            musicList[0] = null;
            musicList[1] = JApplet.newAudioClip(url1);
            musicList[2] = JApplet.newAudioClip(url2);
            musicList[3] = JApplet.newAudioClip(url3);
            musicList[4] = JApplet.newAudioClip(url4);
            musicList[5] = JApplet.newAudioClip(url5);
            musicList[6] = JApplet.newAudioClip(url6);
            label = new JLabel("JAVA JukeBox", JLabel.CENTER);
            String[] musicList = {"select a track..."
                    , "bottle open"
                    , "bitch please II"
                    , "flutte, harmonica, mambo"
                    , "jungle"
                    , "spacemusic"
                    , "trippygaia"};
            playList = new JComboBox(musicList);
            playList.addActionListener(new ListListener());
            play = new JButton("Play");
            play.setActionCommand("play");
            play.addActionListener(new ButtonListener());
            stop = new JButton("Stop");
            stop.addActionListener(new ButtonListener());
            buttonPanel = new JPanel();
            buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
            buttonPanel.add(play);
            buttonPanel.add(stop);
            panel = new JPanel();
            panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
            panel.add(label);
            panel.add(Box.createRigidArea(new Dimension(0, 5)));
            panel.add(playList);
            panel.add(Box.createRigidArea(new Dimension(0, 5)));
            panel.add(buttonPanel);
            getContentPane().add(panel);
        private class ButtonListener implements ActionListener {
            public void actionPerformed(ActionEvent e) {
                if(current != null){
                    current.stop();
                if(e.getActionCommand().equalsIgnoreCase("play")){
                    if(current != null){
                        current.play();
        private class ListListener implements ActionListener {
            public void actionPerformed(ActionEvent e) {
                if (current != null) {
                    current.stop();
                current = musicList[playList.getSelectedIndex()];
        public static void main(String[] args) {
            setDefaultLookAndFeelDecorated(true);
            JukeBox jb = new JukeBox();
            jb.setVisible(true);
            jb.setResizable(false);
    }can u please tell me whats wrong with my code coz i cant hear no sound when i press the play button and can u please tell me why i cant simply put the file name in the URL instead of the complete path although the files are in the same directory of the source code and can i play mp3 using this little program ???
    plz help...im a newbie so plz explain as much as u can...

    After
    musicList = new AudioClip[7];
            musicList[0] = null;
            musicList[1] = JApplet.newAudioClip(url1);
            musicList[2] = JApplet.newAudioClip(url2);
            musicList[3] = JApplet.newAudioClip(url3);
            musicList[4] = JApplet.newAudioClip(url4);
            musicList[5] = JApplet.newAudioClip(url5);
            musicList[6] = JApplet.newAudioClip(url6);initialise the variable current with
    current = musicList[1];or similar because the AudioClip current always == null in your code so your listener blocks don`t execute.
    regards

Maybe you are looking for

  • Infoviewer Error - Failed to open the connection.

    Hi, I get the below error when tring to view a report from infoviewer? Failed to open the connection. Products.rpt Details: [Database Vendor Code: 12154 ] Also where can i find the log files for CMC and infoviewer? Thanks in advance

  • Error while configuring APEX

    I have completed the installation of APEX and HTTP server on an instance. But while configuring , I got the following error in the login page. Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance

  • Old plug-ins for new Elements

    I'm running Mac OS X 5.8 (Leopard) and using iPhoto '09 as my "organizer". I just installed Elements v.10 and I'd like to know if and how to install plug-ins (On One Essentials for Elements and One-Click WOW) that I used for Elements v.4.  Will they

  • Automatic Credit note through condition type

    Dear Experts How can i generate a Credit note automatically, after i post my invoice. I wish to create this credit note to settle the payments of the Broker's and commision agent, who had brought the business to my orgnisation Regards Sudhir

  • Password should not be displayed in Windows 64 bit machine

    Hi I am not sure whether this category is apt for my question. We have a requirement to mask the password entry in our utility in Windows 64 bit machine. I was trying to run the following from a 64 bit Windows machine . @echo off echo hP1X500P[PZBBBf