Saturday, May 27, 2017 07:05 pm EDT

ActionScript 3

Bri's picture

ActionScript 3 Class for creating ToolTip Rollovers

So not long ago I needed to create some simple tooltip style rollovers for a project that I was working on. I did some searching and found that somebody had already written a class that handles them wonderfully. The class allows you to customize the way things look in several ways. Check out the class for yourself by downloading it from the creators page at http://blog.hy-brid.com/flash/25/simple-as3-tooltip/

Bri's picture

Randomly Shuffle an Array Using ActionScript 3

If you have ever wanted to randomly re-arrange the elements of an array after they are already set, try using this function.


function randomizeArray(array:Array):Array
{
var newArray:Array = new Array();
while(array.length > 0){
var randomIndex = Math.floor(Math.random()*array.length);
newArray.push(array[randomIndex]);
array.splice(randomIndex, 1)
}
return newArray;
}

The function takes in the array that you want to be modified and returns a new one.

Syndicate content