7 Replies Latest reply on Jan 27, 2008 1:42 AM by tinylion_uk


      So I have an actionscript project and I put this above my application sprite class definition:
      [SWF(width="700", height="500", frameRate="30", backgroundColor="#FFFFFF")]

      I also, for grins, add this to compiler options:
      -default-frame-rate 30

      If I run the resulting .swf by starting it from flex builder (F11 or ctrl-F11), the app runs at 24 frames per second not 30. If I run the swf any other way (start it up in a browser, just double click it from, whatever), it runs at 30 FPS.

      This is in flex builder 3, beta 3.

      What am I missing?
        • 1. Re: framerate
          tinylion_uk Level 2
          have to tried setting the frame rate in the flex Application?

          xmlns:mx=" http://www.adobe.com/2006/mxml"

          Let me know if it makes any difference.

          I'm not sure if you're missing anything, I would have thought that you did the correct thing. (but then again - what the hell do I know lol)

          • 2. Re: framerate
            virgil_wall Level 1
            This project is actually pure actionscript (so there is no mx:Application). I do have an AIR application and if I set the frameRate attribute of mx:WindowedApplication, this seems to work.

            So I wonder how one sets the framerate of a pure actionscript project so that it can be run at the target framerate when launched from Flex Builder....
            • 3. Re: framerate
              tinylion_uk Level 2
              strange. I thought it was the compiler option as you said in your first post.

              Have you tried this?


              you can set the framerate on the fly not just during compilation.
              • 4. Re: framerate
                virgil_wall Level 1
                Application.application.frameRate="30"; is only applicable within an mxml project... though your input is appreciated.

                I've got an actionscript project ("File:New:ActionScript Project" from Flex Builder). The only way I've seen to set the frameRate in actionscript is with the SWF metatag. I have also tried using the compiler option, neither works when launching the app from flex builder. It is as if the frameRate is being reset to 24 by flex builder when it launches the app.

                • 5. framerate
                  tinylion_uk Level 2
                  could you use the flash.display package

                  flash.display.Stage.frameRate = "30";

                  we'll keep trying till we get there mate :)
                  • 6. Re: framerate
                    virgil_wall Level 1
                    Oh good grief.....
                    This has nothing to do with Flex Builder after all. I just got busted by the normal flash framerate mess. Setting the framerate and launching from Flex Builder does indeed set the framerate... I just didn't know this since every time I launch from Flex builder I launch in either internet explorer or firefox... and the framerate values I was testing with were 24 and 30....

                    Well 24 and 30 produce no measurable framerate differences when running under either of these browsers. (They both result in around 22 fps measured). When I launch the .swf under the flash player directly, I naturally get pretty close to 30 fps measured. If I test with 24fps and say 100fps, then I notice framerate increases when launching under FlexBuilder.

                    So this is just the 'normal' sad state of affairs for flash framerates, not a flex builder issue at all.
                    • 7. Re: framerate
                      tinylion_uk Level 2

                      well i had fun thinking about it anyway. :-)