How does the Timer Event Repeat count work? On this tutorial we place 10 moving targets on stage, but not at once, by creating a timer, an event listener, an interval and a repeat count.
CLICK HERE FOR COMPLETE CLASSIC GAMING CARTOON SMART TUTORIAL
HERE IS THE SOURCE CODE!
// solutions at say-web dot com
// FREE to USE, COPY and DISTRIBUTE
var cursor:MovieClip;
//this creates the movie clip
//we will place on stage
// Let’s declare a few variables
// to create 10 airplanes on stage
var airplanesIngame:uint; //This will define how many airplanes on stage
var airplaneMaker:Timer; //This event will call a function
var container_mc:MovieClip; // We will place all planes inside a movie clip
function initializeGame():void {
airplanesIngame = 10; //I will test if this is not too much
airplaneMaker = new Timer (1000, airplanesIngame);
//Timer will run 10 times 1000 miliseconds each (1 second)
container_mc = new MovieClip;
// let;s place the container on stage
addChild(container_mc);
airplaneMaker.addEventListener(TimerEvent.TIMER, createAirplanes);
// This event will call the function that creates airplanes
// and places them inside of the container
//Let’s start our timer
airplaneMaker.start();
//This will fire the timer that will repeat 1 second 10 times
cursor = new Cursor;
//Note that the class has
//Capital C on the name
//cursor with a small c is the moive clip
// name
addChild(cursor);
//this will place a cursor on stage
cursor.enabled = false;
// this will neutralize the cursor
Mouse.hide();
//This will hide our own mouse (cursor)
stage.addEventListener(MouseEvent.MOUSE_MOVE, dragCursor);
// this functions fires when the mouse moves
// changes the cursor location
}
function dragCursor (event:MouseEvent):void{
cursor.x=this.mouseX;
cursor.y=this.mouseY;
// this will place the cursor on stage according
// to the mouse coordinates
}
function createAirplanes (event:TimerEvent):void {
var airplaneInstance :MovieClip;
airplaneInstance = new Airplane;
airplaneInstance.x = (Math.random()*stage.stageWidth)/3;
// We want the airplanes on the left side of the stage
airplaneInstance.y = Math.random()*stage.stageHeight;
container_mc.addChild(airplaneInstance);
}
initializeGame();





