Skip to main content
easygoing_idea1549
Inspiring
May 11, 2017
Answered

Dropping Frame Rate

  • May 11, 2017
  • 4 replies
  • 2927 views

Hi everyone, i have a test Project, its the very first Project i am doing in Animate or Flash and i have issues with dropping Frame Rates and therefor a few questions:

my project contains three movie clip symbols, each with 100 Frames of flv Video Clips, and buttons to switch the Opacity from one clip to another, for instance, when i click btn1, clip 1 fades to 100% Opacity while clip 2 and clip 3 fade to 0% Opacity. In other words: there is, most of the time, only one clip visible at once, sometimes two, when visibility fades from one clip to the next.

When i test my SWF with cmd+ENTER, i am experiencing serious lag. I am aware, that Animate is built to work with vectors and that playing multiple layers of video with alpha needs processing power, but i would like to get this to work nonetheless...

Question 1: is there a way, when testing my project with cmd+enter, to monitor the actual frame rate, my swf is running with? I didn't find it...

Question 2: has anyone general suggestions on what i can do to increase performance and stabilise frame rate? Especially when working with bitmap movie clips? I tried, decreasing Project Resolution, decreasing flv clip resolution even more and blowing it up to Project resolution, decreasing project frame rate, setting clip.visibility == false, when a clip is at 0% opacity... Some of these improved things a little bit, but i am not happy...

Qestion 3: when i first hit cmd+enter, the frame rate is nearly ok, but the longer the swf plays, the worse it gets. I don't understand why, because the same 100 frames are just looping over and over again...has anyone experienced this before?

Thanks in advance and kind regards,

PS: Frame Rate 25 FPS, Project resolution: 2048x1536 (Native iPad Air 2), Animate CC 2017.2, OSX 10.10.5

    This topic has been closed for replies.
    Correct answer Colin Holgate

    Thanks so much for looking at my file! I will try everything you suggest, especially using a grayscale video and tinting it, i didn't know this was possible.

    What i still not get though is why performance decreases with every click...when you first click any of the buttons, the first fade looks decent enough...

    Anyways i really appreciate you taking the time to help me, i am learning so much with this project... 


    I think it may be because you only clear the listeners if alpha reaches 1. If you clicked sooner there would be multiple listeners going on.

    You could look into using tweens:

    Tween - Adobe ActionScript® 3 (AS3 Flash) API Reference

    with those you wouldn't need an enterframe script.

    BTW, you don't seem to ever set initializer to true, which may contribute to getting too many listeners.

    4 replies

    easygoing_idea1549
    Inspiring
    May 12, 2017

    If someone would take a look at my .fla, i would be forever thankful...:)

    Dropbox - Test25.fla

    This is very weird (for me, as i said, i am a novice, i hope it is obvious to you):

    I paused all three movie clips on start: still the same problem

    When i click one of the three buttons in the middlefor the first time, everything works as intended. Every time i click a button again, performance gets worse. it seems to really depend on how often you click the buttons, not how long the animation is running.

    when you click a button, before the clip is fully opaque, everything becomes transparent, but that is another problem...

    This is probably due to bad code, but i cant find my mistake because sadly, i am not very good at coding yet.

    Anyways, if someone has time to look at it, i would greatly appreciate it...

    Colin Holgate
    Inspiring
    May 12, 2017

    Lots to tell you...

    The FLVs are 1920x1080, at 4 mbps, which means it's not testing either of our suggestions (use smaller video and use lower datarate). As you are using 16:9 that would mean trying say a 640x360 or a 960x540 version of the video. And try less than 1 mbps for datarate.

    It would be far less demanding if you had a grayscale FLV and just changed the tint of it. That way you wouldn't have to fade to black first, you could fade from any color to any other color. The code for doing tinting isn't trivial, but not too terrible either.

    While you are fading to black first there isn't any need to play the two FLVs that are currently not visible. You could get the time of the just faded out video, stop that one, and start another one at the same timecode.

    But like I suggested, learning how to tint one FLV would give you the best performance, especially if you could lower the datarate, and possibly the video size.

    easygoing_idea1549
    Inspiring
    May 12, 2017

    Thanks so much for looking at my file! I will try everything you suggest, especially using a grayscale video and tinting it, i didn't know this was possible.

    What i still not get though is why performance decreases with every click...when you first click any of the buttons, the first fade looks decent enough...

    Anyways i really appreciate you taking the time to help me, i am learning so much with this project... 

    easygoing_idea1549
    Inspiring
    May 12, 2017

    Thanks for your advice concerning frame rate benchmarking and for the link you provided.

    Sorry if i didn't communicate the resolution right, english is not my native language, but i prefer the english speaking community because its bigger and more knowledgeable imo...

    I first had the project (or i believe its called scene in animate) at native ipad resolution as well as my content.

    Then i tried decreasing Project resolution, and learned that apparently it does not make a big difference because after i hit cmd+enter i can scale the window with the animation while its running. When the window is smaller, the animation performs better, but changing the project resolution does only effect the "initial" size of the animation window (coming from AE, i expected everything to be pixelated when i scale the animation window up, because i thought that the content would be compiled with a smaller resolution)

    After that, i tried, just to see if it makes much difference, outputting the flv clips itself from AME CS6 with an 8th of native iPad res and reimporting to Animate. Scaled them to project res. Didn't make enough difference.

    Today i will try a few things, if they don't work, i will have to find another, vector based, approach to this project. I would like to keep this thread open for a while longer, then i will mark clays answer as the correct one for providing info on the frame rate benchmarking. But many thanks to you too, colin, for trying to help!

    Colin Holgate
    Inspiring
    May 11, 2017

    One thought, there isn't any video source that would make sense to have as FLV at 2048x1536. Try having the video at 1024x768 or 640x480, and scale the movieclip up to fill the iPad Retina screen. That ought to perform better.

    Also, go for a lower data rate in the FLV if you can. The higher the data rate to more demanding it is.

    easygoing_idea1549
    Inspiring
    May 11, 2017

    Colin... i tried scaling the content to a ridiculously small size...didn't help enough...the data rate thing i'll try though, thanks!!

    Brainiac
    May 11, 2017

    Playing multiple video clips simultaneously is, in general, a terrible idea. At the very least you should be pausing the ones that aren't currently visible.

    easygoing_idea1549
    Inspiring
    May 11, 2017

    Thanks, I'll try that