Home
Tech Articles
Code Samples
Learn
Freelance Projects
Online Testing
Geek Talk
Job Postings
Knowledge Base
Geek Blogs
Question Bank
Interview Questions
Certification
Placement Papers
Tech FAQ
Career Advice
Engineering
Ask Question
I am new,
Sign me up!
User Name
Remember Me?
Password
Code Base
Submit Code
Back
Oracle
PHP
Java
ASP.NET
C#
Delphi
VB.NET
Perl
ColdFusion
SQL Server
MySQL
C
C++
UNIX
AJAX
Flash
HTML
CSS
Java Script
VB Script
XML
Python
MS Access
MainFrame
Flash Code Base
•
Addition of Two Numbers Using User Defined Class
•
Alphabet Conversion
•
Assigning actions to an object and button
•
Creating Loops
•
Detect Flash Player Version
•
Detect Operating System
•
Generation of Duplicate Image
•
Generation of Random Number
•
Implement Custom Sort
•
Import Audio File
•
Simple Mathematic Operations (Round, Ceil, Floor, Square Root)
•
Simple Mathematic Operations (Add, Sub, Mul, Div, Mod)
•
Sorting and Reversing an Array
Code Samples
Flash
Generation of Random Number
Code Resource
Author:
lavanyarani
Difficulty Level
: Beginner
Published:
10th Nov 2009
Read:
627 times
Filed in:
Flash
Add Comment
Generating a random number using flash actionscript
Sample Code
Step
-1
: Create an input box
and
give the
name
as “n”.
Step
-2
: Create a
button
with
the
text
on
it “click”.
Step
-3
: Select the
button
and
open the action panel
and
write the
following code
in
the script pane.
on
(
release
)
{
n.
text
=
Math
.
ceil
(
Math
.
random
(
)
*
100
)
;
}
Step
-4
: press ctrl+
enter
to test the movie.
Copyright GeekInterview.com
Next Article:
Creating Loops
Latest Code Samples
♦
Simple Mathematic Operations (Round, Ceil, Floor, Square Root)
♦
Simple Mathematic Operations (Add, Sub, Mul, Div, Mod)
♦
Addition of Two Numbers Using User Defined Class
♦
Import Audio File
♦
Alphabet Conversion
♦
Generation of Duplicate Image
♦
Implement Custom Sort
♦
Sorting and Reversing an Array
♦
Detect Operating System
♦
Detect Flash Player Version
Popular Code Samples
♦
Import Audio File
♦
Simple Mathematic Operations (Add, Sub, Mul, Div, Mod)
♦
Alphabet Conversion
♦
Simple Mathematic Operations (Round, Ceil, Floor, Square Root)
♦
Detect Operating System
♦
Addition of Two Numbers Using User Defined Class
♦
Generation of Random Number
♦
Sorting and Reversing an Array
♦
Generation of Duplicate Image
♦
Detect Flash Player Version
Related Code Samples
»
Generation of Duplicate Image
»
Credit Card Number Verification
»
Count Numbers in Binary Number
»
Random Number Game
»
Armstrong Number
»
Adam Number
»
Generate Invoice Number Series
»
Check if the input number is a Amstrong number or not
»
Number Puzzle
»
Random Password Generation function
Post Comment
Members Please Login
Name:
Email:
(Optional. Used for Notification)
Title:
Comment:
Validation Code:
<=>
(Enter this code in text box)
Popular Coders
#
Coder Name
Hits
1.
lavanyarani
8210
Active Coders
#
Coder Name
Codes
1.
lavanyarani
13
Refined Tags
Sponsored Links
About Us
-
Privacy Policy
-
Terms and Conditions
-
Contact
Copyright © 2005 - 2010 GeekInterview.com. All Rights Reserved