Archive for the 'ActionScript 3' Category

Free AS3 Scrollbar: Fullscreen and Resizable

In coincidence with the launch of my new Aspen template, I’ve decided to release for free the source code for the scrollbar I’ve been using in my other Flash templates. The scrollbar is coded in AS3 and will automatically resize according to the amount of content, unlike a lot of other Flash scrollbars. You can set the track color, grabber color, grabber press color, grip color, track thickness, grabber thickness, ease amount and whether or not the grabber is “shiny”.

Update [6-21-2009]: Now supports mouse wheel scrolling on the Mac using SWFWheel.

Here is a demo of the scrollbar in use. You can click “Add Copy” to see how it resizes:

Get Adobe Flash player

You can also view a demo of it being used fullscreen in my Sycamore template.

Here is the usage for the scrollbar class:

// Arguments: Content to scroll, track color, grabber color, grabber press color, grip color, track thickness, grabber thickness, ease amount, whether grabber is “shiny”
  1. _scrollBar = new FullScreenScrollBar(_content, 0×222222, 0xff4400, 0x05b59a, 0xffffff, 15, 15, 4, true);
  2. addChild(_scrollBar);

» Download the demo and source code

Feel free to use this code in any way you want other than selling it.


Simple Sanity-Saving Tip for All Timeline-Based Flash Projects

Here is a simple code snippet to use with any timeline-based Flash project that will save you from pulling your hair out. If you are like me you still occasionally find yourself doing Flash projects that are strictly timeline-based. No matter how much you love doing class-based AS projects, there are certain projects that just make sense to do with the timeline. Think banner ad animations and linear “Flash commercial” type projects, where it’s just two minutes straight of animation.

Continue reading ‘Simple Sanity-Saving Tip for All Timeline-Based Flash Projects’

AS3 Dotted Line Class

Here is an ActionScript 3 class I use all the time to draw pixel perfect dotted lines in Flash. You can set the line width, line height, color, alpha, dot width, and dot spacing. Simple but useful!

Continue reading ‘AS3 Dotted Line Class’

Top 8 Resources for Learning ActionScript 3

After having made the switch to AS3 about a year ago I have to admit it was a huge pain for me to upgrade from AS2. A lot of that was due to the wrong approaches I took (reading a 900 page book straight through is not recommended, for one). So keep reading and learn from someone who has made the switch. And in the end learning AS3 really will make your life easier. And note this is coming from someone with a design background so I’m not some super-genius computer nerd who has been programming in BASIC since he was three. It is possible for non-coders to learn AS3.

Continue reading ‘Top 8 Resources for Learning ActionScript 3′