dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Reducing .swf filesize for banner use

  1. #1
    Junior Member
    Join Date
    Jul 2007
    Posts
    16

    Reducing .swf filesize for banner use

    I'm trying to fit a massive video banner ad into 80kb size limit. But my AS3 code is already over 90kb.

    Any hot tips on how to reduce filesize? I already load all images externally and i was wondering is there a way to load all or most of the actionscript from an external file so that it does not increase the .swf filesize? include "externals.as" does not work :/

    Thanks!

  2. #2
    Junior Member
    Join Date
    Jun 2011
    Posts
    26
    SWF file contains names of classes, functions, parameters you can change them to shorter names and check how it helps...
    Esquimo - Flash 3D

  3. #3
    Junior Member
    Join Date
    Jul 2007
    Posts
    16

    Lightbulb

    haha, thats pretty extreme. But i like it!

    i've already learned all kinds of tricks to make the filesize smaller to meet up with annoying banner ad file size limits. Most have to fit under 40kb. 80kb limits are pretty good already.


    for future reference and guides to others from what i have learned:

    Only include the exact letters in Embed Fonts you need for text to save space.

    Do you really need all those transparent PNG's? try a lowres JPG and Mask it in flash. Flattening objects into the background JPG/colour also helps and animate the whole thing instead of that one transparent PNG.

    Sometimes tracing an image or effect to vectors is lighter than having it there as an image file. But sometimes the vector data takes up more space if its really complicated. Experiment!

    Playing dirty:

    If possible, load all images externally with URLrequest etc. Include a super low res half pixel size image as a placeholder that you stretch to full size then blur that with Flash and have that show up first. Then load the high res image from server and have it fade in when it's done.

    Usually the filesize limit really is only for the singular .swf you provide. Try tricking the service provider with an empty .swf that loads everything externally! Sometimes the 40kb limit is also very arbitrary. It might really be 60kb, they just don't tell you that. Try pushing the limits a little, usually they might give you an extra 10kb. Google Ads are the strictest as they have a 30 second animation limit that is strict. But they don't enforce FPS limits, so go 24fps without care! This applies for most places too. Go Flash 9, AS3 and 24fps even though the guidelines try to hold you down


    There's some tips and tricks! Hopefully someone else who has similar problems finds this useful. And please, if you know more tricks, post them here!
    Last edited by Noisepurge; 04-03-2012 at 10:17 AM.

  4. #4
    Junior Member
    Join Date
    Jun 2011
    Posts
    26
    Quote Originally Posted by Noisepurge View Post
    haha, thats pretty extreme. But i like it!
    You can use obfuscator (or any protection tool which do obfuscation) which will change names automatically for you ;-)
    Esquimo - Flash 3D

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center