Skip to main content
Participant
January 13, 2011
Answered

Alpha property not working on TextField when publish for Reader 9

  • January 13, 2011
  • 2 replies
  • 561 views

Hi,

I have a movie that is working fine when I publish for Reader 10, but when I publish for Reader 9, the code that assigns an alpha property to my TextFields stops working. I have a previous movie, which I probably did in CS4, that uses similar code to fade in and out TextFields. It was published for Reader 9 and works fine.Is it possible that something has changed in CS5 (note, I'm not using TLF text boxes, only dynamic TextFields)?

Here's an example of the code I'm using:

stop();
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
import flash.events.*;
import flash.text.*;
import flash.text.TextFormat;
import flash.utils.Timer;
import flash.display.MovieClip;
import flash.display.Sprite;

var txtFormat1:TextFormat = new TextFormat();
txtFormat1.font = "Optima";
txtFormat1.color = 0x000000;
txtFormat1.bold = false;
txtFormat1.size = 16;
txtFormat1.leading = 2;

var subtitle:TextField = new TextField();
subtitle.autoSize = TextFieldAutoSize.CENTER;
subtitle.selectable = false;
subtitle.defaultTextFormat = txtFormat1;

var fadeInSubtitle:Tween;

addChild(subtitle);
subtitle.x = stage.stageWidth / 2 - subtitle.width / 2;
subtitle.y = stage.stageHeight / 2 - subtitle.height / 2;
subtitle.alpha = 0;
subtitle.text = "What is the most important question in";

fadeInSubtitle = new Tween(subtitle,"alpha",None.easeNone,0,1,3,true);

This topic has been closed for replies.
Correct answer Andrei1-bKoviI

You have to embed fonts.


2 replies

Andrei1-bKoviICorrect answer
Inspiring
January 13, 2011

You have to embed fonts.


Participant
January 14, 2011

Thanks.

Just curious: Is there a reason why the alpha on the TextFields worked without embedding fonts when publishing for Flash Player 10? Does it handle text, even when it's not TLF, differently than Flash Player 9?

Inspiring
January 15, 2011

Flash 10 libraries are different and there are dramatic improvements in this version comparing to Flash 9 including TextField.

Participant
January 13, 2011

I'm replying to my own message because I don't see a way to correct it. I didn't mean to type Reader 9, but Flash Player 9.