flash actionscript:
Hello,
I'm facing a big problem here, I don't know very well how to explain, I know
the bug is in the posted code (for creating my details movieclip), since if I
don't run it everything works fine.
The situation:
I've one array and I create some movieclips.
If I dont click on any image everything works good, but
If I click one one I create another movieclip (details) and when I press on
the close button and then choose another category in the tree component my
previous choosed item remains in stage and the newer movieclips don't place in
_x in that line
Please visit this site, you will untherstand it better ,ok?
http://www.orcopom-uniformes.com/catalogo/catalogo.htm (play with it, you
will see my problem)
Many thanks!
with (_root) {
createEmptyMovieClip("mc_detalhes", 125000);
mc_detalhes._x = 7.5;
mc_detalhes._y = 145;
//
round_corners(mc_detalhes, 568, 240, 2.50, 0xA60F38, 100, 0xFFFFFF,
100, 12);
//
mc_detalhes.createEmptyMovieClip("imagem", 125001);
mc_detalhes.imagem._x = 336;
mc_detalhes.imagem._y = 29;
//
mc_detalhes.createEmptyMovieClip("mascara", 125002);
//
mc_detalhes.mascara._x = mc_detalhes.imagem._x;
mc_detalhes.mascara._y = mc_detalhes.imagem._y;
//
round_corners(mc_detalhes.mascara, 193, 193, 0.50, 0xA60F38, 0,
0x452E2E, 0, 12);
//
mc_detalhes.createEmptyMovieClip("contorno", 125003);
//
mc_detalhes.contorno._x = mc_detalhes.imagem._x;
mc_detalhes.contorno._y = mc_detalhes.imagem._y;
//
round_corners(mc_detalhes.contorno, 193, 193, 0.50, 0xA60F38, 50,
0x452E2E, 0, 12);
//
imagem = detalhes.imagem;
//
preload(mc_detalhes.imagem, "/pics/imagens/"+imagem, 125004, 1000,
(71.5), (92.5));
//
mc_detalhes.imagem.onEnterFrame = function() {
if (check_progressao == false) {
trace("Ainda n?o fiz o preload!");
} else {
delete (this.onEnterFrame);
}
};
// Importante esta coloca??o, o set mask tem de estar fora do
onEnterFrame
mc_detalhes.imagem.setMask(mc_detalhes.mascara);
//
mc_detalhes.createTextField("tit", 125005, 29, 29, 288, 30);
mc_detalhes.tit.text = detalhes.tit;
mc_detalhes.tit.selectable = false;
mc_detalhes.tit.setTextFormat(ft);
//
mc_detalhes.createTextField("descricao", 125006, 29, 69, 288, 182);
mc_detalhes.descricao.selectable = false;
mc_detalhes.descricao.multiline = true;
mc_detalhes.descricao.wordWrap = true;
mc_detalhes.descricao.html = true;
txt = unescape(detalhes.texto);
mc_detalhes.descricao.htmlText = "<font face='Arial' color='#990000'
size='14'>Refer?ncia: </FONT><font face='Arial' color='#000000'
size='12'>"+detalhes.ref+"</FONT><BR><font face='Arial' color='#990000'
size='14'>Descri??o: </FONT><font face='Arial' color='#000000'
size='12'>"+txt+"</FONT><font face='Arial' color='#990000' size='14'>Tamanhos:
</FONT><font face='Arial' color='#000000'
size='12'>"+detalhes.tamanhos+"</FONT><BR><font face='Arial' color='#990000'
size='14'>Cores: </FONT><font face='Arial' color='#000000'
size='12'>"+detalhes.cores+"</FONT><BR><font face='Arial' color='#990000'
size='14'>Materiais: </FONT><font face='Arial' color='#000000'
size='12'>"+detalhes.materiais+"</FONT><BR><font face='Arial' color='#990000'
size='14'>Norma(s) CE: </FONT><font face='Arial' color='#000000'
size='12'>"+detalhes.norma+"</FONT>";
//
mc_detalhes.createEmptyMovieClip("risco", 125007);
mc_detalhes.risco._x = 29;
mc_detalhes.risco._y = 59;
round_corners(mc_detalhes.risco, 288, 1, 0.50, 0xA60F38, 100,
0x452E2E, 0, 0);
//
mc_detalhes.createEmptyMovieClip("fechar", 125008);
mc_detalhes.fechar._x = 539;
mc_detalhes.fechar._y = 14.5;
round_corners(mc_detalhes.fechar, 10, 10, 0.50, 0xA60F38, 100,
0xA60F38, 100, 0);
//
mc_detalhes.fechar.createEmptyMovieClip("r_cruz", 125009);
mc_detalhes.fechar.r_cruz._x = 2;
mc_detalhes.fechar.r_cruz._y = 1.5;
round_corners(mc_detalhes.fechar.r_cruz, 9, 1, 0.50, 0xFFFFFF, 100,
0xFFFFFF, 100, 0);
mc_detalhes.fechar.r_cruz._rotation = 45;
//
mc_detalhes.fechar.r_cruz.duplicateMovieClip("rr_cruz", 125010);
mc_detalhes.fechar.rr_cruz._x = 1.8;
mc_detalhes.fechar.rr_cruz._y = 7.85;
mc_detalhes.fechar.rr_cruz._rotation = -45;
//
mc_detalhes.fechar.onRelease = function() {
mc_detalhes.swapDepths(1048575);
mc_detalhes.removeMovieClip();
//
_root.produto0.btn.enabled = true;
_root.produto1.btn.enabled = true;
_root.produto2.btn.enabled = true;
_root.produto3.btn.enabled = true;
_root.produto4.btn.enabled = true;
_root.produto5.btn.enabled = true;
_root.produto6.btn.enabled = true;
//
_root.mais.btn_mais.enabled = true;
_root.menos.btn_menos.enabled = true;
//
_root.menu.enabled = true;
};