
Код:
System.useCodepage = true;
///Текстовое поле и его параметры///
var TEXT_BOX:Array = ["Привет", "Супер", "Гламур", "Круто", "Молодец"];
var height_mytext:Number = 14;
var width_mytext:Number = 60;
///
var time:Number = 0;
var text_next:Number = 0;
var fps:Number = 21;
///
createEmptyMovieClip("Text", 1);
with (Text) {
createTextField("mytext", 1, 0, 0, width_mytext, height_mytext+2);
myformat = new TextFormat();
myformat.size = 14;
myformat.color = 0x000000;
myformat.font = "Lucida Console";
mytext.selectable = false;
mytext.bold = false;
mytext.wordWrap = true;
mytext.text = TEXT_BOX[0];
mytext.setTextFormat(myformat);
}
Text._x = 275-(Text._width/2);
Text._y = 200;
///делаем кнопочку///
createEmptyMovieClip("bt", 2);
with (bt) {
lineStyle(1, 0x000000, 100);
beginFill(0x00CCFF, 100);
moveTo(-20, -10);
lineTo(20, -10);
lineTo(20, 10);
lineTo(-20, 10);
lineTo(-20, -10);
endFill();
}
bt._x = 275;
bt._y = 240;
///код для кнопачки///
bt.onPress = function() {
Text.onEnterFrame = function() {
time += 1;
if (time>=fps*2) {
time = 0;
text_next += 1;
}
if (text_next>=TEXT_BOX.length) {
text_next = 1;
}
with (this) {
myformat = new TextFormat();
myformat.size = 14;
myformat.color = 0x000000;
myformat.font = "Lucida Console";
mytext.selectable = false;
mytext.bold = false;
mytext.wordWrap = true;
mytext.text = TEXT_BOX[text_next];
mytext.setTextFormat(myformat);
}
};
};
годится ?