RE: [Flashcoders] ComBox Box - Font Issues

2008-10-20 Thread Karim Beyrouti
I am setting everything before I add the data. However I have sorted the
issue out by setting the global style. I don't think its optimal - but it
works.

Here is my working code for reference:


var tClass:Class=
getDefinitionByName("GothamMedium") as Class;
Font.registerFont(tClass);

var tf:TextFormat   = new TextFormat();
tf.font = "Gotham Medium";
tf.size = 12;
tf.bold = false;

cmb_mc.dropdown.setRendererStyle("embedFonts" ,
true);
cmb_mc.dropdown.setRendererStyle("textFormat" , tf);
cmb_mc.textField.setStyle("fontFamily" , "Gotham
Medium" );
cmb_mc.textField.setStyle("embedFonts" , true );

dob_txt.embedFonts  = true;
dob_txt.setTextFormat(tf);
StyleManager.setStyle("textFormat" , tf)




Many thanks for all your help


Karim
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Glen Pike
Sent: 19 October 2008 21:59
To: Flash Coders List
Subject: Re: [Flashcoders] ComBox Box - Font Issues

Hi,

Are you setting these values before or after you add the data?  That 
may have a bearing.  
   
Have a look at this article:
   

http://blogs.adobe.com/pdehaan/2008/03/using_embedded_fonts_with_the_3.html

Which may / may not help?

Glen
   
T

karim beyrouti wrote:
> Hi Glen - thanks for the answer.. Yep - i remember that one - I tried 
> this at first and sadly it did not work...
>
> however to make things stranger - the fonts work in the textfield when 
> i use the keys to select from the drop down (then mouse selection 
> works). But it does not work initially.
>
> hmmm...
>
>
>
>
> On 18 Oct 2008, at 17:38, Glen Pike wrote:
>
>> Hi,
>>
>>   Try putting a text field off the stage set and embed your chosen 
>> font into it - that used to do the trick with AS2.
>>
>>   Glen
>>
>> karim beyrouti wrote:
>>> Hi list  -
>>>
>>> I am using the flash CS3 components - and have hit a little snag - 
>>> when testing in the IDE ( or just running the SWF ) all the fonts 
>>> show up fine - no problem. However the moment the site goes in the 
>>> browser - the font does not show up in the ComboBox textField, 
>>> however they show up no in the dropdown menu. I have embedded the 
>>> font in my library - and well - i have no clue as to why this is not 
>>> working in the browser.
>>>
>>> this is the code i am using to format the combobox:
>>>
>>> 
>>>var tf:TextFormat = new TextFormat();
>>>tf.font = "Gotham Medium";
>>>tf.size = 12;
>>>tf.bold = false;
>>>
>>>cmb_mc.dropdown.setRendererStyle("embedFonts", true);
>>>cmb_mc.dropdown.setRendererStyle("textFormat", tf);
>>>   cmb_mc.textField.setStyle("embedFonts", true);
>>>cmb_mc.textField.setStyle("textFormat", tf);
>>>
>>> 
>>>
>>>
>>> Kind regards
>>>
>>>
>>>
>>> Karim Beyrouti
>>> ___
>>> Flashcoders mailing list
>>> Flashcoders@chattyfig.figleaf.com
>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>
>>>
>>
>> -- 
>>
>> Glen Pike
>> 01326 218440
>> www.glenpike.co.uk <http://www.glenpike.co.uk>
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>

-- 

Glen Pike
01326 218440
www.glenpike.co.uk <http://www.glenpike.co.uk>

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] ComBox Box - Font Issues

2008-10-19 Thread Glen Pike

Hi,

   Are you setting these values before or after you add the data?  That 
may have a bearing.  
  
   Have a look at this article:
  
   
http://blogs.adobe.com/pdehaan/2008/03/using_embedded_fonts_with_the_3.html


   Which may / may not help?

   Glen
  
T


karim beyrouti wrote:
Hi Glen - thanks for the answer.. Yep - i remember that one - I tried 
this at first and sadly it did not work...


however to make things stranger - the fonts work in the textfield when 
i use the keys to select from the drop down (then mouse selection 
works). But it does not work initially.


hmmm...




On 18 Oct 2008, at 17:38, Glen Pike wrote:


Hi,

  Try putting a text field off the stage set and embed your chosen 
font into it - that used to do the trick with AS2.


  Glen

karim beyrouti wrote:

Hi list  -

I am using the flash CS3 components - and have hit a little snag - 
when testing in the IDE ( or just running the SWF ) all the fonts 
show up fine - no problem. However the moment the site goes in the 
browser - the font does not show up in the ComboBox textField, 
however they show up no in the dropdown menu. I have embedded the 
font in my library - and well - i have no clue as to why this is not 
working in the browser.


this is the code i am using to format the combobox:


   var tf:TextFormat = new TextFormat();
   tf.font = "Gotham Medium";
   tf.size = 12;
   tf.bold = false;

   cmb_mc.dropdown.setRendererStyle("embedFonts", true);
   cmb_mc.dropdown.setRendererStyle("textFormat", tf);
  cmb_mc.textField.setStyle("embedFonts", true);
   cmb_mc.textField.setStyle("textFormat", tf);




