The BEST Profiler for Flash

With more than 10 innovative profiler tools, The Miner is the most complete solution for optimizing Flash content. Using a lightweight immersive approach, this profiler can hook on anything made in flash, which let you profile and debug anytime, as needed.

Tutorial: TheMiner integration in FlashDevelop

Tutorial made by focus

This tutorial assumes you're familiar with both TheMiner and FlashDevelop (best and free Action Script / haXe code writing IDE) and wish to use them in conjunction with each other.

There are two common ways using TheMiner in the FlashDevelop:

  • Using TheMiner as SWC, like any other external library
  • Adding TheMiner's swf to the FlashDevelop profilers list

  • Why always not to use only one way? Because both have their pros and cons.
    So, let's try out both ways step-by-step. Please, start the FlashDevelop and create or open the as3 project to proceed further.

    TheMiner as external SWC

    1. First of all, purchase TheMiner or download a free version for the non-commercial usage.

    2. Unpack given archive, go into the "SWCs" folder and select desired SWC with translation you prefer, as example, select the TheMiner_en_v1_3_10.swc

    If you're familiar with SWC using in FlashDevelop, skip next two paragraphs of this tutorial and go right to the par. 5.

    3. Copy-paste selected swc in the "lib" folder of your project (or in any other location in your project or even PC you prefer to store external libraries).

    4. Add pasted SWC to the project's library using "Add To Library" context menu item.

    5. To run TheMiner, you should add its panel to the DisplayList first. Choose the wise place in your project where to add it (it could be a place where you're set up the stage) and write there a few lines of code.

    // first, we should import TheMiner class, so add this line to the imports:
    import com.sociodox.theminer.TheMiner;
    //after you're free to add TheMiner's panel
    stage.addChild(new TheMiner());

    Whole sample working code could be like this:
    	import com.sociodox.theminer.TheMiner;
    	import flash.display.Sprite;
    	 * ...
    	 * @author focus
    	public class Main extends Sprite 
    		public function Main():void 
    			if (stage) init();
    			else this.addEventListener(Event.ADDED_TO_STAGE, init);
    		private function init(e:Event = null):void 
    			this.removeEventListener(Event.ADDED_TO_STAGE, init);
    			this.addChild(new TheMiner());

    As you can see, we're passing true to the TheMiner's constructor. It's needed to be passed in any case of SWC using. This argument is present there due to the compatibility with swf TheMiner version (we'll speak about swf version further) and probably will be deprecated in a future TheMiner versions.

    Hey, that's all about using TheMiner as SWC! As you can see, it's pretty simple and easy to set up TheMiner right in your SWF using the SWC approach.
    Compile your project, run it in the debug Flash Player (by default in FlashDevelop) and you'll see TheMiner in action!

    So, in what cases should we prefer TheMiner as SWC over TheMiner as FlashDevelop profiler?
  • if we wish to be able to run TheMiner anywhere our SWF is run under debug Flash Player or debug AIR, including the mobile devices
  • if we wish to have an additional control on when to show TheMiner
  • if we wish to be able to interact with TheMiner for more flexible and efficient profiling

  • TheMiner as FlashDevelop profiler

    1. First of all, purchase TheMiner or download a free version for the non-commercial usage.

    2. Unpack given archive, go into the "SWFs" folder and select desired SWF with translation you prefer, as example, select the TheMiner_en_v1_3_10.swf

    3. Place that SWF anywhere on your PC, and remember the path for it. For example, path will be "D:\Programming\Flash\Tools\TheMiner.swf".

    4. Open the "Tools->Program Settings" menu item in the FlashDevelop.

    5. Go to the AS3Context plugin settings and look there for the Custom Profilers item.

    6. Press the "..." button at the right from the Custom Profilers item and paste path to the TheMiner swf in the opened window as new line and press OK.
    (sorry for Russian texts)

    7. Close the Settings window and press on the "SWF Profiler" button on the toolbar (or to the "View" menu subitem with the same name).

    8. Press and hold the "Active Profiler" button at the opened "Profiler" window left side and select "TheMiner" item in the dropped menu.

    9. Press the "Auto-start Profiler" button if it's red now to make it green and to enable TheMiner auto starting with compiled SWF.

    That's all - now you could compile your project and see TheMiner running!

    This way of TheMiner using in the FlashDevelop may seem not so fast to set up as using TheMiner SWC, but you should make all this steps only once! Next time you'll need to add TheMiner in your project all you need is just to ensure Auto-start profiler is enabled and compile your project!

    So, in what cases should we prefer TheMiner as FlashDevelop profiler over TheMiner as SWC?
  • if we don't need TheMiner to be included in our SWF / app after publishing / leaving FlashDevelop
  • if we wish to have very easy set up after first time without adding anything to the project code and keep the project clean from additional SWCs