Visual Harmonics

Game Development in Flash and Java

  • Home
  • About
  • ActionScript Optimisations
  • Development Methodologies

28

Oct

Flash Text Fades: The Alpha Property and Device Fonts

Posted by Nick Wiggill  Published in ActionScipt 2, Flash Authoring Tool

The other day I was working on a quick prelim Flash web layout for one of our clients and was disgusted to note (not for the first time!) that if I wanted the crispness and convenience of using a device font, I would not be able to fade said font using the _alpha property.

In case you don’t know why you’d want to use a device font, see Adobe’s knowledgebase:

“Using device fonts results in a smaller movie size, since font data is not included in the file. Device fonts are often a good choice for displaying text at small point sizes, as anti-aliased text can be blurry at small sizes… Device fonts are a good choice for large blocks of text, such as scrolling text.”

Whatever your reason may be for not wanting to use an embedded font to achieve the fade effect, here is a possible solution…

If you are fortunate enough to have a solid background colour behind the text, why not just make your text change to that color (and back again) using the tint property plus a motion tween? Alternatively, if you want to do it in code… well, don’t forget that there isn’t a _tint property as there is an _alpha one; you’ll need to use something like this little snippet by Senocular to do the trick in code. Either way, the principle’s the same; if the background color is uniform, you can simply fade to that color rather than using the somewhat more finnicky alpha property. It may even be worthwhile to change your design slightly in order to accomodate this effect.

In fact, there is a great article over at connectedpixel.com that will clarify much on the embedding of fonts and problems therewith, such as how the _alpha property works for different types of text, how font embedding is shared between all text fields (static and dynamic), and much more.

This an article off the old Visual Harmonics site which got a few hits on Google, I thought I’d put it up here in case anyone people are still asking this question.

no comment

Search

Recent Posts

  • VCAM for 2D camera views on stage
  • Copying arrays, need speed?
  • Memoisation: Give me space, take your time
  • Managing entities effectively in Flash games
  • Acquisition - an OO principle for the future

Archives

  • December 2008
  • October 2008
  • September 2008
  • August 2008
  • June 2008
  • October 2007

RSS 8bitrocket

  • An error has occurred; the feed is probably down. Try again later.

RSS gotoandplay.it

  • Forums are back online
  • OpenSpace: rapid virtual world development!

RSS gamedev.net

  • Game Developer Magazine 2008 Front Line Award Winners
  • Mobile Games Creation Contest for Independent Developers by Sun & Mo'Minis

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Recent Post

  • VCAM for 2D camera views on stage
  • Copying arrays, need speed?
  • Memoisation: Give me space, take your time
  • Managing entities effectively in Flash games
  • Acquisition - an OO principle for the future
  • Physics: My reflections
  • Bitwise Gems: Fast Integer Math over at Polygonal…
  • Comparing Online Payments Providers
  • New ActionScript Optimisations Page
  • Refactoring the Polygonal Data Structures

Recent Comments

  • Nick Wiggill in New ActionScript Optimisations Page
  • Bachir El Khoury in New ActionScript Optimisations Page
  • Nick Wiggill in New ActionScript Optimisations Page
  • Jeff Fulton in New ActionScript Optimisations Page
© 2007 Visual Harmonics
Theme by Wired Studios, courtesy of Corvette Garage
Valid XHTML | Valid CSS 3.0
Powered by Wordpress