Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Flash Movie Running Slow

Posted on 2006-07-21
6
Medium Priority
?
268 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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,…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

670 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