January 11, 201016 yr Hi Everyone I have a general Flash question.... If i create a gallery in flash and it has 100 photos in it, and each one is a Movie Clip. I then replace 20 of the images with new ones by deleting the existing movie clip from the stage and creating a new movie clip with the new image. So my 'Stage' still has 100 images on it, but my library has 120 movie clips. (20 not being used). Will the file size of my SWF file go up because my library has increased? If Yes, is there a way you can view all items in your library and see which items are being used on the stage and which are not? Thanks for the help
January 11, 201016 yr Hi, What's best is to have the images externally and call them in to your main movie. So you're just loading one image at a time. Here's the actionscript I use: Actionscript: stop(); // this.createEmptyMovieClip("containerMC1_mc",2); this.createEmptyMovieClip("containerMC2_mc", 1); // var top:MovieClip = containerMC1_mc; var bot:MovieClip = containerMC2_mc; var delayNum:Number = 4; // time in seconds between images var timerNum:Number; var iNum:Number = 0; var swfArray:Array = new Array("homeanimation1.swf", "homeanimation2.swf", "homeanimation3.swf","homeanimation4.swf","homeanimation5.swf"); var swfArrayMax = swfArray.length - 1; // function swap():Void { var t = top; top.swapDepths(bot); top = bot; bot = t; } function delayFunc():Void { timerNum = setInterval(function () { doNext(); clearInterval(timerNum); }, delayNum*1000); } // var mclListener:Object = new Object(); var MCL:MovieClipLoader = new MovieClipLoader(); MCL.addListener(mclListener); // function doNext():Void { swap(); trace("Loading / PLaying: "+swfArray[iNum]); MCL.loadClip(swfArray[iNum], top); } doNext(); // mclListener.onLoadInit = function():Void { top.onEnterFrame = function():Void { if (this._currentframe == this._totalframes) { trace("Finished playing - "+swfArray[iNum]+", delaying "+delayNum+" seconds"); iNum = (iNum == swfArrayMax) ? 0 : ++iNum; delayFunc(); delete this.onEnterFrame; } }; }; To be honest this question will probably get better results on www.actionscript.org. But good luck anyway. Jo
Create an account or sign in to comment