Thank you very much for your help
I thought that I solved problem but this is not true.
Yes I load css file as you show. I just did not show that in my
example for less code.

You coder works but I see some strange thing. If I change name in
library to any other name – Arial2 and try it with my_fmt.font =
"Arial2" flash show Times. This is a bit strange.

It looks I need embedded font because I cannot apply _alpha without
embedFonts = true.
Here is example:
http://www.natavi.co.uk/test/text_test.html
http://www.natavi.co.uk/test/text_test.fla

Both examples have _alpha=50; Result is different. Why I cannot change
alpha for the first example that show text correctly. This is a
problem that I can not fix.


2009/5/14 Karl DeSaulniers <[email protected]>:
> Now this works:
>
> // ---- start
>
> var curText:String = "<p class=\"headline\">Different Color Headers</p>"
> + "<p>Mauris posuere iaculis lectus. Maecenas fringilla viverra libero."
> + "Aenean adipiscing massa non orci. Etiam quis lacus sed pede porttitor
> dignissim.<br>"
> + "Do you like <strong><a href=\"mailto:[email protected]\";
> target=\"_blank\" class=\"bURL\">Figleaf?</a></strong><br>"
> + "Nullam malesuada leo et turpis tincidunt eleifend. Proin non eros et
> mauris suscipit fringilla. In hac habitasse platea dictumst."
> + "Maecenas varius. Duis ipsum nibh, varius a, aliquet nec, ornare ac, diam.
> Nam sollicitudin bibendum elit."
> + "Sed pellentesque tincidunt mi.</p><br><br><p class=\"author\">The Flash
> Comunity is a tightly knit, very intricate part of the web</p>";
>
> /*
> //---  Ooor  if you want to import your text via a text file or other
> var curText:String;
> loadVariables("curText.txt", this);
> */
> /*
> // inside curText.txt  :
> curText=<p class="headline">Different Color Headers</p><p>Mauris posuere
> iaculis lectus. Maecenas fringilla viverra libero. Aenean adipiscing massa
> non orci. Etiam quis lacus sed pede porttitor dignissim.<br>Do you like
> <strong><a href="mailto:[email protected]"; target="_blank"
> class="bURL">Figleaf?</a></strong><br>Nullam malesuada leo et turpis
> tincidunt eleifend. Proin non eros et mauris suscipit fringilla. In hac
> habitasse platea dictumst. Maecenas varius. Duis ipsum nibh, varius a,
> aliquet nec, ornare ac, diam. Nam sollicitudin bibendum elit. Sed
> pellentesque tincidunt mi.</p><br><br><p class="author">The Flash Comunity
> is a tightly knit, very intricate part of the web</p>
> */
>
> var fmt:TextFormat = new TextFormat();
> fmt.font = "Arial";
> fmt.color = 0x000000; // for base color without style applied
>
> import TextField.StyleSheet;
> this.createTextField("textContent", 0, 0, 20, 240, 320);
> textContent.multiline = true;
> textContent.wordWrap = true;
> textContent.autoSize = true
> textContent.selectable = false;
> textContent.html = true;
> textContent.setTextFormat(fmt);
>
> var my_styleSheet:StyleSheet = new StyleSheet();
> my_styleSheet.onLoad = function(success:Boolean) {
>        textContent.ignoreWhite = true;
>    if (success) {
>        textContent.styleSheet = my_styleSheet;
>        textContent.htmlText = curText;
>    } else {
>                curText = "Text not loading";
>                textContent.htmlText = curText;
>        }
> };
> my_styleSheet.load("flash_css.css");
>
> // -------- end
>
> Best,
>
> Karl DeSaulniers
> Design Drumm
> http://designdrumm.com
>
> On May 13, 2009, at 10:57 AM, natalia Vikhtinskaya wrote:
>
>> I found.
>> Solved.
>> here is correct code with font in library id="Arial"
>> var my_fmt:TextFormat = new TextFormat();
>> my_fmt.font = "Arial";
>>
>>        this.createTextField("textContent", 1, 0, 0, textAreaW, textAreaW);
>>        var obj=this.textContent;
>>        obj.multiline = true;
>>        obj.wordWrap = true;
>>        //obj.embedFonts = true;      this is wrong
>>                obj.html=true;
>>        obj.autoSize = true;
>>        obj.selectable = false;
>>        obj.setTextFormat(my_fmt);
>>        obj.styleSheet = flash_css;
>>        obj.htmlText=curText;
>>
>> Now it shows bold, italic, normal
>>
>> 2009/5/13 Ruy Adorno <[email protected]>:
>>>
>>> And what about different ids and the same linkage?
>>>
>>> natalia Vikhtinskaya wrote:
>>>>
>>>> Not possible to have them with the same id.
>>>>
>>>> 2009/5/13 Ruy Adorno <[email protected]>:
>>>>
>>>>>
>>>>> You have to embed 2 times the same font in your library, I think you
>>>>> can
>>>>> use
>>>>> just the same id, but you should import one as bold and another as a
>>>>> simple
>>>>> font.
>>>>>
>>>>> natalia Vikhtinskaya wrote:
>>>>>
>>>>>>
>>>>>> I solved problem with hand cursor. Still can not make text bold. If I
>>>>>> check properties in library font- bold all text becomes bold.
>>>>>>
>>>>>> 2009/5/13 natalia Vikhtinskaya <[email protected]>:
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> Thank you for help, but that does not help.  I added text area with
>>>>>>> embeded Arial letters- normal and bold on stage.
>>>>>>>
>>>>>>>
>>>>>>> 2009/5/13 Karl DeSaulniers <[email protected]>:
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> Hi Natalia,
>>>>>>>>
>>>>>>>> On May 13, 2009, at 4:26 AM, natalia Vikhtinskaya wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> font-family: Arial;  // I have font Arial in the library with id
>>>>>>>>> “Arial”.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> Try placing a instance of your embeded font off stage where your
>>>>>>>> loading
>>>>>>>> your textBox.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Another problem if I have bold tags <b>some text</b> that text is
>>>>>>>>> not
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> Try <strong>your text here</strong>
>>>>>>>>
>>>>>>>> HTH
>>>>>>>>
>>>>>>>> Karl DeSaulniers
>>>>>>>> Design Drumm
>>>>>>>> http://designdrumm.com
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Flashcoders mailing list
>>>>>>>> [email protected]
>>>>>>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Flashcoders mailing list
>>>>>> [email protected]
>>>>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Flashcoders mailing list
>>>>> [email protected]
>>>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Flashcoders mailing list
>>>> [email protected]
>>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Flashcoders mailing list
>>> [email protected]
>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>
>>
>> _______________________________________________
>> Flashcoders mailing list
>> [email protected]
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to