How do you generate random numbers within a given limit with actionscript? : adobe flex action script



How do you generate random numbers within a given limit with actionscript? : adobe flex action scrip..

Answer / Prakhar Bajpai

To generate a random number within a specific range in ActionScript, you can use the Math.random() function and specify your limits. Here's an example:

var min:Number = 1;
var max:Number = 100;
var randomNum:Number = Math.floor(Math.random() * (max - min + 1)) + min;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Adobe Flex Interview Questions

What is the difference between httpService & Data Service?

1 Answers  


I need to load an image from flickr into my application. Do I need a crossdomain.xml file on flickr? : adobe flex action script

1 Answers  


Explain which of the recommended character to use to separate target level paths levels? : adobe flex action script

1 Answers  


Explain the difference between creating an effect and setting the target as opposed to adding an effectlistener? : adobe flex action script

1 Answers  


How do we overload functions in actionscript? : adobe flex action script

1 Answers  


What keyword allows you to refer to private variables of a class in flex?

1 Answers  


How does item renderer work? : adobe flex action script

1 Answers  


What is default frame rate of the timeline in frame per second?

1 Answers  


How binding works in mxml components in flex?

1 Answers  


What are the 2 ways to compile flex source file?

1 Answers  


Differentiate between flex 3 and flex 4?

1 Answers  


What is an event class in Flex?

1 Answers  


Categories