Download presentation

Presentation is loading. Please wait.

Published byMackenzie Ross Modified over 2 years ago

1
Random Dr.Al-Mothana Gasaymeh

2
الرقم العشوائي بين 0 و 1 stop(); myButton2.addEventListener(MouseEvent.CLICK, myButtonClick2); function myButtonClick2(event:MouseEvent):void { var someNumber:Number = Math.random(); q.text =String(someNumber); }

3
الرقم العشوائي بين 0 و 0 1 stop(); myButton2.addEventListener(MouseEvent.CLICK, myButtonClick2); function myButtonClick2(event:MouseEvent):void { var someNumber:Number = Math.random*10(); q.text =String(someNumber); }

4
للتخلص من الكسور var someNum:Number = Math.floor(Math.random()*5); // gives you 0, 1, 2, 3, or 4 by "flattening" the decimal number var someNum:Number = Math.ceil(Math.random()*5); // gives you 1, 2, 3, 4, or 5 by raising the decimal number var someNum:Number = Math.round(Math.random()*5); // gives you 0, 1, 2, 3, 4, or 5 by rounding the decimal number up or down

5
صمم لعبة الأرقام العشوائية

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google