About playing dynamic generated sound using Sound class

Dear sir:
The live doc of Flex 4 says:
In Flash Player 10 and later and AIR 1.5 and later, you can also use this    class to work with sound that is generated dynamically.    In this case, the Sound object uses the function you assign to a sampleData event handler to   poll for sound data. The sound is played as it is retrieved from a ByteArray object that   you populate with sound data.
and i read one article(the following link)
http://www.kaourantin.net/2008/05/adobe-is-making-some-noise-part-2.html
it said: The Sound class only support 44100 sample rate,32 bit,2 channel sound data, is that true?
Then if i get one ByteArray( 8000 sample rate,16bit,1 channel), how can i modify it to let the Sound class play it?
thanks..

Worked perfectly.  Thank you thank you!
Jen

Similar Messages

  • Generating reports using RWServlet.class(Patch-12)

    Sir,
    We have configured the Apache Tomcat-3.2.2 to be the servlet engine for generating reports using oracle.reports.rwcgi.RWServlet. Earlier we have been using, Patch-2. We have created many keys(cgicmd.dat) for the different reports that are there with the mostly needed report parameters(including PARAMFORM=YES). We call the report in the browser giving the URL "http://<machine_name>/oraclereports/servlet/oracle.reports.rwcgi.RWServlet?<key_name>". Now, the report page that gets generated is the parameter form. In the HTML source of this page, the form-submitting action is pointing correctly to URL "http://<machine_name>/oraclereports/servlet/oracle.reports.rwcgi.RWServlet.....". The parameter values are entered and the form submitted. The generated report is perfect..
    Some days before, Patch-10 was installed. The RWServlet.class that comes along with this was copied to the oracle/reports/rwcgi folder in Tomcat. Now, when the same steps(calling report) as done before were done, the report is not getting generated, giving the output for no page found. The HTML source of the parameter form shows the form-submitting-action URL as "http://<machine_name>/servlet/oracle.reports.rwcgi.RWServlet.." omitting the "oraclereports" that was there earlier.
    Now, we have installed Patch-12, copied the new RWServlet.class. For this case also, the same problem is now encountered. Now, have we have to do any additional configuration somewhere? The page that is generated, on giving the URL ""http://<machine_name>/oraclereports/servlet/oracle.reports.rwcgi.RWServlet/showenv?server=Rep60_MACHINENAME" is showing the SCRIPT_NAME as "/servlet/oracle.reports.rwcgi.RWServlet". Is it something to do with this? We tried putting SCRIPT_NAME as a user environment variable, and also by giving SET SCRIPT_NAME=/oraclereports. Still, the problem persists. Doesn't the HttpServletRequest class have some method that returns the SCRIPT_NAME, i.e, the path where the execution is being done? How could different versions of the same class oracle.reports.rwcgi.RWServlet deployed with the same settings on the Tomcat servlet engine behave differently? Please help us on how to solve this problem..
    Thank you,
    Regards..
    Ranjith

    Hi,
    Is there some way, i.e., by doing some Tomcat setting changes, that the RWServlet of Patch-10/12 can be made to work like RWServlet of Patch-2(with normal settings)? Please help..
    Thank you,
    Regards..
    Ranjith

  • Accesing dynamically generated UI elemnts using Automation tool

    Hi,
    I want to test my iOS app. It contains dynamically generated UI elemnts.
    I can't print them with logElementTree() and I don't know how to access the  dynamically generated elements.
    If there is any way I can access dynamically generated elements using a script?
    Any help will be highly apreciated
    Thank You and best regards
    Aruna

    I am beginning to think that there is no solution to my problem. Let me better define the problem:
    1. Automation tool does not see extended check box.
    2. The container of extended check box is standard tree (nothing to instrument).
    3. Extended check box is third party component which was derived from standard button, and not standard check box (theoretically nothing to instrument again).
    4. Extended check box was used in item renderer class of the tree.
    Maybe elements used in item renderers cannot be exposed to automation tools (I have tried FlexMonkey and RiaTest, but they both failed)?

  • Using bigdecimal class

    I was using Gregory-Leibniz series to calculate PI = 4 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 + ...
    Something like:
    double pi = 0.0;      
           int limit = 3000000;      
           for (int i = 0, y = 1; i <= limit; y+=2, i++)
                     if (y == 1)
                          pi = 4;
                   else if (i % 2 == 0)
                          pi += (double)4/y;            
                     else
                          pi -= (double)4/y;                                                   
                     System.out.println(String.format("Loop %d: %.20f", i, pi));                                    }Then I realized PI isn't going to be totally accurate according to IEEE Standard for Binary Floating-Point Arithmetic that java math calculation uses, so I was trying to use BigDecimal class (new to me), this is what I got initally...
             BigDecimal pi = new BigDecimal("0.00");           
              int limit = 3000000;
              for (int i = 0, y = 1; i <= limit; y += 2, i++)
                  if (y == 1)
                          pi = new BigDecimal("4.0");
                   else if (i % 2 == 0)
                          pi = pi.add(new BigDecimal( Double.toString( (double) 4 / y )));
                     else
                          pi = pi.subtract(new BigDecimal( Double.toString( (double) 4 / y )));
                        System.out.println(String.format("Loop %d: %s", i, pi.toString()));                                       
    I realize that when I do the 4/y calculations involving both doubles... the result is probably stored according to the IEEE standards which is the thing to avoid... Is that correct? Is my PI result going to be accurate?
    I noticed with this one decimals up to the 22nd place are all filled with some numbers in the calculations compared with the first one involving only double number calculations which had zero's starting around the 15th decimal.
    Something like doesn't work and ends up with arithmeticexceptions...
    pi = pi.subtract(new BigDecimal("4").divide(new BigDecimal(Integer.toString(y))));
    So I'm actually confused about the right way of using BigDecimal class in this type of calculation to get accurate results. I do realize it's an immutable class and probably a bad idea to use it like this 3 million times in a loop.

    quoting from the API documentation on BigDecimal
    "The BigDecimal class gives its user complete control over rounding behavior. If no rounding mode is specified and the exact result cannot be represented, an exception is thrown; otherwise, calculations can be carried out to a chosen precision and rounding mode by supplying an appropriate MathContext object to the operation."
    That explains the arithmetic exceptions.
    You would be advised to choose your scale first, (that would be the number of decimal places that you want to be using for your calculation. ) Then use the BigDecimal constructors that use the scale value. Construct your BigDecimal 4 outside of the loop so that you are not constructing it over and over again. And finally, read the documentation on how the scale of the result will depend upon the scale of the components going in.
    A little reading and possibly re-reading of the documentation will help in the understanding of the BigDecimal class.

  • API indicator about sound using by the Flash Player

    Is it possible to add an API indicator which will inform about sound using by the Flash Player?
    I mean situation from web browsers where you mostly has few tabs opened and don't know which one is playing the sound. It would be great if Flash Player instance could inform about playing sound. Some kind of API, dynamic HTML tag (playingsound=TRUE/FALSE) or something like this which can give an opportunity to browser to react on. The best example is ofcourse Chrome which has own implementation of Flash Player and adds small speaker icon on tab which is playing the sound.
    The main reason of this thread is issue 486262 – Provide visual indicator as to which tab is causing sound from Mozilla Firefox Development but it can be global feature and helpfull for every browser and other applications using FP.

    Could you do me a favor and post a screenshot of this box that is appearing?
    How do I capture and post a screenshot or video?

  • Why wont sound play though my TV using HDMI anymore?

    Everything worked fine until the power went out one day. Now I can't get sound to play though my TV using my HDMI cable. I have tried fiddling with every setting there is to make it work on both my TV and my imac but nothing seems to work. When I open system preferences there is not any other options for output besides Internal speakers. The speakers on my TV work fine I have tested them. I've tried several different HDMI cables but nothing works. Why would everything work fine one day and then stop the next? was is because of the power outage? can I fix this myself?

    You probably can't because it looks like your MacBook Pro is too old to carry audio over HDMI. You will need to run a separate audio cable from the audio out port on the MacBook Pro to the audio in port on the TV.
    Check your MacBook Pro model year against the list in this Apple tech note:
    About Mini DisplayPort to HDMI adapters
    Learn about the Mini DisplayPort in the latest Mac models that enables audio and video output for DisplayPort and HDMI.

  • I can't play any purchased movies. Sounds like it is the 6.0 update. So what is the fix? Am I just stuck not being able to use my Apple TV until...?

    I can't play any purchased movies. Sounds like it is the 6.0 update. So what is the fix? Am I just stuck not being able to use my Apple TV until...?

    Sorry I can't help but I have potentially a similar problem.
    We have an Apple TV 3 and after the most recent software update (potentially coincidental timing), our purchased movies & TV shows will no longer play for our US account. We can play previews but that's it. We also tried renting a new movie but that didn't work either. No error messsage, just select play, it thinks about it, then returns you to the same screen again.
    Any help greatly appreciated.
    Thanks

  • Rollover buttons to play sound using "loadSound"

    Hi, there
    I am seeking help with the following AS2 code. The target effect: Rolling over each of the two buttons on the main stage plays different sound. The code below works. However, I need to embed it in another application (Articulate) which doesnot allow the use of "_root" and "attachSound". I was recommended to use "loadSound" instead. However, not a coding person, I am at a loss.
    Can anyone help me to change the script below to remove "_root" and "attachSound" and use "loadSound" instead? Thanks so much!
    var mySound:Sound = new Sound();
    mcButton5.onRollOver = function() {
    _root.mySound.attachSound("sound1");
    _root.mySound.start();
    var mySound:Sound = new Sound();
    mcButton6.onRollOver = function() {
    _root.mySound.attachSound("sound2");
    _root.mySound.start();

    I finally got it work, using load Sound...
    Kglad, thanks for your great help, as always!
    mySound1 = new Sound();
    mySound1.loadSound("Sound1.mp3", false);
    mcButton1.onRollOver = function() {
    mySound1.start();
    mcButton1.onRollOut = function() {
    mySound1.stop();

  • How do I change the sound that is played when you iI use the Find my IPhone feature to make it alot louder?  The current sound is very faint, difficult to find as I am hard of hearing.

    How do I change the sound that is played when you I use the Find my IPhone feature to make it alot louder?  The current sound is very faint, difficult to find as I am hard of hearing.

    Hi,
    Tap the iPod icon in the Dock. Then tap the Airplay icon just to the right of the volume slider.
    Make sure the iPad speakers are selected, not your wireless.
    Carolyn 

  • How to code a button to play and pause sound using load sound?

    how to code a button to play and pause sound using load sound?I have used load sound methos to attach the sound.Can anyone help me?

    Hey thnx,
    I have used this code on sound's button's frame.and my stop n play button is on another screen.main sound button and stop button is on diffrent screen.
    Here is my code-
    stop();
    adaDrut1.onRelease = function () {
              mySoundC = new Sound(this);
              mySoundC.loadSound("F#/Bhajni1.ark", true);
    mySoundC.onSoundComplete = function() {
    _root.mySoundC.start(0,999); }
             gotoAndPlay("play2");
            _global.myTaalLaya = "Low1";
    adaDrut1 is a sound button.And there are lot of buttons with diffrent sound.
    Thanks..

  • How do I hear Garageband in multitask? I am playing guitar in GB using Apogee Jam. Would like to read lyrics in Safari while hearing guitar in background. But I can only hear GB when it is the active program. Sound stops if I switch to another app.

    How do I hear Garageband in multitask? I am playing guitar in GB using Apogee Jam. Would like to read lyrics in Safari while hearing guitar in background. But I can only hear GB when it is the active program. Sound stops if I switch to another app.

    http://ww2.cs.fsu.edu/~rosentha/linux/2.6.26.5/docs/DocBook/libata/ch07.html#excatATAbusErr wrote:
    ATA bus error means that data corruption occurred during transmission over ATA bus (SATA or PATA). This type of errors can be indicated by
    ICRC or ABRT error as described in the section called “ATA/ATAPI device error (non-NCQ / non-CHECK CONDITION)”.
    Controller-specific error completion with error information indicating transmission error.
    On some controllers, command timeout. In this case, there may be a mechanism to determine that the timeout is due to transmission error.
    Unknown/random errors, timeouts and all sorts of weirdities.
    As described above, transmission errors can cause wide variety of symptoms ranging from device ICRC error to random device lockup, and, for many cases, there is no way to tell if an error condition is due to transmission error or not; therefore, it's necessary to employ some kind of heuristic when dealing with errors and timeouts. For example, encountering repetitive ABRT errors for known supported command is likely to indicate ATA bus error.
    Once it's determined that ATA bus errors have possibly occurred, lowering ATA bus transmission speed is one of actions which may alleviate the problem.
    I'd also add; make sure you have good backups when ATA errors are frequent

  • Performance problems with external sounds and Sound class

    I'm using Sound & SoundChannel classes to load and play external MP3s and I'm seeing terrible playback performance on my 3G phone. Audio starts out ok, but will gradually get more and more choppy and eventually crashes the app. The MP3s themselves are typical sizes, 2 - 6 MB and of various types (VBR, CBR).
    On top of that, when the phone gets locked (with the app still running), the audio sputters and stops completely. When I unlock, it begins where it left off. Anyone else seeing this?
    My code is pretty standard:
    private var soundPlayer:Sound;
    private var soundChannel:SoundChannel;
    public function load(url:String, playNow:Boolean = true):void {
      if (soundChannel) {
        soundChannel.stop();
      soundPlayer = new Sound();
      soundPlayer.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
      soundPlayer.addEventListener(ProgressEvent.PROGRESS, onProgress);
      soundPlayer.addEventListener(Event.ID3, onID3);
      trace('Loading new stream: '+url);
      var request:URLRequest = new URLRequest(url);
      soundPlayer.load(request);
      if (playNow) {
        this.isPlaying = true;
        soundChannel = soundPlayer.play();
        soundChannel.addEventListener(Event.SOUND_COMPLETE, onSoundComplete);

    this is from another forum (http://discussions.info.apple.com/thread.jspa?threadID=2542931&tstart=0&messageID=12106188 ):
    "I've spoken to the developers of of couple of these apps, and they've all said it's a memory fragmentation/low memory condition.
    Restart the phone. Don't just turn it off and on, but restart it.
    Hold the on/off button and the home button down like you were going to turn it off. When you see the swipe to turn off message, keep holding the buttons down.
    In a few seconds the screen will flash, and then go dark.
    Now it's really off.
    Turn it back on (restarting it). All should be well.
    The iPhone is really a computer. Performing a restart like this every  once in a while (weekly, bi-weekly) is a good idea, esp if you use  memory intensive apps."
    coop

  • Needs help.....Please about using different classes

    I don't know how to use differenet classes.
    Please tell me how to write class to suit Start. This stuff me up. Please .... help me
    <<My program>>
    //Start
    public class Start
    {  private Artist[] Artists;
    private Record[] records;
    private Person[] Manager;
    private TextMenu makeMenu = new TextMenu();
    public static void main(String[] args)
         Start studio = new Start();
    studio.menu();
    public Start()
    {  //Person.Manager(ManagerName,HouseNumber,StreetNumber,PhoneNumber)
         Manager = new Person[1];
         Manager[0] = new Person("Yangfan",88,"Young ST",11118888);
         //Artist(GroupID,ArtistName,HouseNumber,StreetNumber,PhoneNumber)
         Artists = new Artist[5];
    Artists[0] = new Artist(1,"Backstreet Boys",58,"Music ST",99998888);
    Artists[1] = new Artist(2,"Santana",68,"Music ST",99998899);
    Artists[2] = new Artist(3,"Macy Gray",78,"Music ST",55558888);
    Artists[3] = new Artist(4,"Ricky Martin",88,"Music AVE",77778888);
    Artists[4] = new Artist(5,"Did Rock",55,"Music Road",66667777);
    //Record(RecordingID,RecordName,Artist,StartTime,FinishTime,RecordingDate,GuestArtist1,GuestArtist2)
    records = new Record[6];
    records[0] = new Record(1,"I want it that way",Artists[0],11,12,"05/08/2001",Artists[1],Artists[3]);
    records[1] = new Record(2,"Smooth",Artists[1],11,12,"05/08/2001",Artists[1],"");
    records[2] = new Record(3,"Do something",Artists[2],11,"05/08/2001",Artists[3],"");
    records[3] = new Record(4,"Livin La Vida Loca",Artists[3],11,12,"05/08/2001",Artists[1],Artists[3]);
    records[4] = new Record(5,"Bawitdaba",Artists[4],11,13,"05/08/2001",Artists[1],"");
    records[5] = new Record(6,"The one",Artists[0],11,14,"05/08/2001",Artists[1],"");
    public void menu()
    {  String[] choices = {">>>List Manager Details",">>>List All Artist Names",">>>List An Artist Telephone-Number",">>>Show Details For One Recording",">>>Add A New Recording",">>>List The Recording Costs For All Artists",">>>List Artist's Reocording",">>>Exit Program"};
    while (true)
    {  switch (makeMenu.getChoice(choices))
    {  case 1: showAllArtists();
    break;
    case 2: showAllRecords();
    break;
    case 3: System.exit(0);
    break;
    case 4: System.exit(0);
    break;
    case 5: System.exit(0);
    break;
    case 6: System.exit(0);
    break;
    case 7: System.exit(0);
    break;
    case 8: System.exit(0);
    break;
    default:
    public void showAllArtists()
    {  int numArtists = Artists.length;
    for(int i = 0; i < numArtists; i++)
    {  Artists[i].displayArtistDetails();
    public void showAllRecords()
    {  for (int i = 0; i < records.length; i++)
    {  System.out.println();
    records.printRecordDetails();
    <<Assignment>>
    Due - midnight, Wednesday August 22nd
    This assignment will test your knowledge of Java programming using classes, encapsulation and javadoc.
    The base requirements
    Write a complete Java class to manage a Digital Recording Studio. The studio wants to keep a list of all Artists that use the studio and also wishes to keep track of all Recordings that have been made. An important function of the program is to calculate the time spent making a recording and charge the Artist for the time used.
    You must create at least the following classes, Start, Studio, Person, Artist, Recording, Address. You may create other classes if needed as well
    Start will contain main(), create one instance of a Studio and execute a Menu of commands to test your code. Studio should contain a studio name, an array of Artist and an array of Recording plus the studio manager (a Person). Each Artist should contain the name of the group and an Address. Each Person will have a name and a home address. Each recording will have a Title (usually song title), an Artist (only one), and a list of guestArtist (they are Artist�s but will not receive royalties) the number of the CD the recording is stored on (numbers are numerical and recordings are saved on CD-R), plus the recording start and finish times for the recording session (suggest you use Java Date class � refer to the API). An Address will contain, house number (integers only), a street name and a telephone number. There is no need to store city and country.
    To enter a set of data for testing your program � main() should call a method in the Start class that will fill in a set of values by creating objects and filling in values by calling methods in each class. This is the ONLY method allowed to be longer than 1 page long � normally we would read the data from a file but there are no O-O principles that can be learnt with simply filling in data values. It is suggested to create say at least 4 Artist�s and 6 Recordings (at least one with 1 guest Artist and one with 2 guestArtist�s)
    A menu for testing your program should be provided (it is suggested to put the Menu into a separate class as you need at least 3 menus). While other commands are possible, only the following ones will receive marks.
    Menu commands needed are
    List the Managers name, address and telephone number
    List all Artist Names
    List an Artist telephone number (a sub menu showing valid Artist�s is required)
    Show all details for one Recording ( sub menu of valid Recordings will be needed and remember there can be more than one guestArtist)
    Add a new Recording, user will need to be prompted for all details.
    List the recording costs for all Artists � show each Artist on a separate line with their name and total amount, charge for using the studio is $1000 per hour or part thereof, example for a 1 hour and 10 minute recording the Artist will be billed for 2 hours.
    List all the Recording�s one Artist has worked on (sub menu of Artists needed), the list should show whether they were the Artist or a guestArtist
    Exit program
    Use fixed sizes for arrays, suggest 20 is suitable for all arrays. Java can handle dynamic data structures (where the number of elements can grow or shrink), but that is beyond a first assignment.
    Do NOT make ANY methods static - this defeats the Object Oriented approach and will result in ZERO marks for the entire assignment.
    Data MUST be encapsulated, this means that all the data relating to an object are to be stored INSIDE an object. None of the data detail is to be globally available within your program - hence do not store Artist names in either Studio or Recordings � just store a reference instead. Do NOT create ID numbers for Artists, you should use References instead � for many students this will be the hardest part as you have to use Objects, not program in a C style to solve the problem. Note that if there are any non-private data in classes then zero will given for marks for encapsulation.
    Good programming style is expected (see web page or lecture notes). In particular, you must use javadoc to generate a set of html pages for your classes. Make sure you use the special javadoc style comments in your source code. Marks will be granted for both using javadoc and also for including sensible javadoc comments on each class and each public method.
    What to Hand In
    Read the turnin page, basically the .java files, a readme.txt to tell the marker which file the program starts from plus the javadoc (html) files. Do NOT send .class files (if you do send these we will delete them and recompile your program), do NOT compress with gtar, tar, zip or use any other tool on your files. Turnin automatically compresses all your files into a single archive for us to mark.
    The simplest way to turnin all your files is to place all files in one directory then just use the *.* wildcard to turn in all files within that one directory.
    You must turnin all files that are not part of Java 1.3. In particular, you are allowed (actually encouraged) to use EasyIn or SavitchIn but should include the one you use in the files you submit. It is STRONGLY suggested that you copy all the files into another directory, test it works there by compiling and executing then turnin files from that directory. A common problem is students adding comments at the last minute then not testing if it still compiles. The assignment will be marked as submitted � no asking later for leniency because you added comments at the last minute and failed to check if it still worked.
    If the tutors are unable to compile your submission, they will mark the source code but you will lose all the execution marks. Sorry, but it is your responsibility to test then hand in all files.
    Comments
    For CS807 students, this program should be fairly easy if it was to be programmed in C (you would use several struct). The real art here is to change over to programming objects. Data is contained in an object and is not global. This idea is essential to using Java effectively and is termed encapsulation. Instead of using function(data), you use objectName.method( ). Effectively you switch the data and functions around, the data has a method (function) attached to it, not the other way around as in C (where you have a function and send data to it).
    While there will be some marks for execution, the majority of the marks will be given for how well you write your code (including comments and documentation) and for how well you used O-O principles. Programs written in a C style with most of the code in one class or using static will receive ZERO marks regardless of how well they work.
    You are responsible for checking your turnin by reading the messages turnin responds with. Failure to read these messages will not be an acceptable excuse for submitting an incorrect assignment. About 2% of assignments sent to turnin are unreadable (usually empty) and obtain 0.
    Late submissions
    Late submissions will only be accepted with valid reasons for being late. All requests for assignment extensions must be made via email to the lecturer. Replies for acceptance or refusal will made by email. Instant replies are unrealistic (there is usually a flood of queries into my mail box around assignment due dates) and the best advice is to ask at least 4 days in advance so that you will have a reasonable chance of getting a timely reply and allow yourself enough time to submit something on time if the extension is not granted.
    ALL late submissions will be marked LAST and will NOT be sent to tutors for marking until all other assignments have been marked. As an example, if you submit late and your assignment is not yet marked by the time assignment 2 is due then it will be pushed to the end of the marking pile as the assignments that were submitted on time for assignment 2 will take priority.
    If you make a second submission after the submission date, only the first submission will be marked. We will not mark assignments twice! You can update your submission BEFORE the submission date if you need to - this will just overwrite the first submission. The latest time for a late submission is 5pm on the Wednesday after the due date. This is because, either a solution will be handed out at that lecture or details of the assignment will be discussed at the lecture. I cannot accept any assignment submissions after that time for any reason at all including medical or other valid reasons. For those who are given permission to be later than the maximum submission time � a different assignment will be handed out. Remember, if you decide to submit late you are VERY UNLIKELY to receive feedback on your assignments during semester.
    Assignments will be removed from turnin and archived elsewhere then forwarded to tutors for marking on the morning after the assignment is due. A different tutor will mark each of your assignments � do not expect the tutor you see at the tutorials to be your marker.
    Marks will be returned via email to your computer science yallara account � ideally within 2 weeks. I will send marks out when I receive them so do not send email asking where your marks are just because a friend has theirs. If you want your email forwarded to an external account, then place a valid .forward file into your yallara account. The Help Desk on level 10 can assist you in setting this up if you do not know how to do it.

    I have seen other people who have blatantly asked for
    other people to do their homework for them, but you
    are the first person I've seen to actually cut and
    paste the entire assignment as it was handed to you.
    Amazing.
    Well, unlike some of the people you're talking about, it seems like zyangfan did at least take a stab at it himself, and does have a question that is somewhat more sepcific that "please do this homework for me."
    Zyangfan,
    marendoj is right, though. Posting the entire assignment is kind of tacky. If you want to post some of it to show us what you're trying to do, please trim it down to the essential points. We don't need to see all the instructor's policies and such.
    Anyway, let me see if I understand what you're asking. You said that you know how to write the code, but only by putting it all in one class, is that right? What part about using separate classes do you not understand? Do you not know how to make code in one class aware that the other class exists? Do you not know how code in class A can call a method in class B?
    Please be a bit more specifice about what you don't understand. And at least try using multiple classes, then when you can't figure out why something doesn't work, explain what you did, and what you think should have happened, and what did happen instead.
    To get you started on the basics (and this should have been covered in your course), you write the code for two classes just like for one class. That is, for class A, you create a file A.java and compile it to A.class. For class B, you create a file B.java and compile it to B.class. Given how rudimentary you question is, we'll skip packages for now. Just put all your class files in the same directory, and don't declare packages in the .java files.
    To call a method in class B from code that's in class A, you'll need an object of class B. You instantiate a B, and then call its methods.
    public class B {
      int count;
      public B() { // constructor
      public void increment() {
        count++;
    public class A {
      public static void main(String args[]) {
        B b = new B();
        b.increment();
    }Is this what you were asking?

  • How do I get Elements 13 64 bit to play .mts video files with sound as they do in Elements 11 32 bit?

    I have upgraded to Elements 13 64 bit from Elements 11 32 bit and .mts video files now play without sound - they still play perfectly with sound on Elements 11 32 bit.
    Is there something that needs to be changed to get Elements 13 to play them with sound or have Adope simply hooped .mts playback in Elements 13 64 bit?
    I am running on Windows 8.1 Professional with Media Centre on a Dell XPS15 and have Elements 13 64 bit and Elements 11 32 bit installed.
    Adobe, how do I get the support that is supposed to be available for 90 days after activation?

    Hello jl666,
    I have noticed the same issue having upgraded to PSE13 64bit from PSE9 on Windows 7.  This has been reported to Adobe in several forum threads and I have myself tried on three occasions to get Adobe Technical Support to acknowledge or respond to this issue, so far without any success. 
    Despite the fact that Adobe publically claims to support this format, I was told in my last chat with their technical support that I should buy Premiere Pro and that Elements has never and does not support any video data...
    Unterstützte Dateiformate | Premiere Elements, Photoshop Elements
    Here is my chat transcript which I attach in the hope that someone from Adobe will take this issue seriously and work towards providing a fix.
    Sanyogita: Hello. Welcome to Adobe Technical Support.
    Jon Barber: .MTS files no longer play with sound. .DV files no longer play at all.
    Jon Barber: Hello
    Sanyogita: One moment while I look up your customer record.
    Sanyogita: Please allow me a moment to search for the information.
    Jon Barber: ok
    Sanyogita: I can see you have PSE 13
    Jon Barber: Correct and previously PSE 9 where everything worked fine...
    Sanyogita: MAy I know which application are you using for >MTS files
    Sanyogita: .MTS files
    Jon Barber: This issue is mentioned in various threads in your forums as well, but no response or solution from adobe yet
    Jon Barber: Organiser just double clicking on the file to play it. They play, but with no sound. When I play them in Windows the sound is correctly played
    Sanyogita: In PSE 13 there is no provision of playing videos with sound
    Sanyogita: You need premiere pro to play videos with sound
    Jon Barber: Other formats are correctly played with sound. 
    Jon Barber: Please tell me why I have paid €80 to upgrade from PSE9 to get worse functionality then!
    Jon Barber: This is nonsense!
    Sanyogita: You should purchase Premiere pro for videos
    Sanyogita: PSE 13 is only for photos
    Jon Barber: Complete nonsense and not advertised in your documentation. Are you trying to tell me that no video files play with sound, because that is simply not true!
    Sanyogita: Please purchase Premiere elements for videos
    Jon Barber: Adobe sucks - I will pass your comments onto the appropriate forum threads and hope that other customers also let you know how they feel about this reduction in functionality from previous versions.
    Sanyogita: previous versions of PSE never supported video application
    Jon Barber: You are misinformed. These videos work fine on PSE 9 and most files still work on PSE13, just .MTS files have no sound
    Sanyogita: I am sorry ,I am not an expertise in this product
    Sanyogita: Let me connect you to that team
    Jon Barber: Yes,I can tell that - perhaps you could pass this open bug onto someone who does
    Jon Barber: Please do not close this bug - I am getting annoyed at having to reopen it
    Sanyogita: Please stay online I will transfer your chat now
    Jon Barber: ok thank you
    info: Please wait while I transfer the chat to the appropriate group.
    info: You are now chatting with Jayita Sen.
    Jayita Sen: Hello. Welcome to Adobe Technical Support.
    Jayita Sen: Please allow me a moment while I look into your account & verify the details.
    Jon Barber: Hello
    Jayita Sen: John we only support download &  first installation of PSE 13
    Jayita Sen: please contact the forums for further support
    Jon Barber: This issue is mentioned in several forums and no solution has so far been forthcoming from Adobe.
    Jon Barber: I paid €80 to upgrade from PSE9 and now have worse functionality than before and now you are telling me you cannot help. Is that what Adobe considers customer support?!
    Jon Barber: By the way I did recently download and initally install PSE13 so according to your rules you should provide support.
    Jayita Sen: Jon we don't support "Unexpected behaviours or how to issues"
    Jayita Sen: only forums support it
    Jon Barber: This is not a 'how to issue', it is a bug!
    Jon Barber: It is functionality that previously worked and no longer does. I am not requiring lessons in how to use the system, just trying to do something that already worked in previous versions.
    Jon Barber: Frankly I find these support responses from Adobe shocking. What I expect to hear from you is 'thank you for highlighting this issue, we will work on finding a solution and get back to you and others with the same problem in the customer forums" Not an extraordinary set of excuses for poor software.
    Jayita Sen: I am sorry Jon...but forums is where you can only get the support
    Jon Barber: Customers having to help customers since clearly no-one at Adobe has a clue about their own product. How many customers do you expect to have in 12 months with this service?
    Jon Barber: Goodbye - please contact me if you are geniunely interested in helping your customers rather than fobbing them off with excuses.

  • Urgent Help Regarding Using Sound Files

    Hello,
    Using Java is it possible to
    a) represent a .WAV file in WAVE FORM Format (Graph) output.i.e to represent a
    audio file pictorially.
    b) Spilit a .WAV file into n small pieces or portions.
    Please guide me in this regard.Its Urgent
    Thankz

    Hello,
    Using Java is it possible to
    a) represent a .WAV file in WAVE FORM Format (Graph)
    output.i.e to represent a
    audio file pictorially.Open the AudioInputStream, read the AudioFormat, then read the frames one at a time and plot the data.
    Here's some code that plays a wave file using the AudioInputStream. Java Sound, see reply 2. this shows how to open the file and get the format, it just plays it, but is able to plays it, but it does read frames. This should provide a start for you.
    b) Spilit a .WAV file into n small pieces or portions.Yes, see the classes in package javax.sound.sampled.
    >
    >
    Please guide me in this regard.Its UrgentDon't mark your posts as urgent, don't cross post.
    ThankzYou're welcome, hope this helps

Maybe you are looking for