Hoje dei sorte nas pesquisas :D

Assim que escrevi a mensagem anterior, abri o seguinte tópico da
documentação:

http://livedocs.adobe.com/flex/3/html/help.html?content=Working_with_Text_13.html#152457

"The TextField.setTextFormat() method only affects text that is
already displayed in the text field. If the content in the TextField
changes, your application might need to call the
TextField.setTextFormat() method again to reapply the formatting. ..."

Fica ai a dica para alguém que precisar


On 18 ago, 23:51, RafaelViana <rfl.vi...@gmail.com> wrote:
> Mudando um pouco a pesquisa de Cor de Text Field para Preloaders
>
> Achei o exemplo que citei acima, de carregar certo objetos na
> iniciação do sistema.
>
> " ...
>
> I would like to point out a couple things:
>
> 1. So we want to show the percentage loaded, right? Well, the Label
> component just won't work out. Label comes with following inheritance:
>
> Label -> UIComponent -> FlexSprite -> Sprite -> DisplayObjectContainer
> -> InteractiveObject DisplayObject -> EventDispatcher -> Object
>
> That is a good part of the Flex framework that we want to avoid for
> the preloader. Instead, because we just want to render the text, we
> can use the TextField object which comes with following inheritance:
>
> TextField -> InteractiveObject -> DisplayObject -> EventDispatcher ->
> Object
>
> And another thing is that we want to avoid any custom fonts in the
> preloader because that will surely blow it up.
>
> 2. Any imagery that we want to show up should naturally be in the
> single digit kilobytes to begin with. Photoshop offers a lot of ways
> to optimize the size of the image.
>
> Than again, we don't want to use the convenient Image component
> because it comes with the following inheritance:
>
> Image -> SWFLoader -> UIComponent -> FlexSprite -> Sprite ->
> DisplayObjectContainer -> InteractiveObject -> DisplayObject ->
> EventDispatcher -> Object
>
> Instead, we can fill up a DisplayObject that comes with following
> inheritance:
>
> DisplayObject -> EventDispatcher -> Object
>
> ..."
>
> Fonte:http://www.pathf.com/blogs/2008/08/custom-flex-3-lightweight-preloade...
>
> Tah, ok, estou no caminho certo é o text field mesmo.Vamos procurar na
> documentação:
>
> "...Once you establish an instance of a text field, you can use
> flash.text package classes, like the TextFormat class and the
> StyleSheet class, to control the text's appearance...."
>
> Fonte:http://livedocs.adobe.com/flex/3/html/help.html?content=Working_with_...
>
> Ok...É o text format que uso mesmo.Alguém sabe por que não está
> funcionando?
>
> Enquanto isso continua com as pesquisas
>
> On 18 ago, 23:35, RafaelViana <rfl.vi...@gmail.com> wrote:
>
>
>
> > O preloader ja achei em um blog estrangeiro ficou legal.
>
> > Lah tinha como colocar uma imagem junto no preloader, mas dai a partir
> > dessa ideia mudei o background pra uma imagem. (só isso que queria)
>
> > E tem dois text field que mostra pro usuário o status da aplicação e %
> > de carregamento.
> > Esses text field preciso alterar a fonte, ja pesquisei até na
> > documentação mas não consigo fazer uso da classe descrita acima.
>
> > Vou dar uma olhada em outros exemplos para ver qual classe que tão
> > usando pra isso.
>
> > P.S: Legal o preloader com swf Kraus, até tava pensando essas dias, se
> > eu pedisse pra um cara fazer um preloader em flash eu teria como usar
> > no Flex, mas como não manjo de flash, preferi tentar no flex algo
> > simples mesmo, só pra tirar aquele padrão.Depois contrato alguém pra
> > fazer o negócio ficar show mesmo.Tenho certeza que seu exemplo vai ser
> > muito util.
>
> > On 18 ago, 23:22, Eduardo Kraus <eduardokr...@gmail.com> wrote:
>
> > >  Se quiseres apenas alterar a fonte, tem que pesquisar, mais se quiseres
> > > mudar o preload, aqui tem um exemplo.
>
> > >http://blog.mxml.com.br/embed
>
> > >   *Eduardo Kraus*
> > > Desenvolvedor
> > >  eduardokr...@gmail.comhttp://blog.mxml.com.brhttp://twitter.com/EduardoKraus
>
> > > 2009/8/18 RafaelViana <rfl.vi...@gmail.com>
>
> > > > Estou querendo mudar a cor e a fonte de um text field no preloader.
>
> > > > Vi na documentação essa classe mas não estou conseguindo usar oO
> > > >http://livedocs.adobe.com/flex/3/langref/flash/text/TextFormat.html
>
> > > > //Text Format
> > > > _tf = new TextFormat();
> > > >  _tf.font = "Verdana";
> > > > _tf.size = 12;
> > > > _tf.color = 0xFF0000;
>
> > > > //Text Field
> > > > progressText = new TextField();
> > > > progressText.x = 400;
> > > > progressText.y = 315;
> > > > progressText.width = 200;
> > > > progressText.height = 20;
> > > > progressText.setTextFormat(_tf);
> > > > addChild(progressText);
>
> > > > Mas ele continua com a cor e fonte padrão (Preto e Times New Roman),
> > > > alguém sabe se existe alguma restrição a usar ela no preloader?
--~--~---------~--~----~------------~-------~--~----~
Você recebeu esta mensagem porque está inscrito na lista "flexdev"
Para enviar uma mensagem, envie um e-mail para flexdev@googlegroups.com
Para sair da lista, envie um email em branco para 
flexdev-unsubscr...@googlegroups.com
Mais opções estão disponíveis em http://groups.google.com/group/flexdev
-~----------~----~----~----~------~----~------~--~---

Responder a