# Flash8/Actionscript2.0 Nested If State & setInterval Issues

**URL:** <https://forum.kirupa.com/t/flash8-actionscript2-0-nested-if-state-setinterval-issues/317095>\
**Category:** flash\
**Created:** [December 10, 2010, 12:00pm UTC](https://forum.kirupa.com/t/flash8-actionscript2-0-nested-if-state-setinterval-issues/317095 "2010-12-10T12:00:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Starrey](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@Starrey](https://forum.kirupa.com/u/Starrey)\
**Post date:** [December 10, 2010, 12:00pm UTC](https://forum.kirupa.com/t/flash8-actionscript2-0-nested-if-state-setinterval-issues/317095/1 "2010-12-10T12:00:00Z")

</div>

# I am really new to actionscript,and if my scripts work at all they are not always "pretty"but everyone I get working feels like a gigantic victory _beaming smile_ My first problem, I am trying to set up an if statement in which it checks the day (if it’s in range of 25th-29th AND if it’s its on the hour-which i thought minutes of 00 occur on each hour-that it goes to a frame and plays. This is not working.Have searched for answer why its not working any help would be desperately appreciated on this and/or the time interval issue below. Thank you in advance, and happy holidays to you and yours. var today\_date:Date = new Date(); day = today\_date.getDate(); min = today\_date.getMinutes(); if(day \> 24 && day \< 30){ if(min == 00){ gotoAndPlay(2); } } if(day == 30 || day == 31){ if(min == 00){ gotoAndPlay(10); } }

setting an interval on an auto random quote??  
I wanted random quotes without a button…this code worked  
as long as I had just one frame; however, now this is more than one  
frame project.How can I set the interval that a new quote is displayed  
without having to do the gotoAndPlay as a sort of reset to display  
the next one?

ranQuote.onLoad  
myinterval = setInterval(wait,15000);  
stop();  
function wait() {  
gotoAndPlay(1);  
}  
var quote = new Array(3);  
quote1=“An optimist stays up until midnight to see the new year in. A pessimist stays up to make sure the old year leaves.-Bill Vaughn”;  
quote2=“We will open the book. Its pages are blank. We are going to put words on them ourselves. The book is called Opportunity and its first chapter is New Year’s Day.-Edith Lovejoy Pierce”;  
quote3=“Be always at war with your vices, at peace with your neighbors, and let each new year find you a better man.-Benjamin Franklin”;  
RanNum = Math.ceil(Math.random()\*3);  
ran = this[“quote”+RanNum];  
quote\_txt.text = ran;
