PackageTop Level
Classpublic class Plugin

Represents a plugin object. You do not need to directly create an instance of it. Instead, directly use the methods and properties of the plugin global object.

This class dispatches the following events:

NameTypeDispatched...
preferenceChangePreferenceChangewhen the preferences of the plugin have been changed

See also

Global.plugin


Public Methods
 MethodDefined by
  
addEventListener(eventName:String, callback:String):void
This method lets you register event listener functions with the specified control or object.
Plugin
  
getDirectory():String
Gets the plugin directory.
Plugin
Method detail
addEventListener()method
public function addEventListener(eventName:String, callback:String):void

This method lets you register event listener functions with the specified control or object. The event listener functions always receive an event object as a parameter. This event has, among other, a sender property which is a reference to the object that has dispatched the event. This object may also have additional properties which depend on the the event.

Parameters
eventName:String — The event you wish to listen to.
 
callback:String — The Lua function to call when the event is triggered.
getDirectory()method 
public function getDirectory():String

Gets the plugin directory.

Returns
String — The plugin directory.