FlashDevelop Fabrication Templates and Video Tutorial · Jun 12, 06:16 PM

These FlashDevelop templates will help you setup the folder and file structure of your Fabrication for PureMVC project. If you’re not using FlashDevelop, it’s actually pretty easy to convert these template files to the development environment of your choice (just open them in a text editor).

Overview

The templates are:

  • AS3 Shell Project
  • Flash CS3 Module Project – This is a Pure AS3 project that imports a Flash CS3-compiled SWC.
  • AS3 Module Project – Very similar to the CS3 Module Project, without the CS3 part.

Download

Download FlashDevelop Templates for Fabrication

Install

  • Extract the zip file and then copy the three template folders to your FlashDevelop Projects folder (ussually C:\Program Files\FlashDevelop\Projects).
  • In FlashDevelop, goto Tools>Code Snippets and create a new snippet named fab-loadFlashModule:
    Download the snippet: fab-loadFlashModule.txt
    1. // Note: make sure you import the Event, Loader, UrlRequest, FlashApplication classes
    2. private var $$(ModuleName)_loader:Loader;
    3. private function load$$(ModuleName)():void {
    4. $$(ModuleName)_loader = new Loader();
    5. $$(ModuleName)_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded$$(ModuleName));
    6. $$(ModuleName)_loader.load(new URLRequest( "$$(FileName)" ));
    7. }
    8.  
    9. private function loaded$$(ModuleName)(event:Event):void {
    10. trace("Loaded Module: $$(ModuleName)");
    11. var content:FlashApplication = $$(ModuleName)_loader.content as FlashApplication;
    12. content.router = applicationRouter;
    13. content.defaultRouteAddress = applicationAddress;
    14.  
    15. $$(TargetObject).addChild(content);
    16.  
    17. $$(ModuleName)_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, loaded$$(ModuleName));
    18. $$(ModuleName)_loader = null;
    19. }
    20.  
    21. Download this code: /files/fab-loadFlashModule.txt

Video Tutorial

Video Tutorial: Fabrication Template for FlashDevelop from Gil Birman on Vimeo.

— Pickle

---

Comment

Textile Help