Tuesday, December 19, 2006

A "almost" photoshop clone made with flex
http://www.fauxto.com/

Friday, December 15, 2006

Photoshop CS3 is now on adobe labs. Go check it out !!

Thursday, December 07, 2006

Seamless Background

Here is way to get seamless background for your websites or flex apps.




package{
public class SeamlessBackgroundTest extends Sprite
{
[Embed (source="../assets/scanline.png")]
private var Pattern:Class;
public function SeamlessBackgroundTest() {

super();
var pattern:Sprite=new Sprite();
this.addChild(pattern);

var bg:BitmapAsset=new Pattern() as BitmapAsset;
pattern.graphics.beginBitmapFill(b.bitmapData,
null,true,true);
pattern.graphics.moveTo(0,0);
pattern.graphics.lineTo(0,this.stage.stageHeight);

pattern.graphics.lineTo(this.stage.stageWidth,
this.stage.stageHeight);
pattern.graphics.lineTo(this.stage.stageWidth,0);
pattern.graphics.lineTo(0,0);
pattern.graphics.endFill();

}

}
}





Monday, December 04, 2006

Stage Eventlistener

If your using a stage resize eventlistener make sure you have this line of code

stage.scaleMode = StageScaleMode.NO_SCALE;

without this the function call to the resize method will not get called.


public function SeamlessBackgroundTest(){
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align=StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE,onStageResize);
}


private function onStageResize(evt:Event):void{
trace("onResize");
}

BitmapAsset Class

If your using an embeded image in your project

[Embed (source="../assets/scanline.png")]
private var Pattern:Class;


You can use the BitmapAsset Class to add the image.

var b:BitmapAsset=new Pattern() as BitmapAsset;




Tuesday, November 28, 2006

The Undocumented SWF Tag

If your working with Flex Builder 2 and trying to set the default swf size for the project there are two ways to do it.

1) Use the Swf Tag

[SWF(width=”800″, height=”600″)]
public class Carousel extends Sprite

2) Goto the Actionscript compiler options and you can add optional params for the mxmlc
compiler there.