I feel like an idiot. I’m just playing around with ActionScript, and I’m trying to create a title page where two movie clips fade in. One is a dynamic text movie clip, the second is an image that is loaded.
My code is this:
function fadeIn():Void {
this._alpha += FADESPEED;
if (this._alpha>100) {
this._alpha = 100;
delete this.onEnterFrame;
}
}
var SITENAME:String = "title text";
var FADESPEED:Number = 10;
title_mc.title_txt.text = SITENAME;
title_mc._alpha = 0;
title_mc.onEnterFrame = fadeIn;
image_mc.loadMovie("image0.jpg");
image_mc._alpha = 0;
image_mc.onEnterFrame = fadeIn;
I’ve traced the heck out of this, so all I know is that image_mc seems to only generate a single onEnterFrame event and then stops. What obvious, basic Flash point am I missing here?
It seems that if I comment out the .loadMovie line, the placeholder movie clip fades in properly, so obviously there is something about onEnterFrame events and loadMovie that I don’t know.