Re: [Flashcoders] fl.controls.Label.textField.textColor not working

2010-09-21 Thread Alexander Farber
Thank you Kenneth, this explains what probably happens beneath the hood

On Tue, Sep 21, 2010 at 1:16 PM, Kenneth Kawamoto
 wrote:
> If you "cancel" the TextFormat you should be able to apply textColor, i.e.
>
> _label.setStyle("textFormat", new TextFormat(null, null, null));
> _label.textField.textColor = 0xff;
>
> But then you may as well just do:
>
> _label.setStyle("textFormat", new TextFormat(null, null, 0xff));
>
> ;)
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] fl.controls.Label.textField.textColor not working

2010-09-21 Thread Karl DeSaulniers

Last stab..

// Import the required component classes.
import fl.controls.Label;

// Create a new instance of the Font1 symbol from the document's  
library.

var myFont:Font = new MyFont();

// Create a new TextFormat object, and set the font and size properties.
var myTextFormat:TextFormat = new TextFormat();
myTextFormat.font = myFont.fontName;   //This requires a font in your  
Flash document's library with a linkage class of "MyFont".

myTextFormat.size = 8;
myTextFormat.textColor = 0xFF;

/* Create a new Label component instance, set the  
textField.antiAliasType property,
   set the embedFonts and textFormat styles, and add the label to  
the display list. */

var myLabel:Label = new Label();
myLabel.text = "should be red";
myLabel.background = true;
myLabel.backgroundColor = 0x00FF00;
//myLabel.autoSize = TextFieldAutoSize.LEFT;
//myLabel.move(10, 10);
myLabel.textField.antiAliasType = AntiAliasType.ADVANCED;
myLabel.setStyle("embedFonts", true);
myLabel.setStyle("textFormat", myTextFormat);
addChild(myLabel);

HTH,
got it from here.

http://www.adobe.com/devnet/flash/quickstart/label_component_as3.html

Karl


On Sep 21, 2010, at 5:53 AM, Alexander Farber wrote:


Nope :-)

On Tue, Sep 21, 2010 at 11:57 AM, Karl DeSaulniers  
 wrote:

_label.label = 'should be red';

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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


Re: [Flashcoders] fl.controls.Label.textField.textColor not working

2010-09-21 Thread Kenneth Kawamoto

If you "cancel" the TextFormat you should be able to apply textColor, i.e.

_label.setStyle("textFormat", new TextFormat(null, null, null));
_label.textField.textColor = 0xff;

But then you may as well just do:

_label.setStyle("textFormat", new TextFormat(null, null, 0xff));

;)

Kenneth Kawamoto
http://www.materiaprima.co.uk/

On 21/09/2010 10:21, Alexander Farber wrote:

Hello,

does anybody please know, why I can only set the background color here?

 var _label:Label = new Label();
 _label.text = 'should be red';
 _label.textField.background = true;
 _label.textField.backgroundColor = 0x00FF00;
 _label.textField.textColor = 0xFF;
 addChild(_label);

Thank you
Alex


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


Re: [Flashcoders] fl.controls.Label.textField.textColor not working

2010-09-21 Thread Alexander Farber
Nope :-)

On Tue, Sep 21, 2010 at 11:57 AM, Karl DeSaulniers  wrote:
> _label.label = 'should be red';
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] fl.controls.Label.textField.textColor not working

2010-09-21 Thread Karl DeSaulniers

Oops, sorry.
I meant.

_label.label = 'should be red';

Karl

On Sep 21, 2010, at 4:54 AM, Karl DeSaulniers wrote:


Try

_label.textField.label = 'should be red';

Best,

Karl


On Sep 21, 2010, at 4:47 AM, Alexander Farber wrote:


Thanks, but -

On Tue, Sep 21, 2010 at 11:36 AM, Karl DeSaulniers  
 wrote:

Have you tried setting the text color before the background color?
I think you were assigning your text to _label not _label.textField.
Is this what you wanted?

Try

   var _label:Label = new Label();
   _label.textField.textColor = 0xFF;
   _label.textField.background = true;
   _label.textField.backgroundColor = 0x00FF00;
   _label.textField.text = 'should be red';
   addChild(_label);


this is not working either.

Yes, I've tried several things (changing order of setting text/color)
and I'm aware of the TextFormat workaround, but still would like  
to get

textColor working since I only need to change the color in my app.

Regards
Alex

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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


Re: [Flashcoders] fl.controls.Label.textField.textColor not working

2010-09-21 Thread Karl DeSaulniers

Try

_label.textField.label = 'should be red';

Best,

