1 Reply Latest reply on Oct 15, 2008 2:58 AM by Nisim Joseph

    how to change Flex Application frame rate at runtime

    Nisim Joseph
      hello,

      i have Flex application that need to change the Frame Rate at runtime.
      when i am changing it by using the slider component, here the code:

      private function onChangeSlider(e:Event):void
      {
      frameRate = sliderFR.value;
      trace(frameRate);
      }
      <mx:HSlider id="sliderFR" x="452" y="765" width="378.2" minimum="1" maximum="50" liveDragging="true" snapInterval="1" value="25" change="onChangeSlider(event)"/>

      the value is changed, but the frame rate is not changed.
      when i insert the binding to the <Application> tag i got error on this one, because i can't bind there items for the application level.
      how can i change the Flex frame rate at runtime?

        • 1. Re: how to change Flex Application frame rate at runtime
          Nisim Joseph Level 1
          i found the solution!
          in Flex application you have frameRate properties that doesn't work at runtime in the ActionScript code.
          if you have a video that you want to change the speed of it, you need to change the stage.frameRate (of all the Player itself). and there is a catch here. if you will try to change it right after the application will start (like in: creationComplete event) you will have a runtime error.
          what you need to do is, change the stage.frameRate value after the all application is started from a button or other event in the system.
          this is working grate for fast/slow FLV playing

          enjoy!