7 sounds work - 8th and 9th sounds do not work
<p>I am writing a basic sound board. I've got it to my phone and it works fine.
Well for the most part. The first 7 buttons work but the 8th and 9th buttons don't.
My only thought is that it is a memory issue and I should't be creating all 9 mp's at the same time at the start of the program. Perhaps the 8th and 9th are just a little too much for memory.</p>

<p>Does anyone have any thoughts as to why the 8th and 9th buttons don't work in the following code? They work in the emulator but crash my phone. I know the code isn't perfect -I'm learning. But a point in the right direction would be great.</p>

<p>Thanks for any help you can offer!</p>

<pre><code>package testing.Variables.Levack;

import android.app.Activity;
import android.os.Bundle;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Button;
import android.view.View.OnClickListener; 
import android.widget.Button;
import android.view.View;
import android.media.MediaPlayer;

public class TestingVariablesActivity extends Activity {
    /** Called when the activity is first created. */
    TextView tt;
    Button messageButton1,messageButton2,messageButton3,messageButton4,messageButton5,messageButton6,messageButton7,messageButton8,messageButton9;

  MediaPlayer mp1,mp2,mp3,mp4,mp5,mp6,mp7,mp8,mp9 = null;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        mp1 = MediaPlayer.create(this, R.raw.baboon);
        mp2 = MediaPlayer.create(this, R.raw.backoff);
        mp3 = MediaPlayer.create(this, R.raw.dark6);
        mp4 = MediaPlayer.create(this, R.raw.dontneedroads);
        mp5 = MediaPlayer.create(this, R.raw.hua);
        mp6 = MediaPlayer.create(this, R.raw.hulk);
        mp7 = MediaPlayer.create(this, R.raw.itsaclipon);
        mp8 = MediaPlayer.create(this, R.raw.ht);
        mp9 = MediaPlayer.create(this, R.raw.truth1);

   messageButton1=(Button)findViewById(R.id.messageButton1);
   messageButton1.setOnClickListener(startListener);

   messageButton2=(Button)findViewById(R.id.messageButton2);
   messageButton2.setOnClickListener(startListener);

   messageButton3=(Button)findViewById(R.id.messageButton3);
   messageButton3.setOnClickListener(startListener);

   messageButton4=(Button)findViewById(R.id.messageButton4);
   messageButton4.setOnClickListener(startListener);

   messageButton5=(Button)findViewById(R.id.messageButton5);
   messageButton5.setOnClickListener(startListener);

   messageButton6=(Button)findViewById(R.id.messageButton6);
   messageButton6.setOnClickListener(startListener);

   messageButton7=(Button)findViewById(R.id.messageButton7);
   messageButton7.setOnClickListener(startListener);

  messageButton8=(Button)findViewById(R.id.messageButton8);
 messageButton8.setOnClickListener(startListener);

   //messageButton9=(Button)findViewById(R.id.messageButton9);
   //messageButton9.setOnClickListener(startListener);

    }

  private OnClickListener startListener =new OnClickListener()  {
    public void onClick(View v)
    { 

               switch(v.getId()) { 
                   case R.id.messageButton1: 
                        mp1.start();
                        break; 
                   case R.id.messageButton2: 
                         mp2.start();
                         break; 
                   case R.id.messageButton3: 
                        mp3.start();
                        break; 
                   case R.id.messageButton4: 
                        mp4.start();
                        break;  
                   case R.id.messageButton5: 
                        mp5.start();
                        break; 
                   case R.id.messageButton6: 
                        mp6.start();
                        break;  
                   case R.id.messageButton7: 
                        mp7.start();
                        break; 
                   case R.id.messageButton8: 
                        mp8.start();
                        break;
                //   case R.id.messageButton9: 
                       //   mp9.start();
                        //break; 

           } 


        }   
        };









    }
</code></pre>
