I want to paint sequence images that rendered from Maya in flash 8.
Ex. file1 paint at 1st second, file2 paint at 2nd second.
Using flash 8 , actionscript 2.0, if possible please write the code in one frame.
Now, I can do it but with white scene in the interval between changing image. (make it not smooth)
code in 1st frame:
pn(“frame1”);
if(_global==undefine)_global.atFrame=1;
MovieClip.prototype.loadjpg = function(picName, holderName) {
// holderName can be passed in case needed for progress indicator
// if not passed, use ‘holder’ as default
var h = holderName==undefined ? “holder” : holderName;
this.createEmptyMovieClip(h, 1);
this._visible = false;
this[h].loadMovie(picName);
var id = setInterval(function (mc) {
if (mc[h].getBytesLoaded() > 1 &&
mc[h].getBytesLoaded() > mc[h].getBytesTotal()-10 &&
mc[h]._width > 0) {
mc._alpha = 99;
clearInterval(id);
mc._visible = true;
mc.onComplete();
} else {
mc.onLoading();
}
}, 80, this);
};
_global.picLoaded = false;
function pn(str:String):Void{
trace(str);
}
code in 2nd frame::
pn(“frame2”);
function setIt() {
this._x = 0;
this._y = 0;
}
if (!picLoaded) {
this.createEmptyMovieClip(“mymovie”, 1);
mymove.onComplete = setIt;
mymovie.loadjpg(“D:/anonoooooo/animation/maya/projects/default/images/tmpo”+(atFrame)+".jpg");
picLoaded = true;
trace(atFrame);
gotoAndPlay(1);
} else {
mymovie._visible = true;
mymovie.loadjpg(“D:/anonoooooo/animation/maya/projects/default/images/tmpo”+(atFrame)+".jpg");
}
atFrame++;
I’m sure that it is very simple, but I am just a flash beginner.
I wish to rewrite all code, anyone help me please.
Thank you.