Resize containerMC for external loaded swf

i just using resize loaded external pic which is i got from this forum…for my external swf…but it won’t work…so my question is…is there any thread for this or tutorial…

thanks u in advanced

aii scotty again…hah…sorry coz always bugging u…but i really got minor problem…
in my external swf i place preloader itself…so when i load into container it seems not working.at first place…or maybe it can’t use alpha property setting…i attached the fla for ur view…anyone can help too… =)

It works, more or less…
But why don’t you put the preloader in your mainfile, so have you have one for all your external movies?

scotty(-:

u mean put the preloader in the main and just using it for the whole my external swf…emm…i’ll try it…tq anyway sir…:slight_smile:

In your main movie, make a mc with the instancename “loadbar” and a textfield instancename “loadinfotxt”.

MovieClip.prototype.loadPic = function(pic) {
	this._alpha = 0;
	this.loadMovie(pic);
	loadbar._visible = 1;
	this._parent.onEnterFrame = function() {
		var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
		var per = Math.round((l/t)*100);
		loadbar._xscale = per;
		loadinfotxt.text = per+" % loaded";
		if (t != 0 && t==l && containerMC._width != 0 && containerMC._height != 0) {
			var w = containerMC._width+spacing, h = containerMC._height+spacing;
			border.resizeMe(w, h);
			loadbar._visible = 0;
			loadinfotxt.text = " ";
			delete this.onEnterFrame;
		}
	};
};

scotty(-:

tq for ur reply sir… but it seems not working though…because when i press the button it just load the swf without display the load bar or the status in loadinfotxt.text…i don’t know why…

Did you, when testing your movie, hit CTRL+Enter again or tested it on line?

scotty(-:

I just hit CTRL+ Enter once only and just press the button to see either the preloader is working or not…
i just do it as u told sir… u can see the fla…

It’s working as it should:
Look here

scotty(-:

ok…when i test again it not view the load bar progress i mean it just load the swf…u can see here :bounce: and the textbox didn’t show the status…comparison ur link it working very well…maybe i place the loadbar and the txtbox at wrong place…

Hmm, in my link I used your files, the only thing I’ve changed is adding a (big) picture (500kb) to the swf to be loaded, to see if it worked…

scotty(-:

yes…eventually…it working when i tested with a big file…really…really…thanks to u sir…

salute to u…!!!

no problem=)