In my class I have an OnTouchEvent and when a certain area is clicked,
it will play a sound (Not sure if this is the best way to go about
this?).  However I have been running into bugs using the MediaPlayer.
Sound will double play and then eventually sound will stop
completely.  I am wondering how to efficiently play 5 sounds.  The
user will be clicking the screen in different areas and different
sounds will be playing.  I have the attached code below but it only
has the first area....say I add in another area how would I go about
changing the media player to play a different sound.


@Override
    public boolean onTouchEvent(MotionEvent e)
    {

        x = e.getX();
        y = e.getY();

        if (x >= 232 && x<=287 && y>=117 && y<=157) {
             //PLAY SOUND
    }

        return true;

}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to