Jump to content
Search Community

illustratordavid

Members
  • Posts

    14
  • Joined

  • Last visited

Posts posted by illustratordavid

  1. Hi,

     

    Just wondered if anyone had seen this error before... and can knows of a solution :)

     

    Transforming RichEditableText works great but at intermittent points moving the object is restricted to fixed vertical and horizontal directions and the the object scales sets itself to scale proportionally.

     

    I've recorded a video to illustrate this as its difficult to reproduce - i haven't managed to find a trigger

     

    http://youtu.be/ebPBcVhHoRM

     

    Thanks

    David

     

  2. Great thanks.  I've implemented a .calllater to slow the process down a little. Spotted a big part of the problem was that I had applied the transformer to the image twice then applied the flex crop. I removed the second transform manager application and that simplified it into less randomness.

     

    Next problem, when I have loaded the new image and set the flex crop to size please can you tell me how I can scale up  or down the image so it fits snuggly inside the flexcrop mask area?

     

    Thanks

    David

  3. Yep the width is output at width 1819 and height 1311 using monsterDebugger

     

    I've realised since I posted my last message that actually its the original flex crop width and height I need to repeat.  Not the image(evt.currentTarget).width.  But this doesn't really make a difference as the width and height are still coming out when applied as zero

     

    Thanks

    David

  4. Thanks Jack, how would you recommend I apply re-apply the x, y, rotation, width and height?

     

    When i've tried I keep ending up with a flexcrop with a width 0 height 0

     

    Thanks

    David
     

    var newFlexCrop:FlexCrop = new FlexCrop(Image(evt.currentTarget),img_tmanager.manager,false);
    newFlexCrop.name = evt.currentTarget.name + "_crop";
    newFlexCrop.attached = false;
    
    // have tried setting it directly to the flex crop 
    newFlexCrop.x = Image(evt.currentTarget).x;
    newFlexCrop.y = Image(evt.currentTarget).y;
    newFlexCrop.width = Image(evt.currentTarget).width;
    newFlexCrop.height = Image(evt.currentTarget).height;
    
    // and i've tried adapting the exported xml from the last session
    lastTransXML[0].@rawWidth = Image(evt.currentTarget).width;
    lastTransXML[0].@rawHeight = Image(evt.currentTarget).height;
    
    var appliedDO:DisplayObject = img_tmanager.applyItemXML(lastTransXML,img_tmanager.parent,0x333300);
    
    newFlexCrop.attached = true;
    newFlexCrop.update();
    for each (var titem:TransformItem in img_tmanager.items) {
    titem.update();
    }
    
    
  5. Hi,

     

    I'm trying to change the source of a spark image in which has a flexcrop applied to it.  Simply changing the content image source combusts the flexcrop applied.  

     

    Here's my idea

     

    1. find flexcrop on page
    2. export transform xml for item
    3. destroy transform
    4. change image source
    5. update rawWidth and rawHeight in saved xml
    6. Apply transform and flexcrop to image using updated xml

    So i'm half way through coding this mammoth solution (I hope) and wondered if any one had any quicker ideas

     

    Thanks

    David

  6. Hi,

     

    I just wondered if there are any known problems with using Text Layout Framework in a liquidArea.

     

    I'm currently adding the Text Layout Framework to a sprite inside a sprite which is in the liquidArea, the text appears fine in the root of the app, but inside it is added (looking in debugger) but is not visible.

     

    Thanks

    David

  7. Hi,

     

    Thank you for replying. It's a Actionscript project created inside Flash Builder 4 so i've just added the meta data line

     

    package
    {
    import com.greensock.layout.*;
    import com.greensock.transform.*;
    
    import flash.display.*;
    import flash.events.Event;
    import flash.geom.Point;
    import flash.geom.Rectangle;
    import flash.text.TextField;
    
    import nl.demonsters.debugger.MonsterDebugger;
    
    [sWF(width="1000", height="600", frameRate="25")]
    public class designLSmain extends Sprite
    {
    
    	private var ls:LiquidStage;
    	private var area:LiquidArea;
    
    	private var debugger:MonsterDebugger;
    
    
    	public function designLSmain()
    	{	
    		// Init the debugger
    		debugger = new MonsterDebugger(this);
    		MonsterDebugger.trace(this, "designerLSMain loaded");
    
    		stage.align = StageAlign.TOP_LEFT;
    		stage.scaleMode = StageScaleMode.NO_SCALE;
    
    		var ls:LiquidStage = new LiquidStage(this.stage, 1000, 600, 700, 400);		
    
    		var i:int = 0;
    		//for (var i:int=0; i<12; i++) {
    			// page in the center
    			var page:Sprite = new Sprite();
    			page.graphics.beginFill(0xFFFFFF,1);
    			page.graphics.drawRect(0,0,350,200);
    			page.graphics.endFill();
    			addChild(page);
    			// set initial page position
    			page.x = (this.stage.width/2) - (page.width/2);
    			page.y = (this.stage.height/2) - (page.height/2);
    
    			var txtlabel:TextField = new TextField();
    			txtlabel.text = String(i);
    			page.addChild(txtlabel);
    		//}
    
    		// pages overview below
    		var pagesOverview:Sprite = new Sprite();
    		pagesOverview.graphics.beginFill(0xFFFFFF,0.6);
    		pagesOverview.graphics.drawRect((this.stage.width/2)-300,this.stage.height,600,100);
    		pagesOverview.graphics.endFill();
    		addChild(pagesOverview);
    
    		ls.attach(pagesOverview, ls.BOTTOM_CENTER);
    
    
    		var area:LiquidArea = new LiquidArea(this, 50, 70, 300, 100);
    		area.attach(page, ScaleMode.PROPORTIONAL_INSIDE, AlignMode.CENTER, AlignMode.CENTER);
    		area.preview = true;
    
    		ls.addEventListener(Event.RESIZE, onLStageUpdate);
    		stage.addEventListener(Event.RESIZE, resizeStage);
    
    		stage.dispatchEvent(new Event(Event.RESIZE));
    	}
    
    	private function resizeStage(event:Event):void {
    		MonsterDebugger.trace(this, "stageResize");
    	}
    
    	private function onLStageUpdate(event:Event):void {
    		MonsterDebugger.trace(this, "LS Resized");
    	}
    
    }
    };

     

    ...to see if that would help. I've replaced the previous example http://davidjennings.co.uk/temp/liquidStage.htm

     

    This now separates the 2 sprites but the stage seems to be limited to an area in the top left which i'm now trying to sort out expanding the stage to the full browser window

     

    Thanks

    David

  8. Hi

     

    I'm struggling to get liquidStage and liquidArea to put my sprites in the correct place. I have uploaded a demo of where I've got to using the documentation at http://davidjennings.co.uk/temp/liquidStage.htm. The large white area i'm trying to center to the stage and the transparent horizontal strip that looks like it is sitting behind is supposed to be placed bottom center.

     

    Here is my Actionscript 3 code

    package
    {
    import com.greensock.layout.*;
    import com.greensock.transform.*;
    
    import flash.display.*;
    import flash.events.Event;
    import flash.geom.Point;
    import flash.geom.Rectangle;
    
    import nl.demonsters.debugger.MonsterDebugger;
    
    public class designLSmain extends Sprite
    {
    
    	private var ls:LiquidStage;
    	private var area:LiquidArea;
    
    	private var debugger:MonsterDebugger;
    
    	public function designLSmain()
    	{	
    		// Init the debugger
    		debugger = new MonsterDebugger(this);
    		MonsterDebugger.trace(this, "designerLSMain loaded");
    
    		var ls:LiquidStage = new LiquidStage(this.stage, 550, 400, 550, 400);		
    
    		// page in the center
    		var page:Sprite = new Sprite();
    		page.graphics.beginFill(0xFFFFFF,1);
    		page.graphics.drawRect(0,0,350,200);
    		page.graphics.endFill();
    		addChild(page);
    
    		// pages overview below
    		var pagesOverview:Sprite = new Sprite();
    		pagesOverview.graphics.beginFill(0xFFFFFF,0.6);
    		pagesOverview.graphics.drawRect(0,0,600,100);
    		pagesOverview.graphics.endFill();
    		addChild(pagesOverview);
    
    		ls.attach(pagesOverview, ls.BOTTOM_CENTER);
    
    		var area:LiquidArea = new LiquidArea(this, 50, 70, 300, 100);
    		area.attach(page, ScaleMode.PROPORTIONAL_INSIDE, AlignMode.CENTER, AlignMode.CENTER);
    		area.preview = true;
    
    		ls.addEventListener(Event.RESIZE, onLStageUpdate);
    	}
    
    	private function onLStageUpdate(event:Event):void {
    		MonsterDebugger.trace(this, "LS Resized");
    	}
    
    }
    }

     

    Please could someone suggest where i'm going wrong

     

    Thanks

    David

×
×
  • Create New...