in the following code:
// Place season choice buttons
for (i = 1; i <= numSeasons; i++) {
thisSeason = setSeasonVar["seasonString"+i];
currSeasonHidden = setSeasonVar["season"+i];
var mcName:String = "MC_seasonChoice"+i;
var depthToUse:Number = 1001+i;
var seasonChoiceXPos:Number = 100 + (i*75);
// Add season choice
seasonNavHolder.attachMovie("MC_seasonChoice", mcName, depthToUse, {_x:seasonChoiceXPos, _y:65, txt_seasonChoice:thisSeason});
// Give season choice button actions
var curr_button = seasonNavHolder[mcName];
curr_button.season = currSeasonHidden;
curr_button.thisSeason = thisSeason;
curr_button.onPress = function() {
trace(this.thisSeason);
trace(this._parent);
this._parent.txt_thisSeason.text = this.thisSeason;
//_root.MC_stageHolder.MC_seasonSelectNav.txt_thisSeason.text = this.thisSeason;
var tweenSeasonNav:Tween = new Tween(this._parent, "_y", Strong.easeOut, this._parent._y, 140, 10, false);
}
}
this line:
trace(this._parent);
points to the right movie clip
and the text file in this movie clip is called “txt_thisSeason”
then why doesn’t the very following line:
this._parent.txt_thisSeason.text = this.thisSeason;
work?!?!?!
IM GOING CRAZY!.. I HATE FLASH SCOPE!!!