..:: MX Studio Fóruns ::..: Som no flash - ..:: MX Studio Fóruns ::..

Jump to content

Publicidade




ATENÇÃO

Para evitar posts desnecessários e que não influam para o andamento e desenvolvimento do fórum, clique aqui e leia todas as regras.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Som no flash problemas...

#1 User is offline   xikinho 

  • Group: Membros
  • Posts: 172
  • Joined: 10-July 07

Posted 03 September 2007 - 11:43 AM

oi ... istou farto disso.... n sei o k se passa agora!!!

e o seguinte:

eu tenho um botao no meu site que desliga o som dele se nos quezermos....

o que se passa e k eu tenho outro botao que carrega um swf externo com um player de musicas, e se eu clica no botao do som do site para o desligar,
ele vai tamber parar o som do player!!!!

como faxo pa isso deixar de acontecer???
n tou vendo o problema!!!!

alguem me ajuda por favor???

mt grato
0

#2 User is offline   Dark Neo 

  • Group: Membros
  • Posts: 507
  • Joined: 04-June 05

Posted 03 September 2007 - 01:03 PM

posta o codigo que vc eta usando pra mim dar uma olhda...

abraço!!!
0

#3 User is offline   xikinho 

  • Group: Membros
  • Posts: 172
  • Joined: 10-July 07

Posted 03 September 2007 - 02:28 PM


esse e o code do swf que contem player:


CODE
//objeto que ira manipular o som
var som:Sound = new Sound();
//vetor que ira armazenar o caminho das mp3 a serem tocadas
var musicas:Array = new Array();
//declarando o resto das variaveis
var i, vol, verifica, pos:Number;
var ligado:Boolean;
var acao:String;
stop();

musicas[0] = "musicas/1.mp3";
musicas[1] = "musicas/2.mp3";
musicas[2] = "musicas/3.mp3";
musicas[3] = "musicas/4.mp3";
musicas[4] = "musicas/5.mp3";
musicas[5] = "musicas/6.mp3";
musicas[6] = "musicas/7.mp3";
musicas[7] = "musicas/8.mp3";
musicas[8] = "musicas/8.mp3";

if (ligado==null) {
    i = 0;
    vol = 100;
    ligado = false;
}
this.onEnterFrame = function() {

    som.setVolume(vol);

if (ligado==false) {
        som.loadSound(musicas[i], true);
if (i<8)
            i++;
        else
            i = 0;
    ligado = true;
    }
      artista.text = "Artista: " + som.id3.artist;
    musica.text = "Musica: " + som.id3.songname;
verifica = som.getVolume();
    if (verifica>=100) {
        som.setVolume(100);
    }
    if (verifica<=0) {
        som.setVolume(0);
    }

    v3.text = som.getVolume() + "%";
}
som.onSoundComplete = function() {
    ligado = false;
}
//aumenta o volume
v1.onRelease = function() {
    verifica = som.getVolume();
    vol = verifica+5;
}

// diminui o volume
v2.onRelease = function() {
    verifica = som.getVolume();
    vol = verifica-5;
}
// para muscia
stop.onRelease = function() {
    som.stop();
}
// pausa a musica
pause.onRelease = function() {
    acao = "pause";
    pos = som.position/1000;
    som.stop();
}
play.onRelease = function() {
    if (acao=="pause") {
        som.start(pos);
        acao="";
    } else {
        som.start();
    }
}
ff.onRelease = function() {
    ligado = false;
    som.stop();
}

0

#4 User is offline   xikinho 

  • Group: Membros
  • Posts: 172
  • Joined: 10-July 07

Posted 03 September 2007 - 02:31 PM

esse e o cone do botao do som do site:



CODE
onClipEvent (load)
{
    _root.soundstatus = "on";
    _root.mySound = new Sound(_level0);
    _root.mySound2 = new Sound(_level1);
    _root.mySound3 = new Sound(_level2);
    _root.mySound4 = new Sound(_level3);
    _root.mySound5 = new Sound(_level4);
    maxvolume = 100;
    minvolume = 0;
}
onClipEvent (enterFrame)
{
    if (_root.soundstatus == "on")
    {
        step = 7;
    } // end if
    if (_root.soundstatus == "off")
    {
        step = -7;
    } // end if
    maxvolume = maxvolume + step;
    if (maxvolume > 100)
    {
        maxvolume = 100;
    } // end if
    if (maxvolume < 0)
    {
        maxvolume = 0;
    } // end if
    _root.mySound.setVolume(maxvolume);
    _root.mySound2.setVolume(maxvolume);
    _root.mySound3.setVolume(maxvolume);
    _root.mySound4.setVolume(maxvolume);
    _root.mySound5.setVolume(maxvolume);
}

