I’m trying to simplify some code by writing a block of code using a string variable, and then using that function at various places on a timeline where slideshows need to appear. Each slideshow is named for the date things occurred on, so they have names like “apr2_12Slideshow_mc”.
I created a variable like this:
var dateName:String = "apr2_12Slideshow_mc";
Then the function which looks like:
callout_mc.next_btn.onRelease = function(){
new Tween(_parent.dateName, "_y", Strong.easeInOut, 640, 0, 1, true);
But the function code WILL NOT see the variable. I’ve tried writing it numerous ways and tried putting it in different locations but I can’t get it to function.
I did test by using the actual slideshow name and it worked fine. But I cannot get it to see the string variable. I have a feeling I’ve got the syntax wrong somehow but I can’t see where the problem is.
Thanks for any comments!