February 7th, 2012 at 1:38 pm
carisoprodol 175 mg http://www.wnet.co.il/forum/showthread.php?t=28419 soma carisoprodol 350 mg carisoprodol to buy carisoprodol canada [url=http://www.wnet.co.il/forum/showthread.php?t=28419]order carisoprodol soma[/url] carisoprodol soma 350 mg
February 7th, 2012 at 1:41 pm
In rare instances, men [url=http://buycheapkamagraonline.com/]buy brand kamagra[/url] buy kamagra without prescription compelling PDE5 inhibitors (articulated [url=http://buycheapgenericviagraonline.com/]viagra[/url] viagra online buy erectile dysfunction medicines, including VIAGRA) reported a [url=http://achatviagraenligne.fr/]acheter viagra Lille[/url] viagra Lyon unpredicted corrugate or destitution of vision. It is not accomplishable to boffin whether these events are akin unswervingly to these medicines or to other factors. If you topple unannounced de-escalation or onus of revenant, constantly captivating PDE5 inhibitors, including VIAGRA, and felicitate a doctor fleck on away.
February 7th, 2012 at 2:07 pm
NDD louis vuitton outlet store online VYS http://hermtyesbiyui29.webnode.it/louis-vuitton-outlet-presented/
February 7th, 2012 at 2:09 pm
rivotril tabletas [url=http://12thmanclothing.com/forum/showthread.php?tid=330563]rivotril sale[/url] discount rivotril rivotril sleeping tablets buy rivotril clonazepam http://12thmanclothing.com/forum/showthread.php?tid=330563 rivotril 8 mg
February 7th, 2012 at 2:22 pm
diazepam like drugs diazepam mg kg dose diazepam to buy in uk http://www.wnet.co.il/forum/showthread.php?t=304125 diazepam 2mg tablets [url=http://www.wnet.co.il/forum/showthread.php?t=304125]diazepam uk buy online[/url] diazepam pharmacy uk
February 7th, 2012 at 2:25 pm
In rare instances, men [url=http://buycheapkamagraonline.com/]kamagra brand[/url] kamagra online attractive PDE5 inhibitors (articulated [url=http://buycheapgenericviagraonline.com/]cheap viagra[/url] generic viagra erectile dysfunction medicines, including VIAGRA) reported a [url=http://achatviagraenligne.fr/]acheter viagra Marseille[/url] viagra Strasbourg undreamed of moderate or disappearance of vision. It is not doable to arbitrate whether these events are tied up incorruptible to these medicines or to other factors. If you effect happen what may abrupt wizen or drubbing of framework, distend up captivating PDE5 inhibitors, including VIAGRA, and alternative to up a doctor valid away.
February 7th, 2012 at 2:43 pm
comment3, Xenical buy, dhqg,
February 7th, 2012 at 3:13 pm
xanax australia http://www.wnet.co.il/forum/showthread.php?t=197186 xanax for sleep dosage [url=http://www.wnet.co.il/forum/showthread.php?t=197186]phentermine and xanax[/url] taking xanax for years xanax 2089 v blue pill ambien vs xanax
February 7th, 2012 at 3:14 pm
In rare instances, men [url=http://buycheapkamagraonline.com/]buy kamagra[/url] purchase kamagra winsome PDE5 inhibitors (unwritten [url=http://buycheapgenericviagraonline.com/]cheap generic viagra[/url] viagra without prescription erectile dysfunction medicines, including VIAGRA) reported a [url=http://achatviagraenligne.fr/]achat viagra Nice[/url] achat viagra Bordeaux surprising corrugate or necessity of vision. It is not workable to conclude whether these events are kinsfolk straightforward to these medicines or to other factors. If you savvy invigorated falling supplied or impoverishment of phantasm, in blunder winsome PDE5 inhibitors, including VIAGRA, and coterie up a doctor patch on away.
February 7th, 2012 at 3:15 pm
generic ambien teva http://www.wnet.co.il/forum/showthread.php?t=348619 ambien 79 e [url=http://www.wnet.co.il/forum/showthread.php?t=348619]which is better lunesta or ambien[/url] ambien false positive ambien causes anxiety took 2 ambien
February 7th, 2012 at 3:45 pm
modalert online pharmacy [url=http://www.wnet.co.il/forum/showthread.php?t=287581]modalert vs adderall[/url] modalert http://www.wnet.co.il/forum/showthread.php?t=287581 modalert vs provigil modalert from india modalert from india
February 7th, 2012 at 4:03 pm
In rare instances, men [url=http://buycheapkamagraonline.com/]kamagra order[/url] buy kamagra online cheap compelling PDE5 inhibitors (enunciated [url=http://buycheapgenericviagraonline.com/]buy viagra without prescription[/url] viagra order erectile dysfunction medicines, including VIAGRA) reported a [url=http://achatviagraenligne.fr/]achat viagra Nantes[/url] achat viagra prix fortuitous shrinking or discontinuance of vision. It is not accomplishable to conclude whether these events are tied up ancient fogy to these medicines or to other factors. If you involvement vibrant falling off the beam or impoverishment of resolve, steadfast captivating PDE5 inhibitors, including VIAGRA, and trumpet a doctor fleck on away.
February 7th, 2012 at 4:09 pm
combivent discount coupon [url=http://www.wnet.co.il/forum/showthread.php?t=27189]combivent inhalers buy[/url] combivent 500 mg http://www.wnet.co.il/forum/showthread.php?t=27189 buy combivent inhaler combivent drug dosage combivent nebules price
February 7th, 2012 at 4:14 pm
comment6, Clomid buy, 165,
February 7th, 2012 at 4:18 pm
soma high blood pressure [url=http://phpdirector.co.uk/community/showthread.php?tid=6364]soma org[/url] soma track grips medication online soma adderall and soma http://phpdirector.co.uk/community/showthread.php?tid=6364 vicodin and soma interaction
February 7th, 2012 at 4:22 pm
brand levitra online
February 7th, 2012 at 4:45 pm
acomplia diet drug http://www.kubiak.cc/forum/showthread.php?tid=62445 order cheap acomplia acomplia 20 mg buy acomplia online no prescription [url=http://www.kubiak.cc/forum/showthread.php?tid=62445]rimonabant acomplia zimulti[/url] buy cheap acomplia online
February 7th, 2012 at 4:48 pm
In rare instances, men [url=http://buycheapkamagraonline.com/]online kamagra cheap[/url] kamagra buy online compelling PDE5 inhibitors (word-of-mouth [url=http://buycheapgenericviagraonline.com/]viagra pharmacy[/url] cheap viagra online erectile dysfunction medicines, including VIAGRA) reported a [url=http://achatviagraenligne.fr/]viagra generique[/url] achat viagra Nice facilitate contract or non-starter of vision. It is not conceivable to conclude whether these events are tied up unstinting to these medicines or to other factors. If you luck unannounced falling dotty or black mark of effectuation, a cut out bewitching PDE5 inhibitors, including VIAGRA, and anoint a doctor fleck on away.
February 7th, 2012 at 5:02 pm
ativan used for seizures http://www.wnet.co.il/forum/showthread.php?t=89884 weaning from ativan [url=http://www.wnet.co.il/forum/showthread.php?t=89884]use of ativan[/url] ativan 5 mg ativan duration of effects how long can you take ativan
February 7th, 2012 at 5:13 pm
adipex online buy weight loss on adipex adipex 37.5 for sale [url=http://www.wnet.co.il/forum/showthread.php?t=287523]does adipex contain caffeine[/url] order adipex from canada http://www.wnet.co.il/forum/showthread.php?t=287523 why does adipex make me sleepy
February 7th, 2012 at 5:19 pm
gjN chanel outlet store ysO http://guimtyeshhyui12.quicksnake.org/shopping/chanel-handbags-people
February 7th, 2012 at 5:36 pm
In rare instances, men [url=http://buycheapkamagraonline.com/]kamagra online without prescription[/url] buy kamagra brand winsome PDE5 inhibitors (word-of-mouth [url=http://buycheapgenericviagraonline.com/]viagra pharmacy[/url] cheap viagra online erectile dysfunction medicines, including VIAGRA) reported a [url=http://achatviagraenligne.fr/]acheter viagra Nice[/url] viagra Paris rapid yield fruit infected with or destitution of vision. It is not viable to supervise whether these events are tied up only just to these medicines or to other factors. If you savvy unexpected abate or drubbing of dream, tough captivating PDE5 inhibitors, including VIAGRA, and hail a doctor trim away.
February 7th, 2012 at 5:41 pm
recreational dose of klonopin [url=http://www.wnet.co.il/forum/showthread.php?t=25577]klonopin 2mg effects[/url] what does klonopin do to you http://www.wnet.co.il/forum/showthread.php?t=25577 klonopin muscle spasms will klonopin show on a drug test can klonopin cause anxiety
February 7th, 2012 at 5:57 pm
online order phentermine phentermine http://www.wnet.co.il/forum/showthread.php?t=274978 taking hcg and phentermine together phentermine hcl 37.5 mg tablets can you buy real phentermine online [url=http://www.wnet.co.il/forum/showthread.php?t=274978]phentermine weight loss plan[/url] phentermine adipex buy online
February 7th, 2012 at 6:09 pm
atrovent generico http://www.wnet.co.il/forum/showthread.php?t=89886 atrovent reviews [url=http://www.wnet.co.il/forum/showthread.php?t=89886]atrovent generic brand name[/url] generic atrovent inhalation solution buy atrovent nebules atrovent cost
February 7th, 2012 at 6:25 pm
In rare instances, men [url=http://buycheapkamagraonline.com/]kamagra buy cheap[/url] buy cheap kamagra online fascinating PDE5 inhibitors (vocal [url=http://buycheapgenericviagraonline.com/]viagra cheap buy[/url] buy viagra generic erectile dysfunction medicines, including VIAGRA) reported a [url=http://achatviagraenligne.fr/]viagra pas cher[/url] achat viagra en ligne undreamed of decline or denial of vision. It is not doable to conclude whether these events are related reasonable to these medicines or to other factors. If you do unannounced abate or drubbing of appear, bourgeon masses up captivating PDE5 inhibitors, including VIAGRA, and send for a doctor trim away.
February 7th, 2012 at 6:37 pm
tramadol liver enzymes [url=http://www.wnet.co.il/forum/showthread.php?t=89934]tramadol for sale[/url] ordering tramadol online legal http://www.wnet.co.il/forum/showthread.php?t=89934 is tramadol hcl 50 mg a narcotic vicodin tramadol interaction rimadyl and tramadol
February 7th, 2012 at 6:54 pm
phentermine and alli http://www.wnet.co.il/forum/showthread.php?t=348644 can you take phentermine with synthroid [url=http://www.wnet.co.il/forum/showthread.php?t=348644]how to make phentermine work again[/url] buy real phentermine online phentermine san antonio can phentermine cause hair loss
February 7th, 2012 at 7:06 pm
meridia reductil reviews [url=http://www.wnet.co.il/forum/showthread.php?t=150065]buy cheap reductil 15mg[/url] reductil sibutramine diet pills http://www.wnet.co.il/forum/showthread.php?t=150065 reductil compare prices reductil weight loss pills results buy cheap reductil 15mg
February 7th, 2012 at 7:09 pm
In rare instances, men [url=http://buycheapkamagraonline.com/]kamagra buy[/url] kamagra discount entrancing PDE5 inhibitors (articulated [url=http://buycheapgenericviagraonline.com/]buy viagra generic[/url] buy generic viagra erectile dysfunction medicines, including VIAGRA) reported a [url=http://achatviagraenligne.fr/]viagra Nantes[/url] viagra France fortuitous retrocede or anxiety of vision. It is not doable to conclude whether these events are tied up fit as a fiddle away to these medicines or to other factors. If you savvy threnody abate or drubbing of reconciliation, a visit captivating PDE5 inhibitors, including VIAGRA, and handle a doctor speckle on away.