FerG 0 Denunciar post Postado Setembro 29, 2005 Ola pessoalEstou com um probleminha e não entendo o porque esta acontecendo.Dentro do meu SWF tenho um Movie Clip dinâmico e uma máscara dinâmica.Quando carrego o SWF em uma página ele funciona perfeito, mas qnd o carrego dentro de uma estrutura de paginas (frames ou i-frames) os elementos dinâmicos param de funcionar.Alguem sabe porque isso acontece?obrigadoFernando Compartilhar este post Link para o post Compartilhar em outros sites
Froskie 0 Denunciar post Postado Setembro 30, 2005 Você quer dizer que se carregar o SWF num HTML comum, ele funciona, se for num frameset ele pára de funcionar? Compartilhar este post Link para o post Compartilhar em outros sites
FerG 0 Denunciar post Postado Setembro 30, 2005 Exatamente! bizarro, nao? abrs http://forum.imasters.com.br/public/style_emoticons/default/assobiando.gif Compartilhar este post Link para o post Compartilhar em outros sites
Froskie 0 Denunciar post Postado Setembro 30, 2005 'Bizzarro' não seria bem a palavra, eu diria 'ridículo'. Tentando eliminar todas as possibilidades, coloque aqui o código das máscaras, tente exportar o arquivo em Flash 8, se corrigir o problema é bug. Já descobri um monte de bug no MX 2004 depois que troquei pra versão 8. Compartilhar este post Link para o post Compartilhar em outros sites
FerG 0 Denunciar post Postado Setembro 30, 2005 O codigo está ai. Ainda não instalei o novo flash... se você quiser posso lhe mandar o FLA para q você faça o teste. abrs Fernando stop();_root.option1_mc._alpha = 20;_global.my_pictures = 0;my_pictures = my_pictures + 1;trace(my_pictures);// QUESTION TEXT FIELD//-------------------------------------quoteFormat_fmt = new TextFormat();quoteFormat_fmt.font = "din";quoteFormat_fmt.size = 16;quoteFormat_fmt.leading = 0;quoteFormat_fmt.align = "left";quoteFormat_fmt.color = 0x333333;//this measures the size of the text stringobj1 = quoteFormat_fmt.getTextExtent("my_question", 280);//Create a text field dynamically and make it as big as the text string_root.createTextField("my_question",4,65,280,obj1.textFieldWidth,obj1.textFieldHeight+20);// ====================================// SECONDS LEFT TEXT FIELD//-------------------------------------mysecondsFormat_fmt = new TextFormat();mysecondsFormat_fmt.font = "din";mysecondsFormat_fmt.size = 14;mysecondsFormat_fmt.leading = 0;mysecondsFormat_fmt.align = "left";mysecondsFormat_fmt.color = 0xEB5E00;//this measures the size of the text stringobj2 = mysecondsFormat_fmt.getTextExtent("my_second_txt", 200);//Create a text field dynamically and make it as big as the text string_root.createTextField("my_second_txt",5,290,340,100,20); _root.my_second_txt.text = "seconds left:"; // ==================================== _root.createEmptyMovieClip("picture_mc", 1);// CONTROL PICTURE TO BE LOADED AND BUTTON LABELSif (my_pictures == 1) { loadMovie("images/beckham.jpg", picture_mc); _root.my_question.text = "What's the spceiality of this personality?"; option1_mc.textbutton1_txt.text = "a. footballer"; option2_btn.textbutton2_txt.text = "b. coach"; option3_btn.textbutton3_txt.text = "c. model";} else if (my_pictures == 2) { loadMovie("images/logo.jpg", picture_mc); _root.my_question.text = "What's this logo related to?"; option1_mc.textbutton1_txt.text = "a. Performance"; option2_btn.textbutton2_txt.text = "b. Heritage"; option3_btn.textbutton3_txt.text = "c. Style";}else if (my_pictures == 3) { loadMovie("images/ian.jpg", picture_mc); _root.my_question.text = "With wich sport would you relate this person?"; option1_mc.textbutton1_txt.text = "a. open sea swim"; option2_btn.textbutton2_txt.text = "c. diving"; option3_btn.textbutton3_txt.text = "d. olympic swim";}else if (my_pictures == 4) { loadMovie("images/zidane.jpg", picture_mc); _root.my_question.text = "What's this players national team?"; option1_mc.textbutton1_txt.text = "a. England"; option2_btn.textbutton2_txt.text = "b. France"; option3_btn.textbutton3_txt.text = "c. Spain";}else if (my_pictures == 5) { loadMovie("images/coria.jpg", picture_mc); _root.my_question.text = "Is Guillermo Coria a..."; option1_mc.textbutton1_txt.text = "a. Tennis Player"; option2_btn.textbutton2_txt.text = "b. Golf Player"; option3_btn.textbutton3_txt.text = "c. Baseball Player";}// MY QUESTION ALIGNMENTwith (my_question) { border = false; multiline = true; autosize = left; wordWrap = true; text = my_question.text; embedFonts = true; setTextFormat(quoteFormat_fmt);};// MY SECONDS ALIGNMENTwith (my_second_txt) { border = false; multiline = true; autosize = left; wordWrap = true; text = my_second_txt.text; embedFonts = true; setTextFormat(mysecondsFormat_fmt);};// X and Y Position of the created moviepicture_mc._x = -2030;picture_mc._y = -1430;// Enlarge picture to 600 pixels wide and hightpicture_mc._xscale = 1300;picture_mc._yscale = 1300;// Create the variable to count the time//my_time = 764;//my_time = 100;my_time = 10;// Reduces MC new mx.transitions.Tween(picture_mc, "_xscale", mx.transitions.easing.Strong.easeOut , picture_mc._xscale, 100, 80, true);new mx.transitions.Tween(picture_mc, "_yscale", mx.transitions.easing.Strong.easeOut , picture_mc._yscale, 100, 80, true);new mx.transitions.Tween(picture_mc, "_x", mx.transitions.easing.Strong.easeOut , picture_mc._x, 63, 80, true);new mx.transitions.Tween(picture_mc, "_y", mx.transitions.easing.Strong.easeOut , picture_mc._y, 45, 80, true);/*// shadow_root.createEmptyMovieClip("my_shadow", 0);my_shadow.lineStyle(1, 0x333333,0);my_shadow.beginFill(0x333333, 30);my_shadow.moveTo(66, 58);my_shadow.lineTo(66, 273);my_shadow.lineTo(353, 273);my_shadow.lineTo(353, 58);my_shadow.lineTo(66, 58);my_shadow.endFill();*/// Create the second MC and draw the mask_root.createEmptyMovieClip("mask", 3);picture_mc.setMask(mask);mask.lineStyle(1, 0xE6E6E6,0);mask.beginFill(0xAA5522, 50);mask.moveTo(63, 55);mask.lineTo(63, 270);mask.lineTo(350, 270);mask.lineTo(350, 55);mask.lineTo(63, 55);mask.endFill();// THE ENTERFRAME_root.onEnterFrame = function() { total = seconds; if (seconds <= 0) { mili = 000; seconds = 0; } //for the mask picture_mc.setMask(mask); _level4.mask._x = mask._x; _level4.mask._y = mask._y; }; // generate the clockmili = 000;seconds = 60;if (seconds <= 0) { seconds = 0;}clearInterval(myInterval);myInterval = setInterval(time, 8);function time() { if (mili < 100) { mili = mili + 001; } else { seconds --; mili = 000; trace(mili); }}// =======================================// BUTTONS// =======================================// BUTTON 1 ==============================this.option1_mc.onRelease = function () { option1_mc._alpha = 100;// remove created movies and mask removeMovieClip(picture_mc); removeMovieClip(mask); removeMovieClip(my_shadow); my_question.removeTextField(); my_second_txt.removeTextField(); picture_mc.setMask(null); myscore_txt = seconds; _global.totalscore = 0; _global.totalwrong = 0; totalwrong = 0; // BT1 - picture 1 if (my_pictures == 1) { totalscore = totalscore + seconds; trace(totalscore); _root.gotoAndStop("myscore"); } // BT1 - picture 2 if (my_pictures == 2) { _root.gotoAndStop("wrong"); } // BT1 - picture 3 if (my_pictures == 3) { _root.gotoAndStop("wrong"); } // BT1 - picture 4 if (my_pictures == 4) { _root.gotoAndStop("wrong"); } // BT1 - picture 5 if (my_pictures == 5) { totalscore = totalscore + seconds; trace(totalscore); _root.gotoAndStop("final_score"); } };// BUTTON 2 ==============================this.option2_btn.onRelease = function () {// remove created movies and mask removeMovieClip(picture_mc); removeMovieClip(mask); removeMovieClip(my_shadow); my_question.removeTextField(); my_second_txt.removeTextField(); picture_mc.setMask(null); myscore_txt = seconds; _global.totalscore = 0; _global.totalwrong = 0; totalwrong = 0; // BT2 - picture 1 if (my_pictures == 1) { _root.gotoAndStop("wrong"); } // BT2 - picture 2 if (my_pictures == 2) { totalscore = totalscore + seconds; trace(totalscore); _root.gotoAndStop("myscore"); } // BT2 - picture 3 if (my_pictures == 3) { _root.gotoAndStop("wrong"); } // BT2 - picture 4 if (my_pictures == 4) { totalscore = totalscore + seconds; trace(totalscore); _root.gotoAndStop("myscore"); } // BT2 - picture 5 if (my_pictures == 5) { _root.gotoAndStop("final_score"); } };// BUTTON 3 ==============================this.option3_btn.onRelease = function () {// remove created movies and mask removeMovieClip(picture_mc); removeMovieClip(mask); removeMovieClip(my_shadow); my_question.removeTextField(); my_second_txt.removeTextField(); picture_mc.setMask(null); myscore_txt = seconds; _global.totalscore = 0; _global.totalwrong = 0; totalwrong = 0; // BT3 - picture 1 if (my_pictures == 1) { _root.gotoAndStop("wrong"); } // BT3 - picture 2 if (my_pictures == 2) { _root.gotoAndStop("wrong"); } // BT3 - picture 3 if (my_pictures == 3) { totalscore = totalscore + seconds; trace(totalscore); _root.gotoAndStop("myscore"); } // BT3 - picture 4 if (my_pictures == 4) { _root.gotoAndStop("wrong"); } // BT3 - picture 5 if (my_pictures == 5) { _root.gotoAndStop("final_score"); } };// =====================================// HOVERSthis.option1_mc.onRollOver = function () { option1_mc._alpha = 100; trace(option1_mc);}; this.option1_mc.onRollOut = function () { _root.option1_mc._alpha = 20;}; blue_mc._alpha = 40; Compartilhar este post Link para o post Compartilhar em outros sites
Froskie 0 Denunciar post Postado Setembro 30, 2005 É... disponibiliza o fla :D Compartilhar este post Link para o post Compartilhar em outros sites
FerG 0 Denunciar post Postado Setembro 30, 2005 Vamos la: www.spaceinvader.tv/quiz.zip http://forum.imasters.com.br/public/style_emoticons/default/clap.gif Compartilhar este post Link para o post Compartilhar em outros sites