Skip to main content
SSSSSSBenay
Known Participant
July 30, 2017
Answered

Parent SWF not recognizing loaded Child SWF's frameRate

  • July 30, 2017
  • 1 reply
  • 635 views

Hello Friends– I am having an issue that I hope will be a breeze to solve for some of you more experienced developers out there:

I have "swf A" with an external document class.

I am loading "swf A" into "swf B" at a specific frame using this code on the timeline:

var fl_Loader6:Loader;

fl_Loader6 = new Loader();

fl_Loader6.load(new URLRequest("Lesson6_Erinbball_test.swf"));

addChild(fl_Loader6);

fl_Loader6.x=0;

fl_Loader6.y=0;

"Swf A" needs to have a frame rate of 60 fps. "Swf B" needs to have a frame rate of 24 fps. When I load A into B, the child automatically takes on the parent's frame rate and "swf A" plays at 24 fps. This is the case even when I add this code to the external document class of A:

[SWF(frameRate='60')]

Now, I have been using an easy work-around to this issue by placing this code on the specific frame of B where A is loaded:

stage.frameRate=60;

Then I place this code on the frames before and after "swf A" is loaded, to return "swf B" to its normal speed as the user navigates frames (the user navigates through the frames of B using arrow buttons):

stage.frameRate=24;

However, "swf B" is loaded into another file "swf C" using the same type of timeline code at the beginning of this post, and again the frame rate specified in both "swf A" and "swf B" are lost in "swf C" and everything plays at the new parent (C) speed of 24 fps. I am unable to use the 'stage.frameRate=60;' in this situation because "swf B" is a multi-framed, interactive animation, and I do not want the entire movie to play at 60 fps, simply one frame within "swf B."

I am using a Mac, and the strange part of all this is that my colleague, who uses a PC, does not have this issue. When publishing the .fla file to a Windows .exe, her projector does indeed play the different frame rates correctly.

I am aware that there may be a larger "bug" behind this, but I am really just looking for some type of work-around in order to have "swf C" read the changing frame rate of "swf B" which, on one specific frame, is reading the frame rate of a loaded "swf A."

I thought a sure solution would be to set the frame rate of "swf A" within its external document class, but like I mentioned above, I tried this without success.

I hope I have described my issue clearly, and I thank everyone in advance who have time to offer me some help! As we all know, being stuck on something like this for days is very frustrating (and tiring!).

THANK YOU!

This topic has been closed for replies.
Correct answer robdillon

You can't have multiple simultaneous frame rates with the Flash Player. It will only play your contents at one frame rate. As you've found, you can change the frame rate, but that frame rate applies to everything that is playing. The only solution that I know of is to export the contained .swf as a video file and play the video version. This will only work if your .swf is not interactive and just plays end to end.

1 reply

robdillon
robdillonCorrect answer
Participating Frequently
July 30, 2017

You can't have multiple simultaneous frame rates with the Flash Player. It will only play your contents at one frame rate. As you've found, you can change the frame rate, but that frame rate applies to everything that is playing. The only solution that I know of is to export the contained .swf as a video file and play the video version. This will only work if your .swf is not interactive and just plays end to end.

SSSSSSBenay
Known Participant
July 31, 2017

Hi robdillon– Thank you so much for your time and input.