Code.GeekInterview.com
 
Code Samples Flash
 

Generation of Random Number


Code ResourceAuthor: lavanyarani  

Difficulty Level: Beginner

Published: 10th Nov 2009   Read: 2848 times  

Filed in: Flash
Add Comment


 

 

Sponsored Links


 

 
Generating a random number using flash actionscript
 


Sample Code
  1. Step-1: Create an input box and give the name as “n”.
  2. Step-2: Create a button with the text on it “click”.
  3. Step-3: Select the button and open the action panel and write the
  4.              following code in the script pane.
  5.              on(release)
  6.             {
  7.                      n.text=Math.ceil(Math.random()*100);
  8.            }
  9.  Step-4: press ctrl+enter to test the movie.
  10.  
Copyright GeekInterview.com


Next Article: Creating Loops


 

Latest Code Samples

 

Popular Code Samples

 

Related Code Samples

 

Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    



Popular Coders

# Coder NameHits
1. lavanyarani32145

Active Coders

# Coder NameCodes
1. lavanyarani13

Refined Tags