# How to generate a list

**URL:** <https://forum.kirupa.com/t/how-to-generate-a-list/212563>\
**Category:** Uncategorized\
**Created:** [January 12, 2007, 4:11am UTC](https://forum.kirupa.com/t/how-to-generate-a-list/212563 "2007-01-12T04:11:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hunson](https://avatars.discourse-cdn.com/v4/letter/h/977dab/32.png) [@Hunson](https://forum.kirupa.com/u/Hunson)\
**Post date:** [January 12, 2007, 4:11am UTC](https://forum.kirupa.com/t/how-to-generate-a-list/212563/1 "2007-01-12T04:11:43Z")

</div>

hey i have a question about auto generating a list (loops?)

what i did was i created 3 questions, and according to the answers they created some variables, example: (not AS)

question1 = 3  
question2 = 2  
question3 = 2

the idea of these questions is to filter out a list of 100 results based on the answers.  
let’s say i’ve converted ALL the 100 results into a movie clip EACH

and each of the movie clip will have a AS like this:

list1.onEnterFrame = function(){  
if(question1 !=3 && question2 !=2){  
this.show = false  
} else {  
this.show = true  
}

all the way to:

list100.onEnterFrame = function(){  
if(question2 !=3 && question3 !=2){  
this.show = false  
} else {  
this.show = true  
}  
}

note that the var after the “if” statement differs, hope you guys get the idea.

so finally the question :P, let’s say after the 3 questions only 10 in the list will remain “this.show = true”,  
how do i make them come out as a list, meaning their position will be auto generated without leaving any space?

i really hope you guys get what i’m trying to express here, thanks///
