Solved

Flash Movie Running Slow

Posted on 2006-07-21
6
262 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
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.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

756 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