Kind regards



Karim Beyrouti
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--

Glen Pike
01326 218440
www.glenpike.co.uk 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--

Glen Pike
01326 218440
www.glenpike.co.uk 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] ComBox Box - Font Issues

2008-10-19 Thread sebastian
Maybe the font is being embedded in your code AFTER you are displaying 
the other fields that also use the font [which means the initial fields 
are un-embeded]? Or it could be you forgot to make the 'embed' setting 
true on all fields...?


Also, the order of 'embed' and then setting the text is important, can't 
recall offhand what that was, but if you search the archives I gave the 
answer to the order importance about a month ago.


Good luck!

karim beyrouti wrote:
Hi Glen - thanks for the answer.. Yep - i remember that one - I tried 
this at first and sadly it did not work...


however to make things stranger - the fonts work in the textfield when i 
use the keys to select from the drop down (then mouse selection works). 
But it does not work initially.


hmmm...




On 18 Oct 2008, at 17:38, Glen Pike wrote:


Hi,

  Try putting a text field off the stage set and embed your chosen 
font into it - that used to do the trick with AS2.


  Glen

karim beyrouti wrote:

Hi list  -

I am using the flash CS3 components - and have hit a little snag - 
when testing in the IDE ( or just running the SWF ) all the fonts 
show up fine - no problem. However the moment the site goes in the 
browser - the font does not show up in the ComboBox textField, 
however they show up no in the dropdown menu. I have embedded the 
font in my library - and well - i have no clue as to why this is not 
working in the browser.


this is the code i am using to format the combobox:


   var tf:TextFormat = new TextFormat();
   tf.font = "Gotham Medium";
   tf.size = 12;
   tf.bold = false;

   cmb_mc.dropdown.setRendererStyle("embedFonts", true);
   cmb_mc.dropdown.setRendererStyle("textFormat", tf);
  cmb_mc.textField.setStyle("embedFonts", true);
   cmb_mc.textField.setStyle("textFormat", tf);




Kind regards



Karim Beyrouti
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--

Glen Pike
01326 218440
www.glenpike.co.uk 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] ComBox Box - Font Issues

2008-10-18 Thread karim beyrouti
this is getting stranger - I have tried a lot of things ( now slowly  
looking at hacking into the input box component ). The odd thing is  
that this works in the flash IDE - but not when its online / in the  
browser - it just does not show the font.


Here is a link:

http://underground-bunker.com/transfer/fonttest/

The issue is with the combo box - on the right of the caption 'WHERE  
DO YOU LIVE '

( its styled to be all white )
By default it should show some text "select country"
The font shows up in the combo drop down menu - but not in the input  
field.


Surely it cant be this much pain to set the font of a combo menu.
I must be doing something really wrong somewhere.




var tClass:Class = getDefinitionByName("GothamMedium") 
as Class;
Font.registerFont(tClass);


var tf:TextFormat   = new TextFormat();
tf.font = "Gotham Medium";
tf.size = 12;
tf.bold = false;
cmb_mc.dropdown.setRendererStyle("embedFonts", true);
cmb_mc.dropdown.setRendererStyle("textFormat", tf);
cmb_mc.textField.textField.embedFonts = true;
cmb_mc.textField.setStyle("textFormat", tf);
cmb_mc.textField.textField.defaultTextFormat = tf




Regards


Karim

On 18 Oct 2008, at 18:14, karim beyrouti wrote:

Hi Glen - thanks for the answer.. Yep - i remember that one - I  
tried this at first and sadly it did not work...


however to make things stranger - the fonts work in the textfield  
when i use the keys to select from the drop down (then mouse  
selection works). But it does not work initially.


hmmm...




On 18 Oct 2008, at 17:38, Glen Pike wrote:


Hi,

 Try putting a text field off the stage set and embed your chosen  
font into it - that used to do the trick with AS2.


 Glen

karim beyrouti wrote:

Hi list  -

I am using the flash CS3 components - and have hit a little snag -  
when testing in the IDE ( or just running the SWF ) all the fonts  
show up fine - no problem. However the moment the site goes in the  
browser - the font does not show up in the ComboBox textField,  
however they show up no in the dropdown menu. I have embedded the  
font in my library - and well - i have no clue as to why this is  
not working in the browser.


this is the code i am using to format the combobox:


  var tf:TextFormat = new TextFormat();
  tf.font = "Gotham Medium";
  tf.size = 12;
  tf.bold = false;

  cmb_mc.dropdown.setRendererStyle("embedFonts", true);
  cmb_mc.dropdown.setRendererStyle("textFormat", tf);
 cmb_mc.textField.setStyle("embedFonts", true);
  cmb_mc.textField.setStyle("textFormat", tf);




Kind regards



Karim Beyrouti
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--

Glen Pike
01326 218440
www.glenpike.co.uk 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] ComBox Box - Font Issues

2008-10-18 Thread karim beyrouti
Hi Glen - thanks for the answer.. Yep - i remember that one - I tried  
this at first and sadly it did not work...


