Solved

Flash Movie Running Slow

Posted on 2006-07-21
6
259 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
ID: 17156785
Do you mean that it loads slowly? Or, are the animations/etc. running slowly/choppy?

MuXx
0
 
LVL 23

Expert Comment

by:Zeffer
ID: 17157037
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
ID: 17163432
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 23

Expert Comment

by:Zeffer
ID: 17163930
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
ID: 17168913
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
ID: 17199658
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
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 motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

895 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

12 Experts available now in Live!

Get 1:1 Help Now