Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Flash (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 11th, 2004, 02:34 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default reducing the size of swf files

Hi there

What's the secret? I've got this swf file that is about 140k which I think is too large for what it is; it has graphics and music in it, but still it is way too big.

Are there any sure fire ways to reduce the size of it?

thanks

Adam

 
Old December 11th, 2004, 02:55 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't really think 140k is that big anymore, with all the high speed connections. If you have your movie in different sections like about us or contact us for example, you could create just a base template then use the attachMovie() and have those only load when needed, so the user would not load sections til needed. Something else is getting your images down as small as possible. With the sound you could bring the bit rated down, making the file smaller. Those are some things I know of, but I'd like to hear other ideas too.

Peace
Mike
 
Old December 12th, 2004, 07:04 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default

There's other ways to reduce the file size of your SWF movie. Say you have a WAV loop that is 6.64 MB in size. Using the loop as it is will impact your file size, making it bigger. You can, however, use the attachSound method to significantly reduce the size. Any loops that are loaded via this method won't be included in the exported SWF. Here's how you can use the attachSound method:

Code:
on (release) {
sound1 = new Sound(this);
sound1.attachSound("DeepDown");
sound1.start(0,999);
}
Mike,

I know there's a better way to load movies than to use attachMovie. You'd be using the loadMovie command. Basically, you'd have the external movie load into a movie clip named target or whatever you name the movie clip. Keep in mind that you cannot put the loadMovie action in the movie clip. Put it on the main timeline only.



Ben Horne
-------------------------
I don't want to sound like I haven't made any mistakes. I'm confident I have.

Most likely using FireFox and concocting my next Macromedia Flash project
Snibworks Forums Moderator

Welcome to the New Age
 
Old December 14th, 2004, 11:51 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Ben for correcting this for me, loadMovie() is what I meant to say, I must of been having a brain freeze.

Peace
Mike
 
Old December 16th, 2004, 04:19 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default

can you use an on Load function in this instance?

Thanks

Adam

 
Old December 29th, 2004, 05:21 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default

Onto another swf file of mine that is bursting at the seams K size! It's 104k and it's only 60 key frames with 7 images in it - all about 300 x 400 px when I imported them and only with basic tweening. How come it is so big? I think it's unacceptable!

Cheers

Adam

 
Old December 29th, 2004, 10:53 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default

Try reducing the image quality. I think that's the only way you'll be able to reduce the SWF file size.

Ben Horne
-------------------------
I don't want to sound like I haven't made any mistakes. I'm confident I have.

Most likely using FireFox and concocting my next Macromedia Flash project
Snibworks Forums Moderator

Welcome to the New Age
 
Old December 31st, 2004, 07:50 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 347
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Adam H-W
Default

right, thanks - will give it a go.






Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I play sequentially two .swf files?! kostas88 Javascript How-To 1 August 29th, 2007 06:09 AM
get size (W x H, pixels) of .swf archive ACE2084 Javascript How-To 0 April 27th, 2005 11:32 AM
get size (W x H, pixels) of .swf archive ACE2084 ASP.NET 1.0 and 1.1 Basics 1 April 26th, 2005 04:34 PM
Size of Download Files mslane BOOK: Expert One-on-One Access Application Development 1 October 2nd, 2004 07:02 PM
Embedding SWF Files using FrontPage 2000 Ben Horne HTML Code Clinic 1 December 21st, 2003 01:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.