Quantunet.com

My Account

Joins Us
Flash 8 Actionscript 2.0 Knowledgebase
Random Positioning II  

Download

Actionscript

onEnterFrame = function() {
star_mc._x = Math.round(Math.random()*300);
star_mc._y = Math.round(Math.random()*250);
}


The "onEnterFrame" event handeler is used here to call the positioning function each time the movie enters a frame on ther main timeline. With a frame frate of 12fps this means the funvtion is called 12 times a second.


onEnterFrame = function() {


star_mc._x = Math.round(Math.random()*300);
star_mc._y = Math.round(Math.random()*250);
}




© 2008 Quantunet LLC All Rights Reserved | Intellectual Property | Terms of Use | Privacy
Home | About Quantunet | FAQ's | Contact Us