FLASH - how long is a piece of string?
- Started
- Last post
- 7 Responses
- krust
too f**king long!
when i use this script... my external text appears twice...text02.gotoAndStop(1);
this.onEnterFrame = function() {
loadCharacterDescription(lastTra...
text02.gotoAndStop(2);
text02.display_txtx.autoSize = true;
box_mc._width = text02.display_txtx._width;
box_mc._height = text02.display_txtx._height;
delete this.onEnterFrame;
};when i remove the 'text02.display_txtx.autoSize = true;' line my text is fine.
except i need that function. why would it do that???
- joyride0
why are you using onEnterFrame?
You just want to run once right?
just name the function then call it after you set the function up. And it will only run once.
- stuff0
somethin like this?
function fnc_start_text() {
loadCharacterDescription(lastTra... ");
text02.gotoAndStop(2 );
text02.display_txtx. autoSize = true;
box_mc._width = text02.display_txtx. _width;
box_mc._height = text02.display_txtx. _height;
}
fnc_start_text();
- alloyd0
onLoad instead of onEnter...
- joyride0
yeah, that seems right. or you could use on (load){} to . either way.
I'm try to never use onEnterFrame. its processor intensive.
- krust0
i'm actually using onEnterFrame alot... e.g...
this.onEnterFrame = function() {
myClip._visible = false;
var bytesLoaded = myClip.getBytesLoaded();
var bytesTotal = myClip.getBytesTotal();
if (bytesLoaded>=bytesTotal && bytesTotal>100) {
tn_on.gotoAndStop(5);
x_load.play();
if (x_load._totalframes == x_load._currentframe) {
myClip._visible = true;
x_load.gotoAndStop(13);
unloadMovie(mc_x.getInstanceAtDe...
loadCharacterDescription(lastTra...
text02.gotoAndStop(2);
delete this.onEnterFrame;
}
}
};should i be doing something else?
- j_red0
never use it unless you want to repeatedly perform a set of actions. replace the "this.onEnterFrame" with "fart"
and then anytime you want to call those actions, just call fart;
and those actions will be performed.
- krust0
eh?
so if it's a preloader for instance i shouls be using it cos it needs to repeatedly check the bytes loaded.
right?
*fart.