Hey, all. I have a very, very simple thing in Flash that just will NOT work in Firefox and it’s driving me nuts. On the very first frame of the root, I have the following code:
this.onLoad = function() {
_root.createTextField("test1_txt", 10000, 0, 0, 300, 100);
test1_txt.text = "WORK!!!";
}
Simple, right? Yet, it won’t work on Firefox.
I don’t know what the problem is. Thing is, I’ve used “this.onLoad” many-a-times in Flash and got it to work in Firefox.
It works in IE, by the way.
Is there something I’m doing terribly wrong here? Might there be a setting that I need to get the above code to work?
I wrote a bit of a hack to get around the problem I’m having:
this.onEnterFrame = function() {
if (_root.getBytesTotal() == _root.getBytesLoaded()) {
foo();
}
}
function foo() {
delete this.onEnterFrame;
_root.createTextField("test1_txt", 10000, 0, 0, 300, 100);
test1_txt.text = "WORK!!!";
}
This works all right but again, it’s a hack, and I’d rather avoid using a hack like this.
Thanks in advance.