Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Mediamonkey

Full import paths speed up compiling [SOLVED]

Recommended Posts

Hi Jack,

 

I've noticed you have a habit of importing entire packages. I'm not sure what software you use, but when working with Flex, writing out the imports will speed up compiling (when not all classes in a package are used, ofcourse). Compiling my project with full import paths results in about 5 seconds less compiling time.

 

As a favor, underneath are the imports. Also, I was missing event metadata in the FlexTransformManager, which make using your manager a lot easier. So I've added that as well.

 

// ---- FlexTransformManager ----

import flash.display.DisplayObject;
import flash.events.Event;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.utils.getDefinitionByName;

import gs.events.TransformEvent;

import mx.containers.Canvas;
import mx.core.UITextField;

[Event(name="move", type="gs.events.TransformEvent")]
[Event(name="scale", type="gs.events.TransformEvent")]
[Event(name="rotate", type="gs.events.TransformEvent")]
[Event(name="select", type="gs.events.TransformEvent")]
[Event(name="mouseDown", type="gs.events.TransformEvent")]
[Event(name="selectMouseDown", type="gs.events.TransformEvent")]
[Event(name="selectMouseUp", type="gs.events.TransformEvent")]
[Event(name="delete", type="gs.events.TransformEvent")]
[Event(name="selectionChange", type="gs.events.TransformEvent")]
[Event(name="deselect", type="gs.events.TransformEvent")]
[Event(name="clickOff", type="gs.events.TransformEvent")]
[Event(name="update", type="gs.events.TransformEvent")]
[Event(name="depthChange", type="gs.events.TransformEvent")]
[Event(name="destroy", type="gs.events.TransformEvent")]

// ---- TransformManager ----

import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.Graphics;
import flash.display.Shape;
import flash.display.Sprite;
import flash.display.Stage;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.geom.Matrix;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.text.TextField;
import flash.ui.Keyboard;
import flash.ui.Mouse;
import flash.utils.Dictionary;
import flash.utils.getDefinitionByName;

import gs.events.TransformEvent;
import gs.transform.utils.MatrixTools;

// ---- TransformItem ----

import flash.display.DisplayObject;
import flash.display.Graphics;
import flash.display.InteractiveObject;
import flash.display.Sprite;
import flash.display.Stage;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.MouseEvent;
import flash.geom.Matrix;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextLineMetrics;
import flash.utils.getDefinitionByName;

import gs.events.TransformEvent;
import gs.transform.utils.MatrixTools;

Link to comment
Share on other sites

Thanks for the suggestion. I incorporated the changes in the latest files.

 

Cheers!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×