RE: [Flashcoders] Font in Library problems

2007-07-17 Thread David Ngo
Not sure where your error is, but can I ask why you're instantiating your
Font instance twice?


David


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael Trim
Sent: Tuesday, July 17, 2007 10:12 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Font in Library problems

Can anyone tell me why the following isn't displaying any text?

No Compiler errors, all traces show objects existing?

If I remove the textformat all together it appears on stage in times.


__


package com.instantbusiness.client.project.display.map{

import flash.display.Sprite;

import flash.text.*;
import flash.events.MouseEvent;
import ClientRegular;




public class Label extends Sprite{

private var labelText:TextField;
private var labelFormat:TextFormat;
private var clientRegular:Font = new ClientRegular();   


public function Label(){

trace(Label:  + this +  \n);


clientRegular = new ClientRegular();

trace(clientRegular: +clientRegular);

}   


public function setText(labelStr:String){

labelFormat  = new TextFormat();
labelFormat.color = 0xFF;
labelFormat.size = 20;
labelFormat.font = clientRegular.fontName;

trace(clientRegular.fontName
+clientRegular.fontName);

trace(labelFormat);

labelText = new TextField();

labelText.embedFonts = true;
labelText.autoSize = TextFieldAutoSize.LEFT;
labelText.antiAliasType =
AntiAliasType.ADVANCED;

labelText.selectable = false;
labelText.mouseEnabled = true;
labelText.setTextFormat(labelFormat);
trace(labelText);
trace(labelText.getTextFormat());
labelText.text = labelStr;
addChild(labelText);

}


}

}

__

Thanks, Michael.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Font in Library problems

2007-07-17 Thread Michael Trim
That's a mistake, I've tried a lot of variations to get this working!

I can't find an example online where this works inside a class, all the
documentation has timeline examples (which I can get working with same
font).


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David
Ngo
Sent: 17 July 2007 15:29
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Font in Library problems

Not sure where your error is, but can I ask why you're instantiating
your
Font instance twice?


David


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Trim
Sent: Tuesday, July 17, 2007 10:12 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Font in Library problems

Can anyone tell me why the following isn't displaying any text?

No Compiler errors, all traces show objects existing?

If I remove the textformat all together it appears on stage in times.


__


package com.instantbusiness.client.project.display.map{

import flash.display.Sprite;

import flash.text.*;
import flash.events.MouseEvent;
import ClientRegular;




public class Label extends Sprite{

private var labelText:TextField;
private var labelFormat:TextFormat;
private var clientRegular:Font = new ClientRegular();   


public function Label(){

trace(Label:  + this +  \n);


clientRegular = new ClientRegular();

trace(clientRegular: +clientRegular);

}   


public function setText(labelStr:String){

labelFormat  = new TextFormat();
labelFormat.color = 0xFF;
labelFormat.size = 20;
labelFormat.font = clientRegular.fontName;

trace(clientRegular.fontName
+clientRegular.fontName);

trace(labelFormat);

labelText = new TextField();

labelText.embedFonts = true;
labelText.autoSize = TextFieldAutoSize.LEFT;
labelText.antiAliasType =
AntiAliasType.ADVANCED;

labelText.selectable = false;
labelText.mouseEnabled = true;
labelText.setTextFormat(labelFormat);
trace(labelText);
trace(labelText.getTextFormat());
labelText.text = labelStr;
addChild(labelText);

}


}

}

__

Thanks, Michael.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Font in Library problems

2007-07-17 Thread David Ngo
Ah. Try setting the textformat AFTER you set the text.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael Trim
Sent: Tuesday, July 17, 2007 10:47 AM
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Font in Library problems

That's a mistake, I've tried a lot of variations to get this working!

I can't find an example online where this works inside a class, all the
documentation has timeline examples (which I can get working with same
font).


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David
Ngo
Sent: 17 July 2007 15:29
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Font in Library problems

Not sure where your error is, but can I ask why you're instantiating
your
Font instance twice?


David


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Trim
Sent: Tuesday, July 17, 2007 10:12 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Font in Library problems

Can anyone tell me why the following isn't displaying any text?

No Compiler errors, all traces show objects existing?

If I remove the textformat all together it appears on stage in times.


__


package com.instantbusiness.client.project.display.map{

import flash.display.Sprite;

import flash.text.*;
import flash.events.MouseEvent;
import ClientRegular;




public class Label extends Sprite{

private var labelText:TextField;
private var labelFormat:TextFormat;
private var clientRegular:Font = new ClientRegular();   


public function Label(){

trace(Label:  + this +  \n);


clientRegular = new ClientRegular();

trace(clientRegular: +clientRegular);

}   


public function setText(labelStr:String){

labelFormat  = new TextFormat();
labelFormat.color = 0xFF;
labelFormat.size = 20;
labelFormat.font = clientRegular.fontName;

trace(clientRegular.fontName
+clientRegular.fontName);

trace(labelFormat);

labelText = new TextField();

labelText.embedFonts = true;
labelText.autoSize = TextFieldAutoSize.LEFT;
labelText.antiAliasType =
AntiAliasType.ADVANCED;

labelText.selectable = false;
labelText.mouseEnabled = true;
labelText.setTextFormat(labelFormat);
trace(labelText);
trace(labelText.getTextFormat());
labelText.text = labelStr;
addChild(labelText);

}


}

}

__

Thanks, Michael.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Font in Library problems

2007-07-17 Thread Michael Trim
Doh! *blushes* thanks David.

Sometimes you can look at something too long.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David
Ngo
Sent: 17 July 2007 16:15
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Font in Library problems

Ah. Try setting the textformat AFTER you set the text.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Trim
Sent: Tuesday, July 17, 2007 10:47 AM
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Font in Library problems

That's a mistake, I've tried a lot of variations to get this working!

I can't find an example online where this works inside a class, all the
documentation has timeline examples (which I can get working with same
font).


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David
Ngo
Sent: 17 July 2007 15:29
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Font in Library problems

Not sure where your error is, but can I ask why you're instantiating
your
Font instance twice?


David


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Trim
Sent: Tuesday, July 17, 2007 10:12 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Font in Library problems

Can anyone tell me why the following isn't displaying any text?

No Compiler errors, all traces show objects existing?

If I remove the textformat all together it appears on stage in times.


__


package com.instantbusiness.client.project.display.map{

import flash.display.Sprite;

import flash.text.*;
import flash.events.MouseEvent;
import ClientRegular;




public class Label extends Sprite{

private var labelText:TextField;
private var labelFormat:TextFormat;
private var clientRegular:Font = new ClientRegular();   


public function Label(){

trace(Label:  + this +  \n);


clientRegular = new ClientRegular();

trace(clientRegular: +clientRegular);

}   


public function setText(labelStr:String){

labelFormat  = new TextFormat();
labelFormat.color = 0xFF;
labelFormat.size = 20;
labelFormat.font = clientRegular.fontName;

trace(clientRegular.fontName
+clientRegular.fontName);

trace(labelFormat);

labelText = new TextField();

labelText.embedFonts = true;
labelText.autoSize = TextFieldAutoSize.LEFT;
labelText.antiAliasType =
AntiAliasType.ADVANCED;

labelText.selectable = false;
labelText.mouseEnabled = true;
labelText.setTextFormat(labelFormat);
trace(labelText);
trace(labelText.getTextFormat());
labelText.text = labelStr;
addChild(labelText);

}


}

}

__

Thanks, Michael.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman