Controlling execution of function

  • makhan
  • Novice
  • Novice
  • No Avatar
  • Joined: Jun 02, 2007
  • Posts: 31
  • Status: Offline

Post June 15th, 2007, 7:46 pm

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(){
.....................

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

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

}
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 15th, 2007, 7:46 pm

  • krismeister
  • Graduate
  • Graduate
  • No Avatar
  • Joined: Oct 21, 2006
  • Posts: 202
  • Status: Offline

Post June 16th, 2007, 11:53 am

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 46 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
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.