road0001 / as3isolib

Automatically exported from code.google.com/p/as3isolib
0 stars 0 forks source link

Cannot set frame rate on Actionscript project when using as3isolib #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

In Flex Builder 3:
1. stage.frameRate = 31; or
2. -default-frame-rate 31 (compiler argument) or
3. [SWF(frameRate="31")] (metadata of main class)

What is the expected output? What do you see instead?
Flash on 31 FPS. I see Flash on default (12) FPS.

What version of the product are you using? On what operating system?
Vista Professional 64 bit

Please provide any additional information below.

Original issue reported on code.google.com by danko.ko...@gmail.com on 12 Mar 2009 at 9:54

GoogleCodeExporter commented 8 years ago
How exactly are you reading the output for the frame rate while playing the 
SWF.  In
my testing application I am using the following code:

private var ticks:uint;
private var last:uint;
private function view_enterFrameHandler (evt:Event):void
{
    ticks++;

    var now:uint = getTimer();
    var d:uint = now - last;

    if (d >= 1000)
    {
        var fps:Number = ticks / d * 1000;
        view.fpsCounter.text = fps.toFixed(1) + " fps";
        ticks = 0;
        last = now;
    }

    var mem:String = Number(System.totalMemory / 1024 / 1024).toFixed(2);
    view.memCounter.text = mem + " mb";
}

Based on the output of this code, I am able to affect the framerate via the 
metadata
on the document class like so:

[SWF(frameRate="24", backgroundColor="#666666")]

I am not sure if that is the best way to test for framerate or not.  Please 
advise.

Original comment by jwopitz on 13 Mar 2009 at 3:07

GoogleCodeExporter commented 8 years ago
I test the FPS by the 'rule of thumb' :-)
I set stage.frameRate=2 which introduces the 'choppines' to all other 
applications 
except one using the aso3isolib.

The test case is in the attach.

Original comment by danko.ko...@gmail.com on 13 Mar 2009 at 9:24

Attachments:

GoogleCodeExporter commented 8 years ago
Try inserting this line to your constructor - GTween.timingMode = GTween.FRAME;

This is an issue with GTween and not the as3isolib.  However I am still puzzled 
at
how it can animated so fluidly between the frames.

Original comment by jwopitz on 13 Mar 2009 at 5:14

GoogleCodeExporter commented 8 years ago
I assumed it's GTween also, but isn't it strange? I mean how can the tweening 
engine
'override' the frames per second setting of a Flash movie?

Original comment by danko.ko...@gmail.com on 13 Mar 2009 at 8:55