Skip to main content
March 28, 2010
Question

html file will not display

  • March 28, 2010
  • 1 reply
  • 446 views

Hi,

I hope this is the right forum for my question.

I am building a website using AS3 for my son. He lives in another city so I am sending the html files as test so he can see how things are progressing.

We have done this in the past but for some reason he only sees a white and black screen on his end.

The only thing that has changed is I have embedded a new font from the text fonts. Should I have clicked the option include at runtime sharing?

Thanks

This topic has been closed for replies.

1 reply

Inspiring
March 28, 2010

Hi,

Yes, the font must be included in the library and checked to export

And in AS3 you will need to use this code when using the font:

// Font

var myFont:Font = new _Trebuchet();

// Text formatting

var theTextFormat:TextFormat = new TextFormat();
theTextFormat.font=myFont.fontName;
theTextFormat.size=10;
theTextFormat.bold = true;

// Text field

var menuLabel:TextField = new TextField();
menuLabel.defaultTextFormat=theTextFormat;
menuLabel.embedFonts=true;
menuLabel.selectable=false;
menuLabel.textColor=0x000000;
menuLabel.multiline=false;
menuLabel.antiAliasType="advanced";
menuLabel.border=false;

menuLabel.text="my text will be here...";

In AS2 all you needed was to assign the font usage in the text field but in AS3 that doesnt seem to work. Try this and hope it helps.

March 29, 2010

Thanks,

I did that originally.

It seems to be the font itself, which was downloaded from a type/font website. It turns out it was incomplete and I thinks that was creating lots of problems.

I have switched and things seem to working.

However, I have a new problem, which I am about to post.

Thanks for your help.