LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-29-2006, 06:59 PM
theeggman85 theeggman85 is offline
Registered User
 
Join Date: Apr 2006
Posts: 86
Rep Power: 8
theeggman85 is on a distinguished road
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
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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




All times are GMT. The time now is 02:19 AM.