**Resolved here **www.flashkit.com/board/showthread.php?threadid=591753&perpage=20&pagenumber=1
I am at a loss so I am posting this in alot of forums. So if you have seen it already I apologize ahead of time.
I am trying to load a random image into a movie clip that will scale 100%. Then have the content MC noScale and stay the same. It’s got me baffled.
If I insert a picture into the bg movieclip, it scales and shows up no problem.
Soon as I try to load a random image into the bg movieClip the picture just does not show up!! But what is even weider, is that I have it set up that if the picture is 100% loaded for another MC to play, which it does! So the picture is there, but it’s invisible??? And no the picture is not progressive.
arrrgh!!
Stage.scaleMode = "noScale";
Stage.align = "LT";
bg.onResize = function() {
this._width = Stage.width;
this._height = Stage.height;
};
Stage.addListener(bg);
bg._x = bg._y=0;
bg.onResize();
content.onResize = function() {
this._x = (Stage.width-this._width)/2;
this._y = (Stage.height-this._height)/2;
};
Stage.addListener(content);
content.onResize();
var r = (Math.floor(Math.random()*49)+1).toString();
var mclListener:Object = new Object();
mclListener.onLoadStart = function(bg:MovieClip) {
trace('started');
};
mclListener.onLoadProgress = function(mc, w, t) {
trace('progress: '+w+", "+t);
var w = image_mc.getBytesLoaded();
var t = image_mc.getBytesTotal();
};
mclListener.onLoadComplete = function(bg:MovieClip) {
trace("loaded");
content.gotoAndPlay(2);
};
mclListener.onLoadError = function(bg:MovieClip, errorCode:String) {
trace('not loaded');
};
var image_mc1:MovieClipLoader = new MovieClipLoader();
image_mc1.addListener(mclListener);
image_mc1.loadClip("pictures/photo"+r+".jpg", bg);
Here is the fla zipped up. Its in 2004 format. The noLoad fla doesn’t load the random pic. The yesLoad fla does.
Anyone please. Im at wits end here. :mad:
www.solidtorch.com/teststuff/RandomLoad.zip
Or if anyone has a better solution I am game to try anything right now.
Thanks for looking.
Josh