ik heb dit script geschreven:
de bedoeling is dat text wordt neergezet vanuit een array (wat lukt) en daarna komt die text met een animatie naarvoren.
de text wordt dus wel geplaatst, en de animatie van de (rode) mask zie ik ook. alleen die maskeert de text eigenlijk niet.
hoe krijg ik het zover dat die dit wel doet?
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| function build_catMenu() {
for (i=0; i<strings_array.length; i++) {
this.createTextField(["mc_catmenu_"+i], this.getNextHighestDepth(), 640, (430+(i*10)), 200, 16);
this["mc_catmenu_" + i].text = strings_array[i];
this["mc_catmenu_"+i].autoSize = "right";
this["mc_catmenu_"+i].selectable = false;
this["mc_catmenu_"+i].setTextFormat(format_pixelfont2);
addText_catMenuMask(this["mc_catmenu_"+i]);
}
}
function addText_catMenuMask(obj) {
maxWidth = 80;
duplicateMovieClip(bin_basicBox, ["obj_catMenuMask_" + i], this.getNextHighestDepth());
this["obj_catMenuMask_" + i].colorTo(0xFF0000, 0);
this["obj_catMenuMask_" + i]._width = 0;
this["obj_catMenuMask_" + i]._height = 16;
this["obj_catMenuMask_" + i]._x = obj._x + obj._width;
this["obj_catMenuMask_" + i]._y = obj._y;
this["obj_catMenuMask_" + i].tween("_x", ((obj._x + obj._width) - maxWidth), 2.5, "easeIn", (i * .1));
this["obj_catMenuMask_" + i].tween("_width", maxWidth, 2.5, "easeIn", (i * .1));
trace(this["obj_catMenuMask_" + i]._y);
obj.setMask(this["obj_catMenuMask_" + i]);
} |
de bedoeling is dat text wordt neergezet vanuit een array (wat lukt) en daarna komt die text met een animatie naarvoren.
de text wordt dus wel geplaatst, en de animatie van de (rode) mask zie ik ook. alleen die maskeert de text eigenlijk niet.
hoe krijg ik het zover dat die dit wel doet?