Karl


On Sep 21, 2010, at 4:47 AM, Alexander Farber wrote:


Thanks, but -

On Tue, Sep 21, 2010 at 11:36 AM, Karl DeSaulniers  
 wrote:

Have you tried setting the text color before the background color?
I think you were assigning your text to _label not _label.textField.
Is this what you wanted?

Try

   var _label:Label = new Label();
   _label.textField.textColor = 0xFF;
   _label.textField.background = true;
   _label.textField.backgroundColor = 0x00FF00;
   _label.textField.text = 'should be red';
   addChild(_label);


this is not working either.

Yes, I've tried several things (changing order of setting text/color)
and I'm aware of the TextFormat workaround, but still would like to  
get

textColor working since I only need to change the color in my app.

Regards
Alex

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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


Re: [Flashcoders] fl.controls.Label.textField.textColor not working

2010-09-21 Thread Alexander Farber
Unfortunately there is no "html" property, and even this is not working:

var _label:Label = new Label();
_label.textField.background = true;
_label.textField.backgroundColor = 0x00FF00;

_label.textField.textColor = 0xFF;
_label.textField.text = "should be red";
_label.textField.htmlText = "should be red";
_label.text = "should be red";
_label.htmlText = "should be red";
_label.textField.textColor = 0xFF;

addChild(_label);

(Yes, I'm aware of TextFormat and ... workarounds,
but wonder why is textField.backgroundColor working and textColor is not)

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


Re: [Flashcoders] fl.controls.Label.textField.textColor not working

2010-09-21 Thread Alexander Farber
Thanks, but -

On Tue, Sep 21, 2010 at 11:36 AM, Karl DeSaulniers  wrote:
> Have you tried setting the text color before the background color?
> I think you were assigning your text to _label not _label.textField.
> Is this what you wanted?
>
> Try
>
>    var _label:Label = new Label();
>    _label.textField.textColor = 0xFF;
>    _label.textField.background = true;
>    _label.textField.backgroundColor = 0x00FF00;
>    _label.textField.text = 'should be red';
>    addChild(_label);

this is not working either.

Yes, I've tried several things (changing order of setting text/color)
and I'm aware of the TextFormat workaround, but still would like to get
textColor working since I only need to change the color in my app.

Regards
Alex

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


Re: [Flashcoders] fl.controls.Label.textField.textColor not working

2010-09-21 Thread Karl DeSaulniers

Quite possibly could be that you need to set a html text field too.

_label.textField.html = true;
_label.textField.htmlText = "should be red";

JAT

Karl


On Sep 21, 2010, at 4:36 AM, Karl DeSaulniers wrote:


Have you tried setting the text color before the background color?
I think you were assigning your text to _label not _lavel.textField.
Is this what you wanted?

Try

var _label:Label = new Label();
_label.textField.textColor = 0xFF;
_label.textField.background = true;
_label.textField.backgroundColor = 0x00FF00;
_label.textField.text = 'should be red';
addChild(_label);

Best,

Karl

On Sep 21, 2010, at 4:21 AM, Alexander Farber wrote:


Hello,

does anybody please know, why I can only set the background color  
here?


var _label:Label = new Label();
_label.text = 'should be red';
_label.textField.background = true;
_label.textField.backgroundColor = 0x00FF00;
_label.textField.textColor = 0xFF;
addChild(_label);

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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


Re: [Flashcoders] fl.controls.Label.textField.textColor not working

2010-09-21 Thread Karl DeSaulniers

Have you tried setting the text color before the background color?
I think you were assigning your text to _label not _lavel.textField.
Is this what you wanted?

Try

var _label:Label = new Label();
_label.textField.textColor = 0xFF;
_label.textField.background = true;
_label.textField.backgroundColor = 0x00FF00;
_label.textField.text = 'should be red';
addChild(_label);

Best,

Karl

On Sep 21, 2010, at 4:21 AM, Alexander Farber wrote:


Hello,

does anybody please know, why I can only set the background color  
here?


var _label:Label = new Label();
_label.text = 'should be red';
_label.textField.background = true;
_label.textField.backgroundColor = 0x00FF00;
_label.textField.textColor = 0xFF;
addChild(_label);

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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


[Flashcoders] fl.controls.Label.textField.textColor not working

2010-09-21 Thread Alexander Farber
Hello,

does anybody please know, why I can only set the background color here?

var _label:Label = new Label();
_label.text = 'should be red';
_label.textField.background = true;
_label.textField.backgroundColor = 0x00FF00;
_label.textField.textColor = 0xFF;
addChild(_label);

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