try to add one error event listener and see if there is any error . _loader.contentLoaderInfo.addEventListener( IOErrorEvent.IO_ERROR, errorHandler); _loader.contentLoaderInfo.addEventListener( SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
On Sat, May 5, 2012 at 12:10 AM, A <asingh2...@gmail.com> wrote: > 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 flex_india@googlegroups.com. > To unsubscribe from this group, send email to > flex_india+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/flex_india?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to flex_india@googlegroups.com. To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/flex_india?hl=en.