How to change the frame rate of a SWF file using as3? - actionscript-3

I have a flex application which loads the swf files using SWFLoader and i have set the frame rate of the application 60.When i load a swf file it is playing vary fast,I think this is happening for the application frame rate.I want the frame rate of application to be 60 and the swf which i have loaded must be at lower frame rate. Is it possible?

No it's not possible, there can be only one framerate at all time for the whole app and any loaded swf will use that same framerate. You can change the framerate for playing those swf and restore the normal framerate when done or you can create a class that will play those swf in time based framerate.

Related

how to detect the end of an external SWF (SWF PPT, Captivate AS3)?

I'm having a small (big) problem, need to know exactly when actions take place in an external SWF, but not a common but a SWF SWF exported from Captivate, I've created a function that loads and transforms it into MC, but the totalFrames use the function, the number 30 is always the same SWF not ending in frame 30, as knowing that the swf was finalized?
If you're talking about end of external SWFs animation, you could add frame script to the last frame making it dispatch an event that would notify you that the animation is over.
More about adding frame script: http://www.as3dp.com/2009/09/a-closer-look-using-movieclipaddframescript/
More on dispatching events: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/EventDispatcher.html

Embedded SWF: Finding the framerate of the child SWF

I have a program that dynamically loads SWFs a user has uploaded to a server into another, larger, SWF. This means the embedded SWF can be any framerate and I have no control or knowledge of what is being uploaded.
What I want to do is show a message to the user that the framerate does not match the parent SWFs framerate and that it might playback too quickly or slowly.
However, when I try to find the framerate (using swfLoader.loaderInfo.frameRate) it only displays the parent's framerate, because the child's has been changed.
I need a way to find the framerate the original child SWF was set to before it was changed by the parent.
I tried going to Google for this issue, but nothing turned up a working solution to this problem.
You should use contentLoaderInfo.frameRate instead.

How to create play and pause in SWF Format?

I am beginner to Flash.
I am having a SWF Format, I have to keep that in my html page like a video. I need a play and pause button in that video.
Thank you.
SWF file is time line based, even if you convert a movie from AVI to SWF generally there is some sort of key frames.your converting program will offer the properties of this inside the software
Easier way to control a SWF movie would be to embed your FLV into the SWF, than add key frames manually. then you can control from a parent SWF with timeline control
If your just playing a movie file in flash , it may be better to use "net-stream" this will allow you to have also full control over the movie file using cue points, this has other advantages ....quicker loading times, as the whole file would not have to be downloaded first as it allows streaming / Buffering. Using cue points has the same ability as key frames.
so your pause and play button is dependent on how you implement your video

How to constrain loaded swf?

I load swf files continuously, but if one of the swfs has some defective code such as Mouse.hide() the mouse disappears when the swf is loaded. I want to constrain such malicious code in loaded swfs.
There is also another problem related to containing loaded or loading swfs. When I load a swf which loads another swf to operate, It never completes loading (Event.Complete of contentLoaderInfo) because it needs another swf to load. However, the swf should be loaded before it runs. Since loaded swf is as-2, loader does not give any error. I am also suspicious whether or not it will give error if it is as-3.
Check the LoaderMax classes from greensock.com . This should help solve the problem of swf loading other swf before running, since you can listen to the overall loading progress and react accordingly.

Loaded object in ActionScript3 with higher FPS

How can I load a swf in ActionScript 3 with a higher fps than the instance doing the loading with Loader?
Thanks!
I see this question quite a bit,
Unfortunately I have to tell you there is no way to play an externally loaded SWF at a different frame rate than the one doing the loading. There is only ever one stage instance (the one in the parent SWF). When you load another external SWF it is treated like any other MovieClip in the display list.
Tyler.