Hello,
I have a small app that has a Dynamic Text field inside of a repeated button that needs to change color when the app is on the item this button corresponds to due to a change in the background image from a light to dark color. I've tried using the following code, but to no avail.
I don't want to have to create the button dynamically in ActionScript as we are using a font that is not free or installed on many machines (Myriad Pro).
Any help is appreciated!
- George
I have a small app that has a Dynamic Text field inside of a repeated button that needs to change color when the app is on the item this button corresponds to due to a change in the background image from a light to dark color. I've tried using the following code, but to no avail.
Code:
//currentAd is the ad being played
_onShowAds(_currentAd);
function _onShowAds($i)
{
if (_carousel[$i].button)
{
var _previousButton = _carousel[__get__previousAd()].button;
var _button = _carousel[$i].button;
var _buttonFormat = new TextFormat();
_previousButton.label_str._color = 0x000000;
_buttonFormat.color = 0xFFFFFF;
_previousButton.gotoAndStop("IDLE");
_button.label_txt.setTextFormat(_buttonFormat);
_button.gotoAndPlay("SELECTED");
}
}
I don't want to have to create the button dynamically in ActionScript as we are using a font that is not free or installed on many machines (Myriad Pro).
Any help is appreciated!
- George