Home
|
Ask Question
|
Interview Questions
|
Tech FAQ
s
|
Engineering
|
Company
|
Geek Forums
|
Interview Coaching
|
Online Quiz
|
Interview eBook
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:
2848 times
Filed in:
Flash
Add Comment
Sponsored Links
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
♦
Simple Mathematic Operations (Add, Sub, Mul, Div, Mod)
♦
Addition of Two Numbers Using User Defined Class
♦
Simple Mathematic Operations (Round, Ceil, Floor, Square Root)
♦
Generation of Random Number
♦
Detect Operating System
♦
Creating Loops
♦
Alphabet Conversion
♦
Import Audio File
♦
Generation of Duplicate Image
♦
Sorting and Reversing an Array
Related Code Samples
»
Finding a number is even or odd without using arithmatic operators
»
Brute force solver for Challenger number puzzle.
»
Find Number of Files and Sub Directories
»
Program to find out an adam number using arrays
»
Generation of Duplicate Image
»
Credit Card Number Verification
»
Count Numbers in Binary Number
»
Random Number Game
»
Armstrong Number
»
Adam Number
Post Your Comment:
Members Please Login
Your Name:
*
e-mail ID:
(required for notification)
*
Image Verification:
Subscribe
Popular Coders
#
Coder Name
Hits
1.
lavanyarani
32145
Active Coders
#
Coder Name
Codes
1.
lavanyarani
13
Refined Tags
Copyright © 2012 GeekInterview.com | All Rights Reserved