Snippets
-
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.
-
clear unwanted values in array by karixma_ext
temp=[undefined,1,"a",undefined,"x",0] temp = clearArray(temp, [undefined,0]);
Save as Favorite | Tags: array clear 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
-
for loop that creates methods for buttons by JakeFallon
CREATE 'onRollOver', 'onRollOut', and 'onRelease' methods for menu items with the instance name of 'menu0', 'menu1', 'menu2', etc
-
play a new randum video at the end of current video by JakeFallon
on media complete randomly play new video and populate combo box
Save as Favorite | Tags: on media complete
-
Get File Name by yuan
Save as Favorite | Tags: AS2 string


