Flash ActionScript - Randomize an array in 1 easy line of code!

An easy "shuffle" or "randomizer" for a Flash array. Only 1 line of code.
yourArrayName.sort(function(a,b){return random(3)-1;});
Tatum

About the author | Tatum Hindman

Tatum is the president of TBH Creative and is responsible for building long-term client relationships. She enjoys the strategy behind web design and collaborating with clients to define and execute online marketing goals. She likes to blog about hot topics in web design and digital marketing, as well as share tips for strengthening your online presence.

View more posts by Tatum

Receive articles in your inbox