Translate

> > Dynamic Image Load

Dynamic Image Load

Posted on Thursday, October 13, 2011 | No Comments

var imageLocation:String = File.applicationDirectory.nativePath + "\\assets\\LineBoarderTop.png";
                var borderImage:Image = new Image();
                borderImage.source = imageLocation;
                borderImage.percentHeight = 100;
                borderImage.percentWidth = 100;
                borderImage.scaleContent = true;
                borderImage.maintainAspectRatio = false;
                borderImage.addEventListener(Event.COMPLETE, function(e:Event):void
                {
                    var bitmapData:BitmapData = Bitmap(e.target.content).bitmapData;
                    // draw white background
                });
                borderImage.load(imageLocation);

Leave a Reply

Powered by Blogger.