Squashing a .swf file to under 40kb - actionscript-3

I recently took up a job creating a video ad banner to advertise on a major website, but they require that the swf uploaded is under 40kb in it's 'initial flash load'. This would be fine, except the video player itself is around 50kb, even though the actual video is loaded externally.
I've already optimised the ad as much as possible and got it to 86kb, so is there any way to reduce the file size further?

any images make sure they are compressed as much as possible while looking acceptable
textfields, dont embed all the font glyphs, embed only the characters you need
any embedded audios, make sure they are compressed
remove any libraries that are not used
remove the UIComponent flv player which adds a lot of space and create it with code, this will save a ton of code for you
example:
http://blog.martinlegris.com/2008/06/03/tutorial-playing-flv-video-in-plain-as3-part-1/

Related

What is the best way to compress a gif for the web without losing quality?

I want to add a gif of an app that I'm working on to the app's website. Previously, I used quicktime to screen record my computer and then used EZGIF to convert the video into a gif. Unfortunetly, in order to get the gif to a reasonable size to embed on my website (~5MB), the quality goes completely down the drain (you can see the bad quality gif on the website now.
To show off enough functionality of the app to make it worth going on the hompepage, the original video that I'm recording is ~45 seconds.
Are there other, better methods for recording / compressing gifs for websites?

Download segmented SWF webpage

This has been doing my head in and I cannot for the life of me figure out how to download this SWF webpage.
It starts by loading story.swf then it makes calls to other SWF files as it goes along.
The flash itself is interactive this the need to call different segments a it loads the next 'slide'.
But I cannot figure out a way to download it for offline use. I tried loading the entire document which was 200mb and downloading the cache - no go. I tried to use extensions on chrome, Safari and Firefox - no avail
I really don't want to screen capture the entire file, but I was wondering if there were interactive flash file downloaders. I can see there are over 1000 files but cant download them
As #VC.One said, it is not possible due to the server needing to be present. It was constantly changing the string attached to the swf

completely remove flash game that embed in web page also remove from memory

I made a flash game that embed in web page, and the game normally increasing memory when playing it. that's no problem.
now I need to remove this game from web page, by now I just know remove the html node that contain swf :
$("flash_container").html("");
or
swfobject.removeSWF("flash_game_Id");
yes, after above operation, the flash game disappeared. But the big problem is that the memory that flash game used still there. Why it would not decrease.
actually, I would embed more swf in the web page, and that would eat up large memory even I remove swf frome the web page.
does anybody know how to decreas memory when remove swf frome web page?
now I created a loader.swf special for loading main game swf, and embed to html. when need to remove the game from html, first of all, telling main game swf do clean work, then let loader.swf to unload the main game swf, finally, remove the swf container div from html. it works fine.

HTML5 Video Tag Width/Height

I'm trying to create a video tag for use with Chrome only. I don't always know the dimensions of the video, but I would like to have it be the size of the window. I thought I could accomplish this by using "width=100%" and "height=100%", but I found that the built-in controls were hard to see. I reduced height to 98%. Most of the videos I am currently trying to play are 720p MP4's. I tried playing a 1080p (actual dimensions being 1920x1040), and it wouldn't work (the video player acted as if my source was wrong, but I could right click and successfully download the file). The file size was more than 3 gig, I'm not sure if that had anything to do with it.
Edit: I also checked that the codecs were the exact same, and they are between the smaller and larger videos.
Anybody else having the same or like issues?
I just wanted to post on here now that I've fixed this issue. The issue was the file size information is apparently at the end of normal MP4's. For streaming, we want this information at the front of the file so the player can decide how to buffer and what-not. Chrome must do some sort of quick file size check if it doesn't find the file size information at the beginning. I used a program called QT-Faststart which moves the file size information to the front of the file. Thus solving the issue.

should embedding video in home page slow down the page?

If I embed a video demonstrating my application in my home page, will it slow down the page to a considerable amount?
I tried, and checked that it takes almost 1 sec, to load the preview of the video.
And as the video stream will not be downloaded until, the video is clicked, the total video do not have to get downloaded.
Is it recommended to embed a video in the home page? Or should I just keep it in a different page and put a link in the home page.
If you are embedding a flash flv video then yes, it could slow the page load down. This is because the page will need to load the flash plugin in order to get the content size, etc and render the initial frame etc.
Doesn't mean it's a bad thing though. It won't be an extreme slowdown (flash is pretty highly optimised nowadays), so instead evaluate on how it looks rather than performance unless you are trying to eke out every dreg of performance on your page load :)
Here one way you can have your cake and eat it too:
Don't put the flash player on the page that you will load by default....
Put in an image that looks like the player instead (it should be much lighter) .
If / when your user clicks on the player image, load in the flash player and play.
Every object you add to a page can slow down the page's loading time. In general don't include anything if the load time isn't worth the added benefit of having that item.
That being said, you can optimize the page by doing some tricks so that the page renders and THEN the flash video loads. You could pre-generate a thumbnail of the flash player/video and put it on the page in the same place as the video, then on page load use javascript (jquery: $(document).ready()) to create the flash object. This may improve the perceived performance. Even better, you could defer loading the video until the user clicks a button or something.
Everything you embed will slow down the page's initial load.
You have several options: (A) embed the video in its native format (mpeg, avi, etc) or (B) convert it into Flash. A good thing about flash is that it's near universal and highly optimized, so loading the flash plugin takes little time.
The whole video needn't load for the page to finish loading (only the player), so if we're just talking about 1 video, it would make sense to embed it in the page so as to provide a better user experience.
Have a look at both of Mr. Shiny and New's points. They're valid as well.