PDA

View Full Version : Maximise components



derm116
May 12th, 2008, 05:48 AM
Hi all,

I've got a flex project made up of muliple components! What I want to do is give the user the option of maximising certain components so that all of the other components black out and the selected component takes up most of the screen!

The way I was thinking of doing this was snapping the component as a bitmap and using a pop-up window to overlay a bigger version of this bitmap on the screen!

Does anyone have any ideas on how I could get a snapshot of the component as a bitmap? Or even a different way of doing this? Any help really would be greatly appreciated!

Thanks,
Derm

derm116
May 12th, 2008, 01:19 PM
Ok,

In case anyone else is wondering how to do this, I used the ImageSnapShot function available in the mx graphics package to take a snapshot!


public function takeSnapshot():void {
var imageBitmapData:BitmapData = ImageSnapshot.captureBitmapData(source);
swfLoader.source = new Bitmap(imageBitmapData);
}

with source been an IBitMapDrawablke component! I then creat a swf loader on my pop-up screen to load the bitmap! Going to have a look at resizing it now!