Snippets
-
Flex Alert box by pmolaro
Cheat sheet of settings you can use to customize your Alert boxes in Flex 3.
Save as Favorite | Tags: Alert, Flex, Alert.show, actionscript
-
MultiCore Proxy Unit Test by jspooner
How to use the test a proxy in multicore puremvc
Save as Favorite | Tags: asunit
-
Create addFlashEventListener method for javaScript by jspooner
Allow javaScript to register event listeners to flash.
-
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
-
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 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.
-
N-Body Gravitation by lolablissie
Here is a function for animating the n-body gravitational force between bodies:
Save as Favorite | Tags: gravitation physics
-
Zoom To A Point by lolablissie
A function to zoom to a certain point at a certain scale.
Save as Favorite | Tags: zoom, scale, animation
-
Responsible Animation Class by lolablissie
This is a general pattern I use for a class that performs and animates responsibly. The trick it to use this pattern for an object and all of its children; the general pattern is 1)Instantiate 2)Call loadAndStart() and when done with the object 3)stopAndUnload()
-
Shortest Rotational or Angular Distance by lolablissie
This function gives you the shortest distance between to angles.
Save as Favorite | Tags: trigonometry, Math, rotation
-
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
-
random Array generator class by interactiveSection
in Actionscript 3.0 syntax. from http://interactivesection.wordpress.com/. Use this class to generate and return a new array with x number of elements in a random order, or return a new array which has the same set of elements as an existing array at a randomized order.
Save as Favorite | Tags: random array
-
get number of days in a month by interactiveSection
Actionscript 2.0 syntax. from http://interactivesection.wordpress.com/
Save as Favorite | Tags: Date month days
-
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
-
컨텐츠의 동적 로드 by borninfree
-
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
-
Random Range by d_wright66
The randRange function returns a random number between the two numbers passed to it.
-
Local to global by d_wright66
Local to global is very useful when trying to position a movieclip that is on the stage (_root) to a movieclip which is inside another movieclip.
-
Set by arul.apj
-
Merge PDFs in Ubuntu by FOBioPatel
using GS (ghostscript)
-
Round to a decimal place by coreyloose
Save as Favorite | Tags: math round decimal
-
Simple FPS Counter by Haxd
Simple FPS Counter in AS3
Save as Favorite | Tags: AS3, FPS, Counter
-
Simplest way to drop the last element from an array by Haxd
Working with Arrays 101
Save as Favorite | Tags: arrays, pop
-
What's the simplest way to drop the last result from an array? by meridian
Save as Favorite | Tags: ruby, array
-
Scale to width or height by jspooner
Scales a display object.


