Visual Harmonics

Game Development in Flash and Java

  • Home
  • About
  • ActionScript Optimisations
  • Development Methodologies

22

Jun

New ActionScript Optimisations Page

Posted by Nick Wiggill  Published in ActionScipt 2, ActionScript 3

I’ve just put up a page (see bright orange bar along the top, you can’t miss it) containing an amalgamation of all the AS optimisations I’ve come across recently while hunting around for ways to speed up code. I’ll be updating it as time goes on with any extras that don’t fall under the current listings.

You’ll notice I’ve specified (to the best of my knowledge) whether the optimisations are suitable for use in AS2, AS3, or both — or with a question mark if I’m unsure. You’re most welcome to note any of the slew of mistakes I’ve surely made so that I may amend them.

I already show full preference for AS3 so I’ll probably cease to note whether newly found optimisations are usable under AS2… Get with the program, using AS3 does not need to cost you an arm and a leg.

Anyway, I hope you enjoy it!

2 comments

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

  • 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

Archives

  • 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

  • Atari's free game development system
  • Carolina Games Summit Keynote Speakers Announced

Meta

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

Recent Post

  • 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
  • VH moved from Joomla! to Wordpress

Recent Comments

  • 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