Jump to content
Search Community

sonicworks

Members
  • Posts

    18
  • Joined

  • Last visited

Posts posted by sonicworks

  1. Hi,

     

    I've used GSAP it since tweenlite came out for flash and had various memberships over the years. I have just started a project that I would like to use GSAP JS for. The end product will be a mainly (not totally) subscription based education game. I'm a contractor and not an employee of the end company. 

     

    If I bought the business never ending license would the end company be able to use it forever without worry about the license.

     

    or

     

    Would I need to get them to buy the license so they can use it. This means as a contractor I'd have to buy it for each project if the end product was a subscription model.

     

    Hope that makes sense.

     

    Tim

  2. Yes unfortunatly that doesn't work, maybe I should have mentioned I'm using Flex... ;)

     

    One thing that does work is to click on another web browser window then click the app browser again. (lets the browser loose then regain focus).

     

    Work around

    I've added 'Application.application.stage.focus = null;' to run when the ESC key is pressed in the text area. Then the user can move the text box around with the cursors.

     

    Tim

  3. Hi,

     

    I was having a little trouble when adding an image to the crop where it disapeared.

     

    -------------------------------------------------------

    var image1:Image = new Image;

    image1.source="1.jpg";

    myTransManager.addChild(image1);

    var mc1Crop:FlexCrop = new FlexCrop(videoStageObject, myTransManager.manager);

    -------------------------------------------------------

     

    I had an idea that it's a usual flex issue where the image Display object isn't ready yet. solved by....

    -------------------------------------------------------

    var image1:Image = new Image;

    image1.source="1.jpg";

    myTransManager.addChild(image1);

    TweenLite.delayedCall(1, addCrop, [image1]);

     

    private function addCrop(imageDO:DisplayObject):void{

    var mc2Crop:FlexCrop = new FlexCrop(imageDO, myManager.manager);

    }

    -------------------------------------------------------

     

    It works, but is there a neater way?

     

    Hope this helps someone

  4. Hi,

     

    Hopefully a quick question. I'm using the 'FlexTransformManager' and wanted to tryout the new 'FlexCrop' feature. My current cropper works ok but your seems like it could be a bit tidier.

     

    When I use the FlexCrop it's typed to use the 'TransformManager' not it's flex version which I'm using in my app

     

    var mc1Crop:FlexCrop = new FlexCrop(mc1, flexTransformManager);

     

    Am I doing something stupid?

     

    Thanks

  5. Hi, thanks for the clue, you are correct it is Flex bug.

     

    I solved it by overriding the focusManager class and setting the override as the new focus manager for the application

     

    private function onPreinitialize():void

    {

    this.focusManager = new FocusPaneOverride(this);

    }

     

     

     

     

    package ..............

    {

     

    import mx.managers.FocusManager;

    import mx.managers.IFocusManagerContainer;

    import flash.display.Sprite;

     

    public class FocusPaneOverride extends FocusManager

    {

     

    public function FocusPaneOverride(container:IFocusManagerContainer, popup:Boolean = false){

    super(container,popup);

    }

     

    override public function get focusPane():Sprite{

    var fp:Sprite = super.focusPane;

    if (fp && fp.numChildren != 0)

    fp.getChildAt(0).rotation = 0;

     

    return super.focusPane;

    }

     

    }

    }

  6. Ok I've found a very simple solution for a non destuctive (transformable) crop in Flex.

     

    Each image added to stage is should be contained within a 'Canvas' component. This canvas compoent can be transformed as normal with the transform manager which scales and rotates correctly.

     

    When you need to crop the contained image either move the contained image left or above the canvas (cropping the left and the top of the image repectivly) and/or reduce the width or height of the Canvas to crop the right and bottom of the contained image.

     

    That's pretty much it, no messing about with copyPixels and BitmapData like I started to do!

     

    Hope it helps someone else out.

     

    Tim

     

    If things start to get really complicated, your'e probably doing it the wrong way

  7. Hi again,

     

    I've come to the conclusion that my cropping tool isn't really a 'cropping' tool, but more of a resizable mask for the transform object. This is because it's based on standard libabary graphic (jpg and swf) assets and I don't want to save bitmap data back to the server for saving (just the resized mask info so I can recreate it on load form the standard library asset).

     

    So..

     

    If I create 2 layers within a container object that is a transform item (SkinnableContainer in Flex??). The top layer in the container as the mask and the bottom one as the original asset. Can I get the transformer to only snap to the mask layer size and not the larger original asset underneath. This will give me a non destructive crop/mask tool.

     

    also.. What’s the best/lightest container for layers of graphics in Flex 3.5 and Flex 4? Any ideas?

     

    Thanks!

  8. Hi,

     

    I'm just at the thinking stage of developing a tool that as well as transforming can also crop an image. A neat way of doing this (visually) maybe to use the transformer box and handles but maybe changing their behaviour with a 'crop' switch, turning the transformer box and handles red. Then the handles can be used to crop the image.

     

    Has anyone any ideas the best way to combine the transformer with a crop behaviour, could I use the AutoFitArea Class?

     

    Thanks, any ideas would be very welcome

     

    Tim

  9. Hi,

     

    Ye,s in he end I created a unique reference for the display objects name. (using this class http://www.rgbeffects.com/blog/developm ... rs-in-as3/)

     

    I can then tie together my array of display object properties with the transformer XML item names export and combine into one XML for saving. As the reference the 'name' property is unique.

     

    It seems to work ok, it just feels like there should be a more straight forward way.

     

    Thanks

     

    Tim

  10. Hi,

     

     

    I have a panel area that a user can add images and text to and transform to their hearts content. Great!

    I can save and load the transform data using the exportFullXML() and then applyFullXML() etc.. Superb! great for undo/redo

     

    This obviously just saves the transform data not any info and the actual display objects ie. the Image source, text data and properties etc..

     

    My question is... What's the best way to save this data as well to be reloaded?

     

    I could create another array that gets added to the xml output of the transform xml but I'm not sure of the best way to link the 2 sets of data (display object on stage to the transform item list). The 'name' may not be unique (unless I force it to be maybe?) and the stage objects don't seem to have any transform 'level' property

     

    How can I link the textBox data properties with the transform data?

     

    [using Flex 3.5]

     

    Hope that make sense to someone

     

    Cheers

     

    Tim

×
×
  • Create New...