Jump to content
GreenSock

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

Mediamonkey

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Mediamonkey

  1. Hi,

     

    I noticed that a crash occurs when I use multiple FlexTransformManager components in a ViewStack or TabNavigator.

    Here's the undefined error:

    undefined
    at mx.geom::Transform/set matrix()[E]
    at gs.transform::TransformManager/updateSelection()[src\gs\transform\TransformManager.as:1009]
    at Function/gs.transform:TransformManager/private:enforceSafetyZone/gs.transform:shiftSelectionScale()[src\gs\transform\TransformManager.as:592]
    at gs.transform::TransformManager/enforceSafetyZone()[src\gs\transform\TransformManager.as:544]
    at gs.transform::TransformManager/setOrigin()[src\gs\transform\TransformManager.as:514]
    at gs.transform::TransformManager/centerOrigin()[src\gs\transform\TransformManager.as:652]
    

     

    It seems related to fetching the transform.matrix in UIComponent.

    [*]You can easaly replicate this problem by setting up a Flex project (3.6 or 4.6, doesn't matter)

    [*]Add 2 FlexTransformManager components in a ViewStack or TabNavigator

    [*]Add an image to both

    [*]Now you can select the image with the mouse in the first tab, but it will crash when selecting the image in the second tab.

     

    Is this a known problem and do you have a solution?

    For now I'll build a fake viewstack that looks and behaves the same.

     

    Cheers, Bart

  2. Hi Jack,

     

    I've encountered a bug with the scaleFromCenter property.

    I'm using the FlexTransformManager in, you guessed it, Flex.

    Nothing fancy, I just set the property to false.

     

    You can view my app here: http://bikewear.j-db.nl/demo5

     

    Steps to reproduce with an image:

    [*]Upload an image, wait for it (no progressBar yet)

    [*]Scale the image

     

    Steps to reproduce with a TextField (Label component):

    [*]Type in a text and press the button at the bottom ("Toevoegen")

    [*]Scale the label

     

    The image isn't much of a problem, but when the label is scaled, it animates very strangely.

    There's not much on my side happening, as you can see:

    var label:Label = new Label();
    label.text = text;
    manager.addChild(label);
    manager.selectItem(label);

  3. 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;

×