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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash 5 action script for text formating

Status
Not open for further replies.

tomothy

Technical User
Oct 30, 2001
40
GB
Hello,

Can Flash 5 action script be used to format text dynamicly. i.e can I have a button that when clicked will change a block of text from normal to bold? If this is possable do you know of a detailed tutorial that can help me? Any advice, code or links would be a big help

Thank you for your time
Andrew
 
Yes, this CAN be done, but I don't know exactly where there is a tutorial on it. There are some issues, though (aren't there always?!) - if you have font outlines enabled in a dynamic textfield, you will have to embed the BOLD verion of the font as well as the regular version, otherwise when you enable the "bold" text nothing will appear (I think it's safer just to ignore font outlines).

I can make a tutorial for you if you want ... or you can mail me and I'll send you some stuff (rgstewart@hotmail.com). Up to you ...
 
You could do this in a roundabout way...

If your dynamic textbox is set to display HTML formatted text then you could get this effect by concatenating the HTML tags to your variable. If your variable is called "myText" then your actionScript would be:

on(release){
myText=&quot;<B>&quot;+myText+&quot;<B>&quot;;
} Slainte

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top