Tecnologia do Blogger.
RSS

Re: [androidbrasil-dev] Gerenciar Músicas no Aplicativo

Cara, acho que assim como vc tem carregaMusica e reproduzMusica...precisa ter o metodo para detê-la


2013/5/3 Márcio Fornari <marciofornari@gmail.com>
Pessoal, tenho um jogo onde tem os estados
Abertura, Menu, Fase1, Fase2 e Fase3, FaseCompleta, GameOver

Para cada estado eu queria colocar uma música diferente. Porém o meu aplicativo pega a primeira música que achar e toca ela infinitamente, ou seja, não para mais e tbm nem toca as outras músicas conforme troca o Estado. Alguém sabe como fazer isso funcionar???

  1. if (iEstado == ABERTURA) {
  2.                         abertura();
  3.                 CGerenteSons.vrMusica.carregaMusica("abertura.mp3",true);
  4.                 CGerenteSons.vrMusica.reproduzMusica();
  5.                 } else if (iEstado == MENU) {
  6.                 CGerenteSons.vrMusica.carregaMusica("menu.mp3",true);
  7.                 CGerenteSons.vrMusica.reproduzMusica();
  8.                         menu();
  9.                 } else if (iEstado == JOGO) {
  10.                 CGerenteSons.vrMusica.carregaMusica("fase1.mp3",true);
  11.                 CGerenteSons.vrMusica.reproduzMusica();
  12.                         jogo(vrOpenGL);
  13.                 } else if (iEstado == AJUDA) {
  14.                         ajuda();
  15.                 } else if (iEstado == FASE2) {
  16.                 CGerenteSons.vrMusica.carregaMusica("fase2.mp3",true);
  17.                 CGerenteSons.vrMusica.reproduzMusica();
  18.                         fase2(vrOpenGL);
  19.                 } else if (iEstado == FASE3) {
  20.                 CGerenteSons.vrMusica.carregaMusica("fase3.mp3",true);
  21.                 CGerenteSons.vrMusica.reproduzMusica();
  22.                         fase3(vrOpenGL);
  23.                 } else if (iEstado == PASSOUFASE2) {
  24.                 CGerenteSons.vrMusica.carregaMusica("fasecompleta.mp3",true);
  25.                 CGerenteSons.vrMusica.reproduzMusica();
  26.                         passouFase2();
  27.                 } else if (iEstado == PASSOUFASE3) {
  28.                 CGerenteSons.vrMusica.carregaMusica("fasecompleta.mp3",true);
  29.                 CGerenteSons.vrMusica.reproduzMusica();
  30.                         passouFase3();
  31.                 } else if (iEstado == FIMJOGO) {
  32.                         CGerenteSons.vrMusica.carregaMusica("gameover.mp3",true);
  33.                         CGerenteSons.vrMusica.reproduzMusica();
  34.                         TerminouJogo();
  35.                 }



--
............
.Márcio Fornari 
.Bacharel em  Sistemas de Informação
.Contatos pelo Telefone: (49)8814 - 3378
.ou pelo e-mail: marciofornari@gmail.com
.Msn: marciof.gd@hotmail.com
..........................................................................

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
José Carmelo Alzate
Estudiante Ingenieria de Sistemas (UdeA)
Estudiante Intercambista Engenharia da Computaçao e Sistemas Digitais Universidad de Sao Paulo (USP)


Antes de imprimir este mensaje, asegúrese de que es necesario. Proteger el medio ambiente está también en su mano.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário