Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

Random Number Generator Code

Learn how create a one line code snippet that will create a random number for our script programming needs. Using a random number is handy for many things, especially rndomizing the display of movieclips so your pages always look fresh, new, and exciting. We use the Math.random function wrapped in the Math.floor function to get a rounded number. Then we multiply that number by the number we would like to be our random number maximum value. The instructional video gives great code insight and a little looping trick. The source package has a button operated feature to create the number that way to see it randomize.
thumb

Flash Videos

General Programming

Code for Parent and Child MovieclipsCustom Mouse Cursor TutorialRandom Content Display ScriptFull Flash AS3 CSS Website Template EditableMultilayer Parallax Backgrounds TutorialMouse Wheel Zooming InteractivityPlaying Card Deck for GamesSimulated Dice Throw TutorialDress Up Game Tutorial Part 1Random Number Generator CodeDraggable OS Style WindowsCreating Desktop Applications Using Adobe AIRFull Screen Application Toggle Up and DownDrag Within Bounded SpaceSystem Capabilities Class TutorialMovieclip Reflection EffectDetecting User Mouse CoordinatesCentering Dynamic Stage ElementsTrue Fit Elements WebsiteReusable Dynamic Class Code CreationDress Up Game Tutorial Part 2