Packagecom.distriqt.extension.forcetouch
Classpublic final class ForceTouch
InheritanceForceTouch Inheritance flash.events.EventDispatcher

This class represents the ForceTouch extension. On supported iOS 9+ devices with 3D touch and Android API 25+, you have the ability to utilise 3D force / pressure touch events, and Application shortcut items



Public Properties
 PropertyDefined By
  implementation : String
[read-only] The implementation currently in use.
ForceTouch
  instance : ForceTouch
[static] [read-only]
ForceTouch
  isSupported : Boolean
[static] [read-only] Whether the current device supports the extensions functionality
ForceTouch
  nativeVersion : String
[read-only] The native version string of the native extension.
ForceTouch
  service : ForceTouch
[static] [read-only] The singleton instance of the ForceTouch class.
ForceTouch
  shortcuts : ApplicationShortcuts
[read-only] Access to the application shortcuts functionality
ForceTouch
  version : String
[read-only] The version of this extension.
ForceTouch
Public Methods
 MethodDefined By
  
Constructor You should not call this directly, but instead use the singleton access
ForceTouch
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
[override]
ForceTouch
  
Deprecated: Use ApplicationShortcuts functionality via ForceTouch.instance.shortcuts.addDynamicShortcut()
ForceTouch
  
dispose():void
Disposes the extension and releases any allocated resources.
ForceTouch
  
Enables force touch for UI touch events on the application Once enabled, listen for ForceTouchEvent class events to get feedback about 3d touch
ForceTouch
  
init(key:String):void
Deprecated: You no longer need call this function or use an application key
[static] Initialises the extension class for use with the provided key.
ForceTouch
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
[override]
ForceTouch
  
removeShortcutItem(type:String):void
Deprecated: Use ApplicationShortcuts functionality via ForceTouch.instance.shortcuts.removeDynamicShortcut()
ForceTouch
Events
 Event Summary Defined By
   ForceTouch
   ForceTouch
   ForceTouch
Public Constants
 ConstantDefined By
  EXT_CONTEXT_ID : String = com.distriqt.ForceTouch
[static]
ForceTouch
  VERSION : String = 3.2.0
[static]
ForceTouch
Property Detail
implementationproperty
implementation:String  [read-only]

The implementation currently in use. This should be one of the following depending on the platform in use and the functionality supported by this extension:


Implementation
    public function get implementation():String
instanceproperty 
instance:ForceTouch  [read-only]


Implementation
    public static function get instance():ForceTouch
isSupportedproperty 
isSupported:Boolean  [read-only]

Whether the current device supports the extensions functionality


Implementation
    public static function get isSupported():Boolean
nativeVersionproperty 
nativeVersion:String  [read-only]

The native version string of the native extension.


Implementation
    public function get nativeVersion():String
serviceproperty 
service:ForceTouch  [read-only]

The singleton instance of the ForceTouch class.


Implementation
    public static function get service():ForceTouch

Throws
Error — If there was a problem creating or accessing the extension, or if the key is invalid
shortcutsproperty 
shortcuts:ApplicationShortcuts  [read-only]

Access to the application shortcuts functionality


Implementation
    public function get shortcuts():ApplicationShortcuts
versionproperty 
version:String  [read-only]

The version of this extension.

This should be of the format, MAJOR.MINOR.BUILD


Implementation
    public function get version():String
Constructor Detail
ForceTouch()Constructor
public function ForceTouch()

Constructor You should not call this directly, but instead use the singleton access

Method Detail
addEventListener()method
override public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
useWeakReference:Boolean (default = false)

addShortcutItem()method 
public function addShortcutItem(item:ApplicationShortcut):String
Deprecated: Use ApplicationShortcuts functionality via ForceTouch.instance.shortcuts.addDynamicShortcut()

Parameters

item:ApplicationShortcut

Returns
String
dispose()method 
public function dispose():void

Disposes the extension and releases any allocated resources. Once this function has been called, a call to init is neccesary again before any of the extensions functionality will work.

enableForceTouch()method 
public function enableForceTouch():void

Enables force touch for UI touch events on the application

Once enabled, listen for ForceTouchEvent class events to get feedback about 3d touch

init()method 
public static function init(key:String):void
Deprecated: You no longer need call this function or use an application key

Initialises the extension class for use with the provided key.

Parameters

key:String


Throws
Error — If there was a problem creating or accessing the extension, or if the key is invalid
removeEventListener()method 
override public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)

removeShortcutItem()method 
public function removeShortcutItem(type:String):void
Deprecated: Use ApplicationShortcuts functionality via ForceTouch.instance.shortcuts.removeDynamicShortcut()

Parameters

type:String

Event Detail
forceTouch:touch:end Event
Event Object Type: com.distriqt.extension.forcetouch.events.ForceTouchEvent
ForceTouchEvent.type property = com.distriqt.extension.forcetouch.events.ForceTouchEvent.ENDED

forceTouch:touch:maxPress Event  
Event Object Type: com.distriqt.extension.forcetouch.events.ForceTouchEvent
ForceTouchEvent.type property = com.distriqt.extension.forcetouch.events.ForceTouchEvent.MAX_PRESS

forceTouch:touch:press Event  
Event Object Type: com.distriqt.extension.forcetouch.events.ForceTouchEvent
ForceTouchEvent.type property = com.distriqt.extension.forcetouch.events.ForceTouchEvent.PRESS

Constant Detail
EXT_CONTEXT_IDConstant
public static const EXT_CONTEXT_ID:String = com.distriqt.ForceTouch

VERSIONConstant 
public static const VERSION:String = 3.2.0