I am so close to getting this working, I have created an array and Im trying to extract a value from the array and pass it into my javascript function - which passes it to my javascript function in my HTML page. Im so close, when I click a button - it passes the var stateName, but its not pulling the state into that from the array. Can someone look at my code and help me out with this?
var buttonList:Array = [washington, oregon];
for (var i:Number = 0; i < buttonList.length; i++) {
var mcBtn:MovieClip = buttonList*;
mcBtn.stop();
mcBtn.onRollOver = function():Void {
this.gotoAndStop("onRollover");
new Tween(this, "_xscale", Regular.easeOut, this._xscale, 150, 0.3, true);
new Tween(this, "_yscale", Regular.easeOut, this._yscale, 150, 0.3, true);
this.swapDepths(500);
};
mcBtn.onRollOut = function():Void {
this.gotoAndStop("onRollout");
new Tween(this, "_xscale", Regular.easeOut, this._xscale, 100, 0.3, true);
new Tween(this, "_yscale", Regular.easeOut, this._yscale, 100, 0.3, true);
};
for (var m:Number = 0; m < buttonList.length; m++) {
var stateName:String = buttonList[m];
mcBtn.onRelease = function():Void {
ExternalInterface.call("selectState('stateName')");
}
trace(stateName);
}
}
Thanks in advance!