Tagged with 'AS3'
Snippets
-
Email validation with Flash by actionsnip
Save as Favorite | Tags: AS3, email, validation, flash
-
MathUtils - Radians by jspooner
Quick class to convert Radians to Degrees and back.
Save as Favorite | Tags: AS3, Math, utils, radians
-
ActionScript Singleton by vixiom
The singleton pattern is a design pattern that is used to restrict instantiation of a class to one object. Often a singleton is used as the Model in a Model View Controller (MVC) structure. Useful if you're looking for a quick (and better) way to store global variables and data than dumping them in a global or root holder.
-
URL Encode a string in ActionScript by vixiom
Here are a couple of methods that are similar to PHP's urlencode.
Save as Favorite | Tags: AS3, urlencode, encode, string, encodeURI, escape, UTF-8, URI, URL
-
Remove extra returns from dynamic text by vixiom
Flash and Flex text boxes sometimes like to add bonus returns/line breaks to text coming from a database and displayed in text box. Here's a one liner to remove them.
Save as Favorite | Tags: AS3, replace, string, return, line break, remove
-
Simple Mute and Unmute SWF with External FLV using Actionscript 3.0 AS3 by k00k
I had such a hard time finding out how to do this simple task that I figured others have had the same difficulty. Here's some simple AS3 code that performs a mute and unmute of an external FLV.
Save as Favorite | Tags: AS3, Mute, Unmute, Toggle, FLV, external, embedded, Volume, soundmixer, channel, as3.0
-
Simple FPS Counter by Haxd
Simple FPS Counter in AS3
Save as Favorite | Tags: AS3, FPS, Counter
-
Get a display object's rectangle in another object's coordinate space by vixiom
An alternative to jumping around with globalToLocal and localToGlobal if you need to get one object's location in another's coordinate space. getRect excludes any strokes, if you want the size plus position with strokes use getBounds.
Save as Favorite | Tags: getRect, getBounds, AS3, MovieClip, Rectangle
-
Randomize an Array by vixiom
This function takes an array shuffles its items and returns the random array.
Save as Favorite | Tags: random, randomized, AS3, array
-
Find closest number to X by jspooner
You have X and need to find what number is closest to it in an array.
Save as Favorite | Tags: AS3, array, find, search
-
Convert a CMYK color to RGB by vixiom
This method takes a CMYK color and converts it to RBG. Unfortunately it can't mimic Photoshop or ImageMagick's conversion exactly as you need a color profile for that but it's still pretty close.
-
Drag and drop in AIR by ankurpatel18
This is used to drag and drop the image only jpg for this example.
Save as Favorite | Tags: AS3, drag n drop, drag and drop, actionscript3, air
-
Convert degrees to radians by vixiom
This ActionScript method converts degrees to radians. One radian is equal to 180/π degrees.
Save as Favorite | Tags: degree, radian, AS3, convert
Scraps
-
AS3 Facebook Library by vixiom
Save as Favorite | Tags: AS3, Facebook, library
-
ActionScript Animation Library Tweener by vixiom
In layman's terms, Tweener helps you move things around on the screen using only code, instead of the timeline. The general idea of a tweening Class is that dynamic animation and transitions (created by code) are easier to maintain and control, and more stable than animation based on the regular Flash timeline, since you can control it by time rather than by frames.
Save as Favorite | Tags: animation, AS3, AS2, tweener, transitions, library
-
ActionScript 3.0 library for handling syndication feeds by vixiom
Use the syndication library to parse Atom and all versions of RSS easily. This library hides the differences between the formats so you can parse any type of feed without having to know what kind of feed it is.
Save as Favorite | Tags: rss, feed, AS3, syndication, library
-
Alternative DateChooser that fills out an input box by vixiom
The Flex framework is amazingly capable. Between renderers, editors, skins, styles and containers, you can produce amazing applications. Sometimes however developers get stuck in the framework; they think they need to use the framework for everything. I used to see this a lot with list-based controls, but of late the target for getting stuck seems to be the DateChooser. Guess what though, the results are in, and you don’t have to use the DateChooser to produce a calendar.
Save as Favorite | Tags: datechooser, input, AS3, Flex
-
Layout organizers by vixiom
Pure AS3 alternative to using MXML for laying things out.
Save as Favorite | Tags: layout, AS3, grid
-
Flex style HBox and VBox components for Flash by vixiom
Save as Favorite | Tags: AS3, HBox, VBox, layout
-
Drag and Drop TileList for v3 Components by jrodgers
The dd_tile_list class extends the v3 TileList component to add drag and drop functionality. Dropping between components is supported. This class aims to be CellRenderer and Style agnostic.
Save as Favorite | Tags: AS3, CS3, V3_Components, drag and drop