however to make things stranger - the fonts work in the textfield when  
i use the keys to select from the drop down (then mouse selection  
works). But it does not work initially.


hmmm...




On 18 Oct 2008, at 17:38, Glen Pike wrote:


Hi,

  Try putting a text field off the stage set and embed your chosen  
font into it - that used to do the trick with AS2.


  Glen

karim beyrouti wrote:

Hi list  -

I am using the flash CS3 components - and have hit a little snag -  
when testing in the IDE ( or just running the SWF ) all the fonts  
show up fine - no problem. However the moment the site goes in the  
browser - the font does not show up in the ComboBox textField,  
however they show up no in the dropdown menu. I have embedded the  
font in my library - and well - i have no clue as to why this is  
not working in the browser.


this is the code i am using to format the combobox:


   var tf:TextFormat = new TextFormat();
   tf.font = "Gotham Medium";
   tf.size = 12;
   tf.bold = false;

   cmb_mc.dropdown.setRendererStyle("embedFonts", true);
   cmb_mc.dropdown.setRendererStyle("textFormat", tf);
  cmb_mc.textField.setStyle("embedFonts", true);
   cmb_mc.textField.setStyle("textFormat", tf);




Kind regards



Karim Beyrouti
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--

Glen Pike
01326 218440
www.glenpike.co.uk 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] ComBox Box - Font Issues

2008-10-18 Thread Rob Romanek
I'm pretty sure the text field trick should work because it forces the  
font to be registered. Just embedding fonts in your library won't be  
enough if they are accessed via code only. To avoid the text field  
trick you will need to use Font.registerFont() to make them usable in  
your app. Something along the lines of:


var tClass:Class = getDefinitionByName("Gotham Medium") as Class;
Font.registerFont(tClass);

hth,

Rob

On 18-Oct-08, at 12:38 PM, Glen Pike wrote:


Hi,

  Try putting a text field off the stage set and embed your chosen  
font into it - that used to do the trick with AS2.


  Glen

karim beyrouti wrote:

Hi list  -

I am using the flash CS3 components - and have hit a little snag -  
when testing in the IDE ( or just running the SWF ) all the fonts  
show up fine - no problem. However the moment the site goes in the  
browser - the font does not show up in the ComboBox textField,  
however they show up no in the dropdown menu. I have embedded the  
font in my library - and well - i have no clue as to why this is  
not working in the browser.


this is the code i am using to format the combobox:


   var tf:TextFormat = new TextFormat();
   tf.font = "Gotham Medium";
   tf.size = 12;
   tf.bold = false;

   cmb_mc.dropdown.setRendererStyle("embedFonts", true);
   cmb_mc.dropdown.setRendererStyle("textFormat", tf);
  cmb_mc.textField.setStyle("embedFonts", true);
   cmb_mc.textField.setStyle("textFormat", tf);




Kind regards



Karim Beyrouti
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--

Glen Pike
01326 218440
www.glenpike.co.uk 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] ComBox Box - Font Issues

2008-10-18 Thread Glen Pike

Hi,

   Try putting a text field off the stage set and embed your chosen 
font into it - that used to do the trick with AS2.


   Glen

karim beyrouti wrote:

Hi list  -

I am using the flash CS3 components - and have hit a little snag - 
when testing in the IDE ( or just running the SWF ) all the fonts show 
up fine - no problem. However the moment the site goes in the browser 
- the font does not show up in the ComboBox textField, however they 
show up no in the dropdown menu. I have embedded the font in my 
library - and well - i have no clue as to why this is not working in 
the browser.


this is the code i am using to format the combobox:


var tf:TextFormat = new TextFormat();
tf.font = "Gotham Medium";
tf.size = 12;
tf.bold = false;
   


cmb_mc.dropdown.setRendererStyle("embedFonts", true);
cmb_mc.dropdown.setRendererStyle("textFormat", tf);
   
cmb_mc.textField.setStyle("embedFonts", true);

cmb_mc.textField.setStyle("textFormat", tf);




Kind regards



Karim Beyrouti
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--

Glen Pike
01326 218440
www.glenpike.co.uk 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] ComBox Box - Font Issues

2008-10-18 Thread karim beyrouti

Hi list  -

I am using the flash CS3 components - and have hit a little snag -  
when testing in the IDE ( or just running the SWF ) all the fonts show  
up fine - no problem. However the moment the site goes in the browser  
- the font does not show up in the ComboBox textField, however they  
show up no in the dropdown menu. I have embedded the font in my  
library - and well - i have no clue as to why this is not working in  
the browser.


this is the code i am using to format the combobox:


var tf:TextFormat   = new TextFormat();
tf.font = "Gotham Medium";
tf.size = 12;
tf.bold = false;


cmb_mc.dropdown.setRendererStyle("embedFonts", true);
cmb_mc.dropdown.setRendererStyle("textFormat", tf);

cmb_mc.textField.setStyle("embedFonts", true);
cmb_mc.textField.setStyle("textFormat", tf);




Kind regards



Karim Beyrouti
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders