Skip to content

Instantly share code, notes, and snippets.

@mimshwright
Created March 15, 2010 01:43
Show Gist options
  • Select an option

  • Save mimshwright/332408 to your computer and use it in GitHub Desktop.

Select an option

Save mimshwright/332408 to your computer and use it in GitHub Desktop.
Solves the lack of interface for DisplayObject
package
{
import flash.display.DisplayObject;
/**
* An interface to work around the lack of interface for display objects.
*/
public interface IDisplayObject
{
/**
* Returns a representation of the object as a DisplayObject.
* Usually would return the object itself.
*/
function asDisplayObject():DisplayObject;
// function get view():DisplayObject; //would work too if you're into the whole brevity thing.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment