Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Flash FIle Size

Featured Replies

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 :yahoo:

Why not to keep all MC in external files (SWF) separately from gallery UI?

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.