Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

textfield._alpha isn't working in MX!!!! 1

Status
Not open for further replies.

colep

Programmer
Jul 18, 2002
58
US
Ok, someone please tell me what is wrong with this code. I'm trying to change the alpha property of a text field and it won't work. I've done it with movie clips just fine. Here's the code:

function acctAppear() {
if (loopnum == 1) {
acct_txt._alpha = 1;
acct_txt._visible = true;
sandy_txt._alpha = 1;
sandy_txt._visible = true;
sandy_email._alpha = 1;
sandy_email._visible = true;
} else if (loopnum < 100) {
acct_txt._alpha += 1;
sandy_txt._alpha += 1;
sandy_email._alpha += 1;
} else {
acct_txt._visible = true;
sandy_txt._visible = true;
sandy_email._visible = true;
myStyle = new TextFormat();
myStyle.url = &quot;mailto:sandy@nmankatocpa.com&quot;;
sandy_email.setTextFormat(myStyle);
}
loopnum++;
}

acct = setInterval(acctAppear,1000);

The text fields are dynamic of coarse and are set as either multiline with no wrap or single line.

I know that I can do this easily enough with the timeline, but I'm trying to familiarize myself with actionscript and do it without the timeline. The Flash help says that the alpha property of a textfield can be accessed and changed, but I can't get it to work.

Any help would be greatly appreciated!!!! Thanks.
Cole ;)
 
Textfield has to be dynamic, and the font embedded.
Simple as that! Regards,

oldman3.gif
 
Ok, the textfields are dynamic, and I embedded the fonts (acct_txt.embedFonts = true;) but it still isn't working... Any other hints??? I don't understand why the fonts have to be embedded, could you explain this to me???

Thanks again,
Cole ;)
 
For the sake of it, have you tried selecting the textfields themselves, hitting the Character tab in the properies and selecting Embed all?

I've allways had problems when embedding with AS! Regards,

oldman3.gif
 
Thanks Oldnewbie!!!! You rock!!! It now works!! :) My question now is what is with the font embedding??? Why does that need to be true in order for the alpha to work?? Just curious....

Thanks so much,
Cole ;)
 
Honestly? Just don't know!
That's the way it is I guess!

This is all I found here...



Including font outlines.

Editable text fields cannot be alpha tweened unless font outlines are included. The tradeoff of including font outlines for these particular fonts is an increase in file size, and Flash defaults to not include these outlines...

Regards,

oldman3.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top