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
Publicidade
|
|
Page 1 of 1
Som no flash problemas...
#2
Posted 03 September 2007 - 01:03 PM
posta o codigo que vc eta usando pra mim dar uma olhda...
abraço!!!
abraço!!!
#3
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();
}
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();
}
#4
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);
}
{
_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);
}
#5
Posted 03 September 2007 - 02:37 PM
esse e o code que carrega o swf externo:
CODE
loadMovie("radio.swf", this.myMovieClip);
#6
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:
[]s
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;
}
}
{
_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
#7
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
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
#8
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
Experimente usar somente um stop em cada som e veja se o som do player continua.
[]s
#9
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
era isso mesmo... ele n parava o som , ele baixava o volume de ambos....
agoja j funciona perfeito...
muito obrigado..
valeww
Share this topic:
Page 1 of 1
Similar Topics
| Topic | Forum | Started By | Stats | Last Post Info | |
|---|---|---|---|---|---|
|
Asus lança placas de som com dois processadores.
|
Notícias |
Notícias
|
|
|
|
Código Javascript que muda tamanho de camada!
Código que vai no flash! |
Web Standards |
Karine
|
|
|
|
importar flash to director
|
Director |
nett_fan
|
|
|
|
Problemas com as configurações da Placa
Dúvidas?? |
Hardware |
WMartins
|
|
|
|
Piratas somalis sequestram navio procedente do Brasil
|
Notícias |
Notícias
|
|
|
|
ONU diz que duas redes controlam pirataria na Somália
|
Notícias |
Notícias
|
|
|
|
problemas com template flash da template monster
Estou precisando de uma ajuda no flash da template monster |
Mercado / Vagas |
Paulo Bites
|
|
|
|
Preciso de um Flashmaster
Flashmaster |
Freelancers |
Abud
|
|
Publicidade
|
|

Help













