ºÇ½ª¹¹¿·¡§
t_yokky2002 2011ǯ11·î15Æü(²Ð) 19:31:18ÍúÎò
res/raw¥Õ¥©¥ë¥À¤òºîÀ®¤·¡¢»öÁ°¤Ë¥À¥¦¥ó¥í¡¼¥ÉºÑ¤ß¤Î¡¢win.mp3¤Èloose.mp3¤ò¥³¥Ô¡¼¤·¤Æ¤¯¤À¤µ¤¤¡£
¾¡ÇÔ·èÄê»þ¤Ë¥µ¥¦¥ó¥É¤¬ÌĤë¤è¤¦¤Ë¡¢½¤Àµ¤ò¹Ô¤¤¤Þ¤¹¡£
res/jp.co.example.junken/MainActivity.java¤Ë¡¢¼¡¤ÎÆâÍƤòÄɵ¤·¤Æ¤¯¤À¤µ¤¤¡£
res/jp.co.example.junken/MainActivity.java¤Ë¡¢¼¡¤ÎÆâÍƤòÄɵ¤·¤Æ¤¯¤À¤µ¤¤¡£
@Override protected void onStart() { super.onStart(); playerWin = MediaPlayer.create(this, R.raw.win); playerLoose = MediaPlayer.create(this, R.raw.loose); try { playerWin.prepare(); playerLoose.prepare(); } catch (IllegalStateException e) { } catch (IOException e) { } } @Override protected void onStop() { super.onStop(); if (playerWin != null) { if (playerWin.isPlaying()) { playerWin.stop(); } playerWin = null; } if (playerLoose != null) { if (playerLoose.isPlaying()) { playerLoose.stop(); } playerLoose = null; } } public void soundWin() { if (playerWin.isPlaying()) { playerWin.pause(); } else { playerWin.seekTo(0); playerWin.start(); } } public void soundLoose() { if (playerLoose.isPlaying()) { playerLoose.pause(); } else { playerLoose.seekTo(0); playerLoose.start(); } } public void win() { result.setText("¤¢¤Ê¤¿¤Î¾¡¤Á"); soundWin(); // Äɲà } public void loose() { result.setText("¤¢¤Ê¤¿¤ÎÉ餱"); soundLoose(); // Äɲà }
¤³¤Î¥Ú¡¼¥¸¤Ø¤Î¥³¥á¥ó¥È
5uTcsZ <a href="http://glxvmejngsqg.com/">glxvmejngsqg</a>, [url=http://xedrcirxpquo.com/]xedrcirxpquo[/url], [link=http://mrggrxqzmbea.com/]mrggrxqzmbea[/link], http://vhbevrwbihfm.com/