Roy Tang
Roy Tang

Reputation: 5761

Different framerate for loaded SWF file in Flex?

Using The loader class of Adobe Flex, I load an external SWF file. However, the loaded SWF file has a different frameRate than my application.

Is it possible to have both the parent app and the loaded child app playing at different framerates? If so, how?

Upvotes: 0

Views: 3291

Answers (2)

defmeta
defmeta

Reputation: 1322

If you decide to use events to drive your swf in order to approximate different frame rates I'd recommend using a tween engine like TweenLite/TweenMax.

It's free (as in beer) and I've used it very successfully for frame based tweening in the past.

Upvotes: 1

grapefrukt
grapefrukt

Reputation: 27045

It's not possible.

Flash Player or Adobe AIR only uses a single frame rate for all loaded SWF files at any one time, and this frame rate is determined by the nominal frame rate of the main SWF file

There are two ways around this, change the framerate of the main swf to match the loaded one (this can be done during runtime) or decouple the animation from actual frames and use events to step it forward.

Upvotes: 5

Related Questions