# Help with Timer

**URL:** <https://forum.kirupa.com/t/help-with-timer/320125>\
**Category:** flash\
**Created:** [March 15, 2011, 12:03am UTC](https://forum.kirupa.com/t/help-with-timer/320125 "2011-03-15T00:03:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![djcoon](https://avatars.discourse-cdn.com/v4/letter/d/db5fbb/32.png) [@djcoon](https://forum.kirupa.com/u/djcoon)\
**Post date:** [March 15, 2011, 12:03am UTC](https://forum.kirupa.com/t/help-with-timer/320125/1 "2011-03-15T00:03:14Z")

</div>

Hi,

I need some help! I’m trying to show a question from a list of 10 question at random that also has a timer set for 2 secs. After the 2 secs are up, another question is selected from an array. Below is my code. Is there sometime I’m missing or forgot to add? I keep getting the error 1120: Access of undefined property changword. \>\_\< Help is greatly appreciated!

```php
//Randominzes Array
var randomizedwords: Array = new Array;
var num:int = new int;
var i:int = new int;
for (i=0; i<10; i++) {
while (words[num]== "")
{
num = Math.ceil(Math.random()*10);
}
randomizedwords.push(words[num]);
words[num] = "";
}

//Array of Questions
var words:Array = ["", "question 1", "question 2", "question 3", "question 4", "question 5", "question 6", "question 7", "question 8","question 9", "question 10"]

//Timer
var trialTimer:Timer= new Timer(trialTimerDelay, trialTimerRepeatCount);
var trialTimerDelay:uint = 2000;
var trialTimerRepeatCount:uint = 10;
trialTimer.addEventListener(TimerEvent.TIMER, changewords);
trialTimer.start();

//show word
wordtxt.text = words[randomizedwords];

```
