ActionScript 3.0 Classes
AnimatedRollOver

This is a Flash specific class for those who don’t really know ActionScript. This class is one that you attach to a MovieClip that you are using as a button. The idea with this class is you rollover a MovieClip object and it plays an animation, and when you roll off of it, it plays the animation in reverse. To attach this class to your MovieClip, open the Library and right-click on the desired MovieClip and choose “Properties…”, then check the “Export for ActionScript” box. Lastly in the “Class” input field, type in AnimatedRollOver and click OK. The one thing you need to make sure you do is have this class file in the same location as your FLA.

TextFieldFormatted

This class is a very basic one. It’s a TextField class that has a TextFormat built into it. The idea is to be able to create TextFields the same way you normally do, but don’t have to create a TextFormat object just to change the size, color, font, etc and be able to do those properties without having to use the htmlText property as well.

TextScrollBar

This class is a replacement for the Flash ScrollBar Component. If you have ever used the ScrollBar component in Flash, you know that its just for TextFields and it sucks. The TextField has to already have content flowing beyond the width/height of the TextField for it to work and if the TextField starts with no text and eventually builds up enough text to go beyond the widht/height of the TextField, the ScrollBar still won’t work. So it’s most likely intended for use of designers, but we developers want some love too. So here is a replacement class for that where you can use your own visual thumb and track to scroll a TextField. Right now its meant just for vertical scrolling text.

ScrollBar

Just like my TextScrollBar, this is a basic scroll bar for content in Flash except this is for any content that needs to be scrolled and not just text. So if you are making something that contains text, images, and video that is all together in the same scrollable container, then this is for you. Currently, I have it set up to only do vertical scrolling because I haven’t made any projects that needed a horizontal scroll bar. But just like the TextScrollBar, if you wanted to modify it to work for or include a horizontal scroll functionality, you can easily do so. This ScrollBar class utilizes: Jack Doyle’s Tweening Platform v11 for the tweening animations(when present), Ali Rantakari’s ExternalMouseWheelSupport for mouse wheel scrolling in the web browser, and Liam O’Donnell’s MouseWheelTrap so that the mouse wheel scrolling functionality can remain even when the browser window has its own active scroll bar.

ContextMenuSetup

The main idea behind the ContextMenuSetup class was to have an easy way of adding in web/email links in the right click menu or just adding a blank entry to the context menu, such as a copyright notice or something like that. I’m sure that if one wanted, it could easily be modified to do so much more like having a play/pause toggle for video playback or something more complex than a web link.

Utils

This is class with static methods used for doing calculations so you don’t have to write all the code out for it just to get a quick value. The methods include: randomByRange(returns a random number between two number values you provide), getDistanceByPoints(takes on two numbers and gets the distance between to the two numbers), getDistanceByObjects(takes two objects that have an assumed X and Y property and returns the distance between the two X’s and two Y’s), calculateVector(takes on two X and two Y values and returns an object with the X Vector, Y Vector, angle, radian, and magnitude), and lastly traceFonts(traces to the Output Window the currently embedded Fonts in the SWF)

A Better Batch Publisher

A Better Batch Publisher is an Adobe extension developed for Flash CS3(also works with CS4/CS5) by Greg Ferrell. This extension allows you to select a folder of FLA’s to publish, lets you pick if you want to publish the SWF only, use the individual FLA’s publish settings, or pick a new directory to publish the SWF to. This is an amazing time saver if you are working in large scale projects that have to have multiple FLA’s. I can no longer find the creators website or original source location, so I am providing it here because I believe it to be an awesome resource to have for Flash.

preload preload preload