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;