
Welcome Guest
|
#1
|
|||
|
|||
|
rotation with random() problem
I have a script that generates meteors every 1 second on a frame:
Actionscript:
var introMeteor = function() {
_root.attachMovie("meteor", "meteor" + z, z);
_root["meteor" + z]._x = Math.random() * 625 + 32;
_root["meteor" + z]._y = -75;
_root["meteor" + z]._rotation = Math.random() * 40 + 160;
z ++;
if(z > 10){
z -= 10;
}
}
_root.shootin = setInterval(introMeteor, 1000);this should return a value of 160 - 200 for the rotation of the meteors, but I am getting results like -177, and on top of that, none of the meteors ever have a rotation of 180 - 200. Does anybody know what is going on here? Thanks! Last edited by Scottae : 08-30-2006 at 03:58 AM Reason: Format with AS tags |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| random movement problem | kazuma | Newbies |
0 | 10-14-2006 09:16 AM |
| Random Motion clustering problem | imm102 | Flash MX 2004 |
4 | 06-13-2005 12:49 PM |
| Rotation problem | dangermule | Flash MX 2004 |
0 | 02-15-2005 11:13 PM |
| random Rotation + random rotation | napunx | Flash MX ActionScript |
4 | 05-06-2004 04:59 AM |
| Problem with Random | chup | Flash 5 Actionscript |
7 | 08-19-2001 06:15 AM |

Programming Languages



