Show SWFProfiler on start
/**
* 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));
}
}
}