Widget.onDropString

Availability

Flash Player 7 + TheSpringBox V1

Usage

Widget.onDropString = function(str:String) : Void {
// your statements here
}

Parameters

str - The String that was dropped on the widget.

Returns

Nothing.

Description

Event handler; an event handling function called when a string is dropped into a window. This event is also fired when a internet shortcut is dropped on the window; in this case the string will be the url to which the internet shortcut points.

Example 1

The function below could be used to handel a dropped string for a text document:

Widget.onDropString = function(text:String) {
  //Translate the dropped string into another language
  myTranslater.setText(text);
  var germanText:String = myTranslater.translateTo("german");
  txtOutput.text = germanText;
};
    

Example 2

The function below could be used to handel a dropped string that refers to an XML file:

Widget.onDropString = function(xmlUrl:String) {
  //load the XML file
  myXml.load(xmlUrl);
};