How do you generate random numbers within a given limit with actionscript?



How do you generate random numbers within a given limit with actionscript?..

Answer / Uday Veer

In ActionScript, you can use the Math.random() function to generate a random number between 0 and 1. To generate a random number within a given limit (let's say min and max), you can do: var randNum = Math.floor(Math.random() * (max - min + 1)) + min

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Multimedia General Interview Questions

What is responsive design, and why is it important for multimedia websites?

1 Answers  


Sometimes, if I do not move the mouse, “click” and “mouse down” do not work. Why is that?

1 Answers  


How do your decisions affect the design? Would different decisions on network technologies and object server technologies result in a different solution?

1 Answers  


What does calling preventdefault() on an event do? How is this en forced?

1 Answers  


How can you show a jpg image in dynamic text field?

1 Answers  


What is interface in term of oop (flash actionscript)?

1 Answers  


What is the base for DLNA?

1 Answers   Sony,


How do we overload functions in actionscript?

1 Answers  


How can I view video files on the web site?

1 Answers  


What are the principles of good multimedia design?

1 Answers  


Define midi?

1 Answers  


What are the different types of multimedia?

1 Answers  


Categories