# Help with error

**URL:** <https://forum.kirupa.com/t/help-with-error/309824>\
**Category:** Uncategorized\
**Created:** [May 25, 2010, 4:00pm UTC](https://forum.kirupa.com/t/help-with-error/309824 "2010-05-25T16:00:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![webguync](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/webguync/32/2434_2.png) [@webguync](https://forum.kirupa.com/u/webguync)\
**Post date:** [May 25, 2010, 4:00pm UTC](https://forum.kirupa.com/t/help-with-error/309824/1 "2010-05-25T16:00:41Z")

</div>

can someone explain this error to me?  
“5006: An ActionScript file can not have more than one externally visible definition: exam.questions, exam.i”

here is the code

```auto

package exam {
    
    import flash.display.*;
    import flash.events.*;
    import flash.text.*;

var questions:Array = new Array();
var i:uint = 0;
var loopCount:uint = 45;

for (i=0;i<loopCount;i++) { //just to populate array. If it's already populated, this is unnecessary.
    questions.push(i);
}

 function randomizeMe():Array
{
    var output:Array = new Array();
    var randomizer:Array = questions; //I do this, only because we're going to cut the questions array to ribbons otherwise...
    //and no sense using the original, in case you have to run this again.
    var internalLoopCount = questions.length;
    
    for (i=0;i< internalLoopCount;i++) {
        var RandomQNum:uint = Math.floor(Math.random()*randomizer.length);
        var questionIndexNumber:uint = randomizer[RandomQNum];
        output.push(questionIndexNumber);
        randomizer.splice(RandomQNum,1); //most important step. This removes the "selected" element from the array,
        //so that over the next iteration, there is no possibility of getting the same number.
    }
    //output should be set up, so we just need to return it.
    return output;
}

trace(randomizeMe());

}

```
