Richard Parnaby-King
Richard Parnaby-King

Reputation: 14862

Flash frame-rate is different in browser than it is in flash player

I am using Flash CS4 and when testing my application my frame rate changes as it is programmed to do so. When I try to run the application in a browser (tried Firefox 4, Opera 10.5 and IE 8) the frame rate does not change.

Why does the frame-rate not change? How do I fix it?

Upvotes: 0

Views: 2709

Answers (2)

scriptocalypse
scriptocalypse

Reputation: 4962

The newest Flash Players are capped at a maximum of 60fps, no matter what number you use to set the framerate. That could be one issue... But if objects on the screen are slowing down there's nothing to be gained by changing the framerate. It means that your swf isn't well optimized, and the player is struggling to render the assets.

Upvotes: 1

chamberlainpi
chamberlainpi

Reputation: 5241

Set your HTML so that the Flash Object's wmode is "opaque" (or transparent if you really need to). If you don't specify it, it will interpret it as some other default parameter which gives you that drop in frame-rate performance.

Sample:

<object type="application/x-shockwave-flash" data=
 "YourFlashMovie.swf" width="640" height="480"
 id="flash_id_1" style="visibility: visible;">
  <param name="allowScriptAccess" value="always" />
  <param name="allowScale" value="never" />
  <param name="allowFullScreen" value="true" />
  <param name="wmode" value="opaque" /> <!-- THIS IS WHAT YOU MUST SET -->
  <param name="quality" value="high" />
  <param name="scale" value="" />
  <param name="scaleMode" value="" />
  <param name="menu" value="false" />
</object>

Hope that helps.

Upvotes: 1

Related Questions