Solved

Flash Movie Running Slow

Posted on 2006-07-21
6
258 Views
Last Modified: 2012-06-27
Hi there,

I recently have made a website in Flash and it runs fine in the Flash Player, however, when its in a browser it runs pretty slow? Presumably this is because it is too demanding for the processor or perhaps the Flash Player has more dedicated memory. Is there a way to make it run faster? I tried putting the Publish JPEG qulaity to its lowest but that didnt make a difference.

Thanks, Jack.
0
Comment
Question by:Portal111
  • 2
  • 2
  • 2
6 Comments
 
LVL 7

Expert Comment

by:muxxter
Comment Utility
Do you mean that it loads slowly? Or, are the animations/etc. running slowly/choppy?

MuXx
0
 
LVL 23

Expert Comment

by:Zeffer
Comment Utility
if you have lots of jpegs .. select each one and go.. modify/break apart.. and then turn them into a graphic symbols
you especially need to do this if you are using transitions or tweening.. so there is one copy in the library and the rest are all instances.
you should also turn text and graphics that transition or tween into symbols also..

the player will thank you.:)

Z
0
 

Author Comment

by:Portal111
Comment Utility
Hey its the animation thats running slowly. Ive only got a couple of jpegs, I had a go at breaking them apart but unfortunately it didnt make any difference.

Jack
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 23

Expert Comment

by:Zeffer
Comment Utility
Hi Jack..I'll have to leave this to the Muxxter..he'll sort it..
gonna be away for a few days.

Z
0
 
LVL 7

Accepted Solution

by:
muxxter earned 125 total points
Comment Utility
Well, I don't know the reason why it would run slower in a browser. Whether it's because the flash instructions are being interpreted, or because the browser has to share it's memory with the player, or what. But there are couple of things you can do to help speed things up.

Zeffer made a good suggestion, to convert as much as you can to symbols. Instead of Tweening everything individually, animate as much as you can as smaller groups.

Also, you can animate stuff using Actionscript instead of the timeline. You can do this by using the undocumented Tween class. I'm confident that this is a much more processor friendly way of doing stuff. Here's how it works:

new Tween(<movieClipInst>, <property>, <easeType>, <startValue>, <endValue>, <duration>, <useSeconds>);

movieClipInst ... a reference to the MovieClip instance you want animate
property ... the property of the above reference you want to change with the animation (eg. _alpha, _rotation, _x, _width, etc.)
easeType ... a reference to an ease class (it'll be explained more in the example below)
startValue ... at the beginning of the tween, the above property will be set to this number
endValue ... during the animation, the above property will be "smoothly" changed (according to the easeType), and finish at this number
duration ... how long you want the animation to last (either in seconds or frames, see below)
useSeconds ... a boolean. True: duration is in seconds, False: duration is in frames
...

To use it, you need to import the mx.transitions library.
Here's an example:

import mx.transitions.*;

var easeType = mx.transitions.easing.Strong.easeOut;

var my_tween = new Tween(my_obj, "_x", easeType, 0, 200, 3, true);
my_tween.onMotionFinished = function() {
    trace("Animation finished.");
}
...

For more information on this, or for a nice demonstration of what each ease type does, check out actionscript.org:

http://www.actionscript.org/tutorials/advanced/Tween-Easing_Classes_Documented/index.shtml

I hope this helps.
MuXx
0
 

Author Comment

by:Portal111
Comment Utility
hey, thanks for the help everyone, I tried AS insteading of normal tweening and it did make a difference,

Thanks again, jack.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now