Show SWFProfiler on start
♥21 |
Line 20 |
Modified 2009-05-13 23:38:00 |
MIT License
archived:2017-03-05 21:13:20
ActionScript3 source code
/**
* Copyright beinteractive ( http://wonderfl.net/user/beinteractive )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/8hhA
*/
package
{
import flash.display.Sprite;
import flash.display.InteractiveObject;
import flash.events.ContextMenuEvent;
import flash.events.IEventDispatcher;
import com.flashdynamix.utils.SWFProfiler;
public class ShowSWFProfiler extends Sprite
{
public function ShowSWFProfiler()
{
setupSWFProfiler(this);
}
private function setupSWFProfiler(context:InteractiveObject):void
{
SWFProfiler.init(context);
(context.contextMenu.customItems[0] as IEventDispatcher).dispatchEvent(new ContextMenuEvent(ContextMenuEvent.MENU_ITEM_SELECT));
}
}
}