Note that there are some explanatory texts on larger screens.

plurals
  1. PO"multiply frog enemy" timer and array AS3
    primarykey
    data
    text
    <p><strong>How can I use the counter value to multiply the frogs in the array?</strong> My counter goes from 0-100. I want to prove that I can increment the enemies using a counter.</p> <p><strong>EXPLAINED BETTER</strong><br> I have 10 frogs in an array. I want to use a timer to add 10 more frogs on each iteration of the TimerEvent.TIMER firing.</p> <p><a href="http://www.ashcraftband.com/myspace/videodnd/frog.jpg" rel="nofollow noreferrer">alt text http://www.ashcraftband.com/myspace/videodnd/frog.jpg</a></p> <pre><code>//currentCount var timer:Timer = new Timer(1000, 50); timer.addEventListener(TimerEvent.TIMER, countdown); timer.start(); function countdown(event:TimerEvent) { // myText.text = String(0 + timer.currentCount); } //Creates 10 enemies "I want enemies to multiply 0-100" var enemyArray:Array = new Array(); for (var i:int = 0; i &lt; 10; i++) { var noname:FrogClass = new FrogClass(); noname.x = i*10; //this will just assign some different x and y value depending on i. noname.y = i*11; enemyArray.push(noname); //put the enemy into the array addChild(noname); //puts it on the stage } </code></pre> <p><a href="http://www.ashcraftband.com/myspace/videodnd/frogs.jpg" rel="nofollow noreferrer">alt text http://www.ashcraftband.com/myspace/videodnd/frogs.jpg</a></p> <p><strong>SYMBOL PROPERTIES</strong><br> NAME "noname"<br> CLASS "FrogClass"<br></p> <p><strong>WHY</strong><br> I need specific examples using strings and arrays, because I'm stuck in a learning curve.<br> Stupid examples are more fun!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload