I would like to use an array to send the playhead to named frames. The array is a list of dates, and frames and buttons are named in sync, e.g., button “mar12_10_btn” sends the playhead to frame “mar12_10”.
This is the code I’ve got:
date = ["nov16_99", "jan2010", "midjan_10", "feb10_10", "apr10_10", "apr20_10", "may17_10", "may28_10", "jun3_10", "jun11_10", "jun30_10", "jul9_10", "jul20_10", "oct5_10", "oct7_10", "oct20_10", "oct28_10", "nov4_10", "dec6_10", "jan21_11", "feb17_11", "jan12_12", "may15_12", "jun18_12"]
for(i=0; i<date.length; i++){
var btn:Object = [* + "_btn"];
btn.onRelease = function(){
gotoAndStop(*);
};
};
I’ve tried putting quotes inside the gotoAndStop parens, both inside and outside the square brackets. It’s not working, and I’m not getting error messages so I guess the syntax is correct. Suggestions will be welcome!