0

#5 User is offline   xikinho 

  • Group: Membros
  • Posts: 172
  • Joined: 10-July 07

Posted 03 September 2007 - 02:37 PM

esse e o code que carrega o swf externo:
CODE
loadMovie("radio.swf", this.myMovieClip);

0

#6 User is offline   Natan 

  • Group: Moderador Global
  • Posts: 7350
  • Joined: 28-February 04

Posted 03 September 2007 - 11:39 PM

Pelo que entendi, quando você aperta o botão de desligar o som, para todos os sons, inclusive do player. Certo?

Veja se assim vai:

AS
onClipEvent (load)
{
   _root.soundstatus = "on";
   _root.mySound = new Sound(_level0);
   _root.mySound2 = new Sound(_level1);
   _root.mySound3 = new Sound(_level2);
   _root.mySound4 = new Sound(_level3);
   _root.mySound5 = new Sound(_level4);
   maxvolume = 100;
   minvolume = 0;
}
onClipEvent (enterFrame)
{
   if (_root.soundstatus == "on")
   {
      step = 7;
   } // end if
   if (_root.soundstatus == "off")
   {
      step = -7;
   } // end if
   maxvolume = maxvolume + step;
   if (maxvolume > 100)
   {
      maxvolume = 100;
   } // end if
   if (maxvolume < 0)
   {
      maxvolume = 0;
   } // end if
   _root.mySound.setVolume(maxvolume);
   _root.mySound2.setVolume(maxvolume);
   _root.mySound3.setVolume(maxvolume);
   _root.mySound4.setVolume(maxvolume);
   _root.mySound5.setVolume(maxvolume);
   if (maxvolume == 0) {
      _root.mySound.stop();
      _root.mySound2.stop();
      _root.mySound3.stop();
      _root.mySound4.stop();
      _root.mySound5.stop();
      maxvolume = 100;
   }
}
onClipEvent (load)
{
_root.soundstatus = "on";
_root.mySound = new Sound(_level0);
_root.mySound2 = new Sound(_level1);
_root.mySound3 = new Sound(_level2);
_root.mySound4 = new Sound(_level3);
_root.mySound5 = new Sound(_level4);
maxvolume = 100;
minvolume = 0;
}
onClipEvent (enterFrame)
{
if (_root.soundstatus == "on")
{
step = 7;
} // end if
if (_root.soundstatus == "off")
{
step = -7;
} // end if
maxvolume = maxvolume + step;
if (maxvolume > 100)
{
maxvolume = 100;
} // end if
if (maxvolume < 0)
{
maxvolume = 0;
} // end if
_root.mySound.setVolume(maxvolume);
_root.mySound2.setVolume(maxvolume);
_root.mySound3.setVolume(maxvolume);
_root.mySound4.setVolume(maxvolume);
_root.mySound5.setVolume(maxvolume);
if (maxvolume == 0) {
_root.mySound.stop();
_root.mySound2.stop();
_root.mySound3.stop();
_root.mySound4.stop();
_root.mySound5.stop();
maxvolume = 100;
}
}


[]s
0

#7 User is offline   xikinho 

  • Group: Membros
  • Posts: 172
  • Joined: 10-July 07

Posted 04 September 2007 - 06:22 AM

n ... n deu nada... agora continua parando tudo mas se volta a clicar ja n da mais som nenhum.....:/

tenho certeza que e no botao do som do site, pk o meu player ta funcionando certinho i n esta interferindo no outro som...


valeww
0

#8 User is offline   Natan 

  • Group: Moderador Global
  • Posts: 7350
  • Joined: 28-February 04

Posted 05 September 2007 - 10:14 PM

Me diz uma coisa, essa ação que eu postei é a ação referente ao botão certo? O problema me parece está no volume, com a ação que você está usando, você está diminuindo o som gradativamente, por isso pode dar a impressão de que tudo para, mas tudo diminui o volume.

Experimente usar somente um stop em cada som e veja se o som do player continua.

[]s
0

#9 User is offline   xikinho 

  • Group: Membros
  • Posts: 172
  • Joined: 10-July 07

Posted 06 September 2007 - 03:04 PM

oi tudo bom???

era isso mesmo... ele n parava o som , ele baixava o volume de ambos....

agoja j funciona perfeito...

muito obrigado..

valeww
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic



Publicidade




2 User(s) are reading this topic
0 membro(s), 2 visitante(s) e 0 membros anônimo(s)