as u probably know TextFormat has no global style
like FStyleFormat so i thought i could make one?
idea)
i could wrap createTextField() in some fns which then assigns automaticly some TextField-propertys and sets setTextFormat.
THE PROBLEM
with that is that not all of my TextFields are generated via script, some r created by authoring-time.
idea)
is to change the prototype.“someproperty” of the TextField,
THE PROBLEM
TextField is not created via standard “new” constructor
so something like TextField.prototype.embedFonts=true;
DOES NOT WORK as well.
idea)
i could simply traverse all instances on stage and ask if the instanz is TextFeld and then assgin some fns which makes the formating
THE PROBLEM
i dont know how to do that?
couse if i ask
trace(typeof t_txt.proto);
it just givs “object” not TextField or so
does anybody knows how to make kind of global TextFormat
for createTextField()-generated as well as for authoring-time generated TextFields?
this is very general problem, so i think i can’t be the only one with that problem:
hmmm tnx for that, in meentime
i solve it on the other way.
and if i my say that(correct me if i’m wrong) my version seems better to me.
please have a look maybe u find some drawback.
in u’re version i dont know way schould i wrap all that in
extra object, exept if that solves the problem with components?
i noticed that at least in my version, if some components r on the stage the for-loop become endless so i use this static style_all_tf.protokoll to solve that.
any incitation?
style_all_tf.protokoll = new Array();
function style_all_tf(parent) {
for (e in parent) {
if (parent[e] instanceof MovieClip) {
var new_one = true;
for (var i = 0; i<arguments.callee.protokoll.length; i++) {
if (parent[e] == arguments.callee.protokoll*) {
new_one = false;
}
}
if (new_one) {
arguments.callee.protokoll[arguments.callee.protokoll.length] = parent[e];
arguments.callee(parent[e]);
}
} else if (parent[e] instanceof TextField) {
if (parent[e].type == “input”) {
global_itf_style(parent[e]);
} else {
global_dtf_style(parent[e]);
}
}
}
}
//in _root timeline a call
style_all_tf(this);