Solved

Flash Movie Running Slow

Posted on 2006-07-21
6
263 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
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.

739 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