Controlling execution of function

  • makhan
  • Novice
  • Novice
  • makhan
  • Posts: 31

Post 3+ Months Ago

I have this funtion which I want to have some control over depending on input.

Like if input is 2 it should execute two time and if input is 3 than three times.

Can someone please guide me how I can do that.

Thanks




this.onMouseDown=function(){
.....................

....................

...................

}
  • krismeister
  • Graduate
  • Graduate
  • krismeister
  • Posts: 202

Post 3+ Months Ago

this.onMouseDown=function(){

// grab the input:
var times:Number = textarea.text;

for (i=1; i<times; i++){
trace('called me ' + String(i) + ' times');
}

}

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 7 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.