Reputation: 1467
How to pause flash application in browser if there isn't any buttons that would allow it ?
Upvotes: 1
Views: 11980
Reputation: 811
Well, there is a website, there is a swf file, i want to pause it.
Do you have access to these files and their source? Is it on the same domain?
Anyway, the previous two answers suggested wrapping the swf with another Flash application and then setting the framerate to 0. That's not accurate, because the minimum framerate you can set is 0.01. Flash code is built around the framerate, it makes sense. http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Stage.html#frameRate
If you have access to the original files you want to pause, the proper way to accomplish this would be through ExternalInterface
http://www.viget.com/inspire/bi-directional-actionscript-javascript-communication/
Upvotes: 3
Reputation: 3045
Your question is a little vague, I'm a little confused at exactly what you want. I did find something that MIGHT help in this question. But here's what I saw that might help you out:
Embed an swf, that'll load the game. Then you'll be able to have some control, because the loaded SWF is running in the same instance as the loading SWF. For most games, it should suffice setting the frame rate to 0.
So setting the frame rate to 0 is essentially pausing it... But I would be able to provide a more detailed answer if you clarify your question a bit more.
Upvotes: 0
Reputation: 15338
yes by adding this stage.frameRate = 0;
Pause-Game-Using-stage-framerate
Upvotes: 2