frozenpeas
Technical User
Hi,
I am loading an external jpeg and it works fine until the movie is placed in a level.
(I am not the author of this code) Frame 1:
frame 2:
So that works fine alone. But I am loading it into _level3 of my movie and would like to load the jpg into _level1.
I have tried various things like _level1.myjpg, _level1.createEmptyMovieClip(h,0); and whatnot but I can't seem to figure it out yet.
Thanks for your help!
frozenpeas
I am loading an external jpeg and it works fine until the movie is placed in a level.
(I am not the author of this code) Frame 1:
Code:
// (holderName is an optional parameter)
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,0);
this._visible = false;
this[h].loadMovie(picName);
var id = setInterval(function (mc) {
if (mc[h]._width > 0) {
mc._alpha = 99;
clearInterval(id);
// may want to move this next line to the onComplete routine
// instead, if visibility is to be set after positioning
mc._visible = true;
mc.onComplete();
} else {
mc.onLoading();
}
}, 80, this);
};
frame 2:
Code:
function positionPic() {
this._x = 200;
this._y = 0;
}
this.createEmptyMovieClip("myjpg", 1);
myjpg.onComplete = positionPic;
myjpg.loadjpg("pic.jpg");
So that works fine alone. But I am loading it into _level3 of my movie and would like to load the jpg into _level1.
I have tried various things like _level1.myjpg, _level1.createEmptyMovieClip(h,0); and whatnot but I can't seem to figure it out yet.
Thanks for your help!
frozenpeas