Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Ola galeraestou quebrando a cabeca para posicionar automaticamente 2 textos criados via createTextField.Tenho o texto A e B.Dependendo da altura do texto A posiciono o texto B "x" pixels abaixo da caixa A.Alguem tem alguma dica?abaixo segue ate onde consegui chegar.Valeu!Fernando--------------//myFormat is the format of the text myFormat_fmt = new TextFormat();myFormat_fmt.font = "dax";myFormat_fmt.size = 20;myFormat_fmt.leading = 12;myFormat_fmt.align = "left";myFormat_fmt.color = 0x333399;//The actual text stringmyText_str = "O método createTextField é usado com um movieclip (ou em sua timeline) para especificar um novo campo de texto dentro desse movieclip. ";//this measures the size of the text stringobjl = myFormat_fmt.getTextExtent(myText_str, 200);//Create a text field dynamically and make it as big as the text string_root.createTextField("fer_txt",1,10,10,objl.textFieldWidth,objl.textFieldHeight);//dictates the formating of the text field - not it's content. with (fer_txt) { border = true; wordWrap = true; text = myText_str; embedFonts = true; multiline = true; setTextFormat(myFormat_fmt);};_root.createTextField("fer2_txt",2,250,50 + "fer_txt".objl.textFieldHeight,objl.textFieldWidth,objl.textFieldHeight);with (fer2_txt) { border = true; wordWrap = true; text = myText_str; embedFonts = true; multiline = true; setTextFormat(myFormat_fmt);};
Carregando comentários...