У меня возникли некоторые вопросы, получить следующий код для работы:Изменение цвета текста с ColorPicker
SideBarText.fontColour.addEventListener(ColorPickerEvent.CHANGE, changeTextColour);
function changeTextColour(e:ColorPickerEvent):void
{
trace (SideBarText.fontColour.selectedColor);
trace (SideBarText.fontColour.hexValue);
var colorInformation:ColorTransform = SideBarText.typeableText.transform.colorTransform;
colorInformation.color = SideBarText.fontColour.selectedColor;
SideBarText.typeableText.transform.colorTransform = colorInformation;
}
fontColour
этого имя ColorPicker, SideBarText
переменного имя мувика оно помещается и SideBarText.typeableText
это имя текстового поля внутри мувиклипа SideBarText
, который я пытаюсь изменить цвет. Я получаю следующую ошибку:
TypeError: Error #1010: A term is undefined and has no properties.
at App_fla::MainTimeline/changeTextColour()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at fl.controls::ColorPicker/onSwatchClick()
Любая помощь вообще будет оценена по достоинству.