# Need Help With Clicker Game

**URL:** https://forum.kirupa.com/t/need-help-with-clicker-game/330554
**Category:** flash
**Created:** [February 8, 2013, 1:28am UTC](https://forum.kirupa.com/t/need-help-with-clicker-game/330554 "2013-02-08T01:28:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![gaddough](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@gaddough](https://forum.kirupa.com/u/gaddough)
#### Post date: [February 8, 2013, 1:28am UTC](https://forum.kirupa.com/t/need-help-with-clicker-game/330554/1 "2013-02-08T01:28:50Z")

</div>

[COLOR=#000000][FONT=verdana]Alright, I have been struggling with this game all day. I get bits and pieces here but cannot seem to get the whole thing error proof and running. I would really appreciate it if someone could help me finish this soon as it is due in 4 hours. I believe I am extremely close to getting it but I cannot figure it out. I am trying to make a game that creates 3 different colored circles each with varying health. 1 health goes away each click then they should be removed from the stage. Red has 3 health, Green has 2, and Blue has 1. I will paste all of my code so far to see if anyone can sift through the errors I have. This is the rubric as well as a working example as well [http://mypage.iu.edu/~tfaas/222/assignments/project1.html[/FONT][/COLOR]](http://mypage.iu.edu/~tfaas/222/assignments/project1.html%5B/FONT%5D%5B/COLOR%5D)

[COLOR=#000000][FONT=verdana]my main.mxml file:

[/FONT][/COLOR][COLOR=#993300][FONT=monospace]import[/FONT][/COLOR][COLOR=#000000][FONT=monospace] com.[/FONT][/COLOR][COLOR=#000000][FONT=monospace]multiClicker[/FONT][/COLOR][COLOR=#000000][FONT=monospace]._; [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//create the init function\*[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]public[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]function[/FONT][/COLOR][COLOR=#000000][FONT=monospace] init[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace]:[/FONT][/COLOR][COLOR=#993300][FONT=monospace]void[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//create new target and add it to the stage_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] onMainEnterFrame[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#000000][FONT=monospace]}[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]public[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]function[/FONT][/COLOR][COLOR=#000000][FONT=monospace] onMainEnterFrame[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace]:[/FONT][/COLOR][COLOR=#993300][FONT=monospace]void[/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//2% chance of being added per frame_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]if[/FONT][/COLOR][COLOR=#000000][FONT=monospace]([/FONT][/COLOR][COLOR=#993300][FONT=monospace]Math[/FONT][/COLOR][COLOR=#000000][FONT=monospace].[/FONT][/COLOR][COLOR=#993300][FONT=monospace]random[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace] \<= .[/FONT][/COLOR][COLOR=#000000][FONT=monospace]02[/FONT][/COLOR][COLOR=#000000][FONT=monospace])[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//33% chance of adding red target_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]if[/FONT][/COLOR][COLOR=#000000][FONT=monospace]([/FONT][/COLOR][COLOR=#993300][FONT=monospace]Math[/FONT][/COLOR][COLOR=#000000][FONT=monospace].[/FONT][/COLOR][COLOR=#993300][FONT=monospace]random[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace] \<= .[/FONT][/COLOR][COLOR=#000000][FONT=monospace]033[/FONT][/COLOR][COLOR=#000000][FONT=monospace])[/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//make a new target_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]var[/FONT][/COLOR][COLOR=#000000][FONT=monospace] redTarget:[/FONT][/COLOR][COLOR=#993300][FONT=monospace]Target[/FONT][/COLOR][COLOR=#000000][FONT=monospace] = [/FONT][/COLOR][COLOR=#993300][FONT=monospace]new[/FONT][/COLOR][COLOR=#000000][FONT=monospace] RedTarget[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#000000][FONT=monospace]}[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//33% chance of adding blue target_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]else[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]if[/FONT][/COLOR][COLOR=#000000][FONT=monospace]([/FONT][/COLOR][COLOR=#000000][FONT=monospace].[/FONT][/COLOR][COLOR=#000000][FONT=monospace]033[/FONT][/COLOR][COLOR=#000000][FONT=monospace] \< [/FONT][/COLOR][COLOR=#993300][FONT=monospace]Math[/FONT][/COLOR][COLOR=#000000][FONT=monospace].[/FONT][/COLOR][COLOR=#993300][FONT=monospace]random[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace] \> .[/FONT][/COLOR][COLOR=#000000][FONT=monospace]066[/FONT][/COLOR][COLOR=#000000][FONT=monospace])[/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//make a new target_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]var[/FONT][/COLOR][COLOR=#000000][FONT=monospace] blueTarget:[/FONT][/COLOR][COLOR=#993300][FONT=monospace]Target[/FONT][/COLOR][COLOR=#000000][FONT=monospace] = [/FONT][/COLOR][COLOR=#993300][FONT=monospace]new[/FONT][/COLOR][COLOR=#000000][FONT=monospace] BlueTarget[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#000000][FONT=monospace]}[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//33% chance of adding green target_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]else[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//make a new target_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]}[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]}[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]}

[/FONT][/COLOR][COLOR=#000000][FONT=verdana]my Target.as file:

[/FONT][/COLOR][COLOR=#000000][FONT=monospace]package com.[/FONT][/COLOR][COLOR=#000000][FONT=monospace]multiClicker[/FONT][/COLOR][COLOR=#000000][FONT=monospace][/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//import the needed classes_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]import[/FONT][/COLOR][COLOR=#000000][FONT=monospace] flash.[/FONT][/COLOR][COLOR=#000000][FONT=monospace]display[/FONT][/COLOR][COLOR=#000000][FONT=monospace].[/FONT][/COLOR][COLOR=#000000][FONT=monospace]Shape[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#993300][FONT=monospace]import[/FONT][/COLOR][COLOR=#000000][FONT=monospace] flash.[/FONT][/COLOR][COLOR=#000000][FONT=monospace]events[/FONT][/COLOR][COLOR=#000000][FONT=monospace].[/FONT][/COLOR][COLOR=#000000][FONT=monospace]MouseEvent[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#993300][FONT=monospace]public[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]class[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]Target[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]extends[/FONT][/COLOR][COLOR=#000000][FONT=monospace] Shape [/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] protected [/FONT][/COLOR][COLOR=#993300][FONT=monospace]var[/FONT][/COLOR][COLOR=#000000][FONT=monospace] \_HP:[/FONT][/COLOR][COLOR=#993300][FONT=monospace]Number[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; protected [/FONT][/COLOR][COLOR=#993300][FONT=monospace]var[/FONT][/COLOR][COLOR=#000000][FONT=monospace] \_color:[/FONT][/COLOR][COLOR=#993300][FONT=monospace]String[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; protected [/FONT][/COLOR][COLOR=#993300][FONT=monospace]var[/FONT][/COLOR][COLOR=#000000][FONT=monospace] \_dead:[/FONT][/COLOR][COLOR=#993300][FONT=monospace]Boolean[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#993300][FONT=monospace]public[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]function[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]Target[/FONT][/COLOR][COLOR=#000000][FONT=monospace]([/FONT][/COLOR][COLOR=#000000][FONT=monospace]\_color, \_HP[/FONT][/COLOR][COLOR=#000000][FONT=monospace])[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] drawTarget[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//add event listeners_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]this[/FONT][/COLOR][COLOR=#000000][FONT=monospace].[/FONT][/COLOR][COLOR=#000000][FONT=monospace]addEventListener[/FONT][/COLOR][COLOR=#000000][FONT=monospace]([/FONT][/COLOR][COLOR=#000000][FONT=monospace]MouseEvent.[/FONT][/COLOR][COLOR=#000000][FONT=monospace]CLICK[/FONT][/COLOR][COLOR=#000000][FONT=monospace], onClick[/FONT][/COLOR][COLOR=#000000][FONT=monospace])[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#000000][FONT=monospace]}[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//sets the hp of the target_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]public[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]function[/FONT][/COLOR][COLOR=#000000][FONT=monospace] getHP[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace]:[/FONT][/COLOR][COLOR=#993300][FONT=monospace]Number[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]return[/FONT][/COLOR][COLOR=#000000][FONT=monospace] \_HP; [/FONT][/COLOR][COLOR=#000000][FONT=monospace]}[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//get function that returns false if alpha is \<= 0_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]public[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]function[/FONT][/COLOR][COLOR=#000000][FONT=monospace] dead[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace]:[/FONT][/COLOR][COLOR=#993300][FONT=monospace]Boolean[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]return[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]([/FONT][/COLOR][COLOR=#000000][FONT=monospace]\_HP \<= [/FONT][/COLOR][COLOR=#000000][FONT=monospace]0[/FONT][/COLOR][COLOR=#000000][FONT=monospace])[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#000000][FONT=monospace]}[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//subtracts one from targets HP when clicked_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]public[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]function[/FONT][/COLOR][COLOR=#000000][FONT=monospace] onClick[/FONT][/COLOR][COLOR=#000000][FONT=monospace]([/FONT][/COLOR][COLOR=#993300][FONT=monospace]e[/FONT][/COLOR][COLOR=#000000][FONT=monospace]:MouseEvent = [/FONT][/COLOR][COLOR=#993300][FONT=monospace]null[/FONT][/COLOR][COLOR=#000000][FONT=monospace])[/FONT][/COLOR][COLOR=#000000][FONT=monospace]:[/FONT][/COLOR][COLOR=#993300][FONT=monospace]void[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//subtracts one from hp each click_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] \_HP --; [/FONT][/COLOR][COLOR=#993300][FONT=monospace]if[/FONT][/COLOR][COLOR=#000000][FONT=monospace]([/FONT][/COLOR][COLOR=#000000][FONT=monospace]\_HP \<=[/FONT][/COLOR][COLOR=#000000][FONT=monospace]0[/FONT][/COLOR][COLOR=#000000][FONT=monospace])[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]e[/FONT][/COLOR][COLOR=#000000][FONT=monospace].[/FONT][/COLOR][COLOR=#000000][FONT=monospace]currentTarget[/FONT][/COLOR][COLOR=#000000][FONT=monospace].[/FONT][/COLOR][COLOR=#000000][FONT=monospace]addEventListener[/FONT][/COLOR][COLOR=#000000][FONT=monospace]([/FONT][/COLOR][COLOR=#000000][FONT=monospace]Event.[/FONT][/COLOR][COLOR=#000000][FONT=monospace]ENTER\_FRAME[/FONT][/COLOR][COLOR=#000000][FONT=monospace], [/FONT][/COLOR][COLOR=#993300][FONT=monospace]onEnterFrame[/FONT][/COLOR][COLOR=#000000][FONT=monospace])[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#000000][FONT=monospace]}[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]}[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//subtracts .1 from the classes alpha_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]public[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]function[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]onEnterFrame[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace]:[/FONT][/COLOR][COLOR=#993300][FONT=monospace]void[/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]this[/FONT][/COLOR][COLOR=#000000][FONT=monospace].[/FONT][/COLOR][COLOR=#000000][FONT=monospace]alpha[/FONT][/COLOR][COLOR=#000000][FONT=monospace] =- .[/FONT][/COLOR][COLOR=#000000][FONT=monospace]1[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#000000][FONT=monospace]}[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//draws the target_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] protected [/FONT][/COLOR][COLOR=#993300][FONT=monospace]function[/FONT][/COLOR][COLOR=#000000][FONT=monospace] drawTarget[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace]:[/FONT][/COLOR][COLOR=#993300][FONT=monospace]void[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]var[/FONT][/COLOR][COLOR=#000000][FONT=monospace] circle:Shape = [/FONT][/COLOR][COLOR=#993300][FONT=monospace]new[/FONT][/COLOR][COLOR=#000000][FONT=monospace] Shape[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; circle.[/FONT][/COLOR][COLOR=#000000][FONT=monospace]graphics[/FONT][/COLOR][COLOR=#000000][FONT=monospace].[/FONT][/COLOR][COLOR=#993300][FONT=monospace]beginFill[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; circle.[/FONT][/COLOR][COLOR=#000000][FONT=monospace]graphics[/FONT][/COLOR][COLOR=#000000][FONT=monospace].[/FONT][/COLOR][COLOR=#000000][FONT=monospace]drawCircle[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#000000][FONT=monospace]}[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]}[/FONT][/COLOR][COLOR=#000000][FONT=monospace][/FONT][/COLOR][COLOR=#000000][FONT=monospace]}

[/FONT][/COLOR][COLOR=#000000][FONT=verdana]these three files all look the same except for they are called RedTarget.as, GreenTarget.as, and BlueTarget.as. Red has 3 hp, green 2, and blue 1. The colors in the variables pertain to the files as well:

[/FONT][/COLOR][COLOR=#000000][FONT=monospace]package com.[/FONT][/COLOR][COLOR=#000000][FONT=monospace]multiClicker[/FONT][/COLOR][COLOR=#000000][FONT=monospace][/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]import[/FONT][/COLOR][COLOR=#000000][FONT=monospace] flash.[/FONT][/COLOR][COLOR=#000000][FONT=monospace]events[/FONT][/COLOR][COLOR=#000000][FONT=monospace].[/FONT][/COLOR][COLOR=#000000][FONT=monospace]MouseEvent[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#993300][FONT=monospace]public[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]class[/FONT][/COLOR][COLOR=#000000][FONT=monospace] RedTarget [/FONT][/COLOR][COLOR=#993300][FONT=monospace]extends[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]Target[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]private[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]var[/FONT][/COLOR][COLOR=#000000][FONT=monospace] redHP:[/FONT][/COLOR][COLOR=#993300][FONT=monospace]Number[/FONT][/COLOR][COLOR=#000000][FONT=monospace] = [/FONT][/COLOR][COLOR=#000000][FONT=monospace]3[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#993300][FONT=monospace]private[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]var[/FONT][/COLOR][COLOR=#000000][FONT=monospace] redDead:[/FONT][/COLOR][COLOR=#993300][FONT=monospace]Boolean[/FONT][/COLOR][COLOR=#000000][FONT=monospace] = [/FONT][/COLOR][COLOR=#993300][FONT=monospace]false[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#993300][FONT=monospace]private[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]var[/FONT][/COLOR][COLOR=#000000][FONT=monospace] redColor:[/FONT][/COLOR][COLOR=#993300][FONT=monospace]String[/FONT][/COLOR][COLOR=#000000][FONT=monospace] = [/FONT][/COLOR][COLOR=#0000FF][FONT=monospace]“red”[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#993300][FONT=monospace]public[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]function[/FONT][/COLOR][COLOR=#000000][FONT=monospace] RedTarget[/FONT][/COLOR][COLOR=#000000]FONT=monospace[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]{[/FONT][/COLOR][COLOR=#000000][FONT=monospace] redHP = \_HP; redDead = \_dead; redColor = \_color; [/FONT][/COLOR][COLOR=#F000F0][FONT=monospace]_//include the super function_[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#993300][FONT=monospace]super[/FONT][/COLOR][COLOR=#000000][FONT=monospace]([/FONT][/COLOR][COLOR=#000000][FONT=monospace]0xFF0000, [/FONT][/COLOR][COLOR=#000000][FONT=monospace]3[/FONT][/COLOR][COLOR=#000000][FONT=monospace])[/FONT][/COLOR][COLOR=#000000][FONT=monospace]; [/FONT][/COLOR][COLOR=#000000][FONT=monospace]}[/FONT][/COLOR][COLOR=#000000][FONT=monospace] [/FONT][/COLOR][COLOR=#000000][FONT=monospace]}[/FONT][/COLOR][COLOR=#000000][FONT=monospace][/FONT][/COLOR][COLOR=#000000][FONT=monospace]}[/FONT][/COLOR][COLOR=#000000][FONT=verdana]  
[/FONT][/COLOR]
