Hi Guys,
do you see any issue with this program, i get a blank screen when i
execute this .
not sure what is wrong in it .
package {
import flash.display.Sprite;
import flash.geom.Matrix;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.display.BitmapData;
import flash.events.Event;
public class Drawing extends Sprite {
private var _loader:Loader;
public function Drawing( ) {
_loader = new Loader( );
_loader.load(new
URLRequest("http://www.rightactionscript.com/
samplefiles/image2.jpg"));
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
onImageLoad);
}
private function onImageLoad(event:Event):void {
var bitmap:BitmapData = new BitmapData(_loader.width,
_loader.height);
bitmap.draw(_loader, new Matrix( ));
var matrix:Matrix = new Matrix( );
matrix.scale(.1, .1);
var sampleSprite:Sprite = new Sprite( );
sampleSprite.graphics.lineStyle( );
sampleSprite.graphics.beginBitmapFill(bitmap, matrix);
sampleSprite.graphics.drawCircle(100, 100, 100);
sampleSprite.graphics.endFill( );
addChild(sampleSprite);
}
}
}
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.