# Using frame as a condition in an if statement

**URL:** <https://forum.kirupa.com/t/using-frame-as-a-condition-in-an-if-statement/216212>\
**Category:** Uncategorized\
**Created:** [February 14, 2007, 3:54pm UTC](https://forum.kirupa.com/t/using-frame-as-a-condition-in-an-if-statement/216212 "2007-02-14T15:54:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![exodus](https://avatars.discourse-cdn.com/v4/letter/e/958977/32.png) [@exodus](https://forum.kirupa.com/u/exodus)\
**Post date:** [February 14, 2007, 3:54pm UTC](https://forum.kirupa.com/t/using-frame-as-a-condition-in-an-if-statement/216212/1 "2007-02-14T15:54:57Z")

</div>

this is what I have right now,

if(\_root.\_currentframe = 3)  
{  
myQuestionArray[0] = new questions(“Stem Cell Research”, “broad”);  
myQuestionArray[1] = new questions(“Stem Cell Research and Ethical Aspects”, “research”);  
myQuestionArray[2] = new questions(“Stem Cell Extraction and New Method”, “narrow”);  
}  
else if(\_root.\_currentframe = 4)  
{  
myQuestionArray[0] = new questions(“Alcoholism”, “broad”);  
myQuestionArray[1] = new questions(“Employee Alcoholism and Management”, “research”);  
myQuestionArray[2] = new questions(“Employee Alcoholism and Hangovers and Profits”, “narrow”);  
}

these are inside of a movie on a button, and I want to change the contents of an array based on the frame the user is in, any help is appreciated
