Does anybody see why this code doesn’t work? It looks identical to other code I’ve found on Kirupa.
card.createTextField("terms_txt", 1, 10, 10, 375, 40);
f = new TextFormat();
f.size = 18;
card.terms_txt.setTextFormat(f);
Does anybody see why this code doesn’t work? It looks identical to other code I’ve found on Kirupa.
card.createTextField("terms_txt", 1, 10, 10, 375, 40);
f = new TextFormat();
f.size = 18;
card.terms_txt.setTextFormat(f);
Nevermind, I moved the code and it works.
Can I ask where you moved the code? I can’t get it to work either.
Cheers,
Mike
I had to move it to a button.
on (release) {
_root.getTerm();
}{
function getTerm() {
card.onEnterFrame = function(){
if (card._yscale > 10) {
decreaseTermSize();
} else {
j = Math.round(Math.random()* i);
_root.card.terms_txt.htmlText = terms[j];
_root.card.definitions_txt.htmlText = "";
card.terms_txt.setTextFormat(f);
card.onEnterFrame = function() {
increaseTermSize();
}
}
}
}
:: Copyright KIRUPA 2024 //--