FerG 0 Denunciar post Postado Setembro 6, 2005 Salve galera! hoje eh um dia daqueles.... vou explicar meu problema: - texto um texto criado e alimentado dinamicamente - se meu texto exceder a altura do palco, preciso aumentar a altura do palco para que o texto nao fique cortado. :unsure: sera q rola de fazer?? alguma luz no fim do tunel? abraços! http://forum.imasters.com.br/public/style_emoticons/default/ermm.gif :unsure: Compartilhar este post Link para o post Compartilhar em outros sites
Froskie 0 Denunciar post Postado Setembro 6, 2005 E aí Ferg. Uma vez eu me deparei com este problema, o único jeito foi no scrollbar, e depois, numa função javascript enooooooooooooooorme. <_< Eu fui procurar no dicionário do AS sobre a propriedade Stage.height, mas ela é read-only (somente leitura), ou seja, não dá pra alterar. :( Compartilhar este post Link para o post Compartilhar em outros sites
FerG 0 Denunciar post Postado Setembro 7, 2005 Valeu Froskie, Reparei as mesmas coisas. Vou tentar dar mais uma olhada, se achar algo publico aqui. valeu!! http://forum.imasters.com.br/public/style_emoticons/default/devil.gif Compartilhar este post Link para o post Compartilhar em outros sites
FerG 0 Denunciar post Postado Setembro 7, 2005 Seguinte Froskie, Funcionou usando fscommand e uma função em javasacript... ai esta o codigo do flash e do javascrit. valeu! Fernando // -------------------------- // CÓDIGO FLASH // APENAS COLOQUE ISSO NO SEU PRIMEIRO FRAME // Stage.scaleMode = "noScale"; Stage.align = "TL"; //------------------------------------- //myFormat is the format of the text quoteFormat_fmt = new TextFormat(); quoteFormat_fmt.font = "din"; quoteFormat_fmt.size = 28; quoteFormat_fmt.leading = 0; quoteFormat_fmt.align = "left"; quoteFormat_fmt.color = 0x999999; //this measures the size of the text string obj1 = quoteFormat_fmt.getTextExtent(myQuote,160); //Create a text field dynamically and make it as big as the text string _root.createTextField("quote_txt",1,0,0,obj1.textFieldWidth,obj1.textFieldHeight+5); //_root.createTextField("quote_txt",1,0,0,160,183); //dictates the formating of the text field - not it's content. with (quote_txt) { border = false; multiline = true; autosize = left; wordWrap = true; text = myQuote; embedFonts = true; setTextFormat(quoteFormat_fmt); }; //----------------------------- follow1 = quote_txt._height; //myFormat is the format of the text authorFormat_fmt = new TextFormat(); authorFormat_fmt.font = "din"; authorFormat_fmt.size = 14; authorFormat_fmt.leading = 0; authorFormat_fmt.align = "left"; authorFormat_fmt.color = 0x000000; //this measures the size of the text string obj2 = authorFormat_fmt.getTextExtent(myAuthor,160); //Create a text field dynamically and make it as big as the text string _root.createTextField("author_txt",2,0,follow1,obj2.textFieldWidth,obj2.textFieldHeight); //dictates the formating of the text field - not it's content. with (author_txt) { border = false; multiline = true; wordWrap = true; text = myAuthor; embedFonts = true; setTextFormat(authorFormat_fmt); }; //----------------------------- // FSCommand follow2 = quote_txt._height + 20; fscommand("UpdateHeight", follow2); //--------------------------------------------------------------------------------------- // CÓDIGO JAVASCRIPT // <!-- saved from url=(0022)http://internet.e-mail --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>quote_dynamic</title> </head> <body bgcolor="#ffffff"> <!--url's used in the movie--> <!--text used in the movie--> <script> var FernandoVariable = 1; </script> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="160" height="200" name="QuoteFlash" align="bottom" style='border: #000000 0px solid'> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="quote_dynamic.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="wmode" value="trasparent" /> <param name="flashvars" value='myQuote="Content is king, but cash is the lord. Thats what our beloved boss said and I for one trully believe him - for he is my master and guru"&myAuthor=Fernando' /> <embed src="quote_dynamic.swf" quality="high" bgcolor="#ffffff" name="QuoteFlash" id="QuoteFlashEmbed" width="160" height="200" flashvars= 'myQuote="Content is king, but cash is the lord. Thats what our beloved boss said and I for one trully believe him - for he is my master and guru"&myAuthor=Fernando' align="bottom" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" wmode="transparent" swLiveConnect="true" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> <script LANGUAGE="VBScript"> Sub QuoteFlash_FSCommand(ByVal command, ByVal args) call QuoteFlash_DoFSCommand(command, args) end sub </SCRIPT> <script LANGUAGE="JavaScript"> function QuoteFlash_DoFSCommand(command, args) { alert('FSFunction called!'); if (command == "UpdateHeight") { UpdateQuoteHeight(args); } } </SCRIPT> <script> function UpdateQuoteHeight(Height) { alert('Setting the height to ' + Height + ' pixels!'); if (document.getElementById('QuoteFlash')) { // IE document.getElementById('QuoteFlash').height = Height; } else if (document.getElementById('QuoteFlashEmbed')) { // Mozilla document.getElementById('QuoteFlashEmbed').height = Height; } } </script> </body> </html> E aí Ferg. Uma vez eu me deparei com este problema, o único jeito foi no scrollbar, e depois, numa função javascript enooooooooooooooorme. <_< Eu fui procurar no dicionário do AS sobre a propriedade Stage.height, mas ela é read-only (somente leitura), ou seja, não dá pra alterar. :( <{POST_SNAPBACK}> :D :D :D :D http://forum.imasters.com.br/public/style_emoticons/default/clap.gif http://forum.imasters.com.br/public/style_emoticons/default/clap.gif Compartilhar este post Link para o post Compartilhar em outros sites