Jump to content
Search Community

file size really high w/ greensock?

timaging test
Moderator Tag

Recommended Posts

Hi,

 

I just had to do an ad for american express and their file size requires me to be under 50k.

 

I can get to 54k, but once I start importing greensock stuff, the min file size I can get is around 68k.

 

Is there a way to get that down? I actually can't even use it and have to rely on Flash motion tweens, but any ideas would be great.

 

thanks,

Dave

Link to comment
Share on other sites

Could you clarify what you mean by "GreenSock stuff"? TweenLite? TweenMax? Plugins? AutoFitArea? LoaderMax? TransformManager? LiquidStage?

 

Obviously TweenLite was built for maximum performance and minimum size with a very good feature set (it's always a balancing act). TweenLite is under 5k. If you start activating a bunch of plugins, that obviously will increase. TweenMax automatically activates a bunch of plugins by default to make it easier on you. If you need the absolute minimum file size and are willing to give up features like pause/resume, sequencing with TimelineLite/Max, etc., then definitely check out TweenNano which can be as little as 1.6k!

Link to comment
Share on other sites

I'm sorry, but there's definitely something wrong. There's no way those numbers are accurate. Please post the two versions - one FLA that uses TweenLite that's bloated and another FLA that uses the Tween class (or whatever you mean by "traditional") that's much slimmer. I'd be VERY curious to see this.

 

I wonder if you're looking at the file size report that Flash generates. If so, that shows the UNCOMPRESSED size which is completely different than the actual swf's size.

Link to comment
Share on other sites

Yeah, I see 17k without TweenLite, 23k with (when I compile). I'm not sure where you got the 20k vs 68k numbers previously, but if all you're doing is sliding some text onto and off of the screen (and a logo), then yes, some simple motion tweens on the timeline are all you need. TweenLite and TweenMax are much better than motion tweening when you start doing anything even remotely complex or dynamic. TweenLite can even produce a smaller file compared to regular motion tweens depending on how many motion tweens you have going on. In your case, though, there are very few, so using TweenLite isn't very beneficial.

 

If you want to see how TweenLite, TweenMax, and TweenNano compare, see http://www.greensock.com/features/

Link to comment
Share on other sites

I'm not sure where you got the 20k vs 68k numbers previously,

 

yeah, I found that I was using this other plugin in combination with yours called FlashEff. Apparently even if you leave those components in the library and not on the timeline, they add a ton of size.

 

I am however still able to get these animations lower by using standard tweens. I'll need to dive in to timeline max now. Is that available for AS2?

Link to comment
Share on other sites

You should try using the Plugin Explorer. There's an AS3/AS2 button at the bottom that you can toggle, and then click the "EXAMPLE" button next to any plugin to see an interactive demo that writes code at the bottom.

 

import com.greensock.*;
import com.greensock.plugins.*;
TweenPlugin.activate([GlowFilterPlugin]);

TweenLite.to(text01, 1, {glowFilter:{color:0x91e600, alpha:1, blurX:30, blurY:30}, delay:1});

 

http://www.greensock.com/tweenlite/#plugins

Link to comment
Share on other sites

ok, so I don't see an AS2 button and tried a quick setup:

 

var timeline:TimelineMax = new TimelineMax({repeat:0, yoyo:true, repeatDelay:1.5});
timeline.insertMultiple( TweenMax.allFrom(text01, 1, {glowFilter:{color:0xFFFFFF, alpha:1, blurX:10, blurY:10}, delay:1}, 0.04), 1.4);

 

it's looking for something called pause time?

/com/greensock/TimelineLite.as, Line 980 There is no property with the name '_pauseTime'.

Link to comment
Share on other sites

Ummm...sounds like you must have mis-matched versions of some of the classes. Like a newer version of TweenCore and a stale version of TimelineLite. Make sure you use all the latest stuff. http://www.greensock.com/tweenlite/

 

If you're still getting errors, please zip your fla and all the class files into a single zip and post it here so we can just open it and publish to see the error.

Link to comment
Share on other sites

Those files compiled perfectly for me - zero errors. Maybe you need to clear your ASO files in Flash and recompile.

 

By the way, the GreenSock files you included were definitely out of date (last month). I'd recommend updating as soon as you can - just log into your GreenSock account at https://www.greensock.com/account/ to get the latest & greatest.

Link to comment
Share on other sites

In Flash, go to Control > Delete ASO files.

 

They're kinda like a cache for class files.

 

There may be something weird with your Flash install. Maybe try a different computer. And I checked the GreenSock files you had in the zip and they were definitely NOT the latest ones. No doubt about it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...