
Question:
How can I ensure that the <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/ThrottleEvent.html" rel="nofollow">ThrottleEvent</a> is supported by the current used browser?
I can see that they mention some browsers which support it:
<blockquote>The platforms that support throttling and pausing are currently the following: Flash Player Desktop Mac and Windows, AIR Mobile, and Flash Player Android. The following platforms do not dispatch the ThrottleEvent automatically because they do not yet support pausing or throttling: AIR for TV devices, AIR for desktop, and Flash Player Linux Desktop.
</blockquote>But I don't think that I can check specifically for each one of them (I guess there are edge cases too).
I'd like to do something like this:
package
{
import flash.display.MovieClip;
import flash.external.ExternalInterface;
import flash.events.ThrottleEvent;
import flash.events.ThrottleType;
public class TestThrottle extends MovieClip
{
public function TestThrottle()
{
var throttlingIsEnabled = ???
ExternalInterface.call('throttlingSupported', throttlingIsEnabled);
}
}
}
Do you know a way how I could achieve this?
Answer1:As you mentioned in your question :
<blockquote>The platforms that support throttling and pausing are currently the following: Flash Player Desktop Mac and Windows, AIR Mobile, and Flash Player Android. ...
</blockquote>And as you are writing for Flash Player, so you have just to verify if it's Flash Player Desktop Mac or Windows to know if throttling and pausing are supported, and you can verify that using <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Capabilities.html" rel="nofollow">flash.system.Capabilities
</a> especially <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Capabilities.html#version" rel="nofollow">Capabilities.version
</a>, <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Capabilities.html#os" rel="nofollow">Capabilities.os
</a> and <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Capabilities.html#playerType" rel="nofollow">Capabilities.playerType
</a>.
Hope that can help.