Adobe Dreamweaver Forums



Last 10 THreads :         Renaming a project (Last Post : poverbo - Replies : 8 - Views : 15 )           »          Merged Projects Not Appearing in WebHelp TOC (Last Post : hermi14 - Replies : 4 - Views : 5 )           »          Sound.position (Last Post : kglad - Replies : 1 - Views : 2 )           »          Flash-PHP Mail Form (Last Post : kglad - Replies : 1 - Views : 2 )           »          Flash Controls Not Displaying in Embedded File (Last Post : kglad - Replies : 1 - Views : 2 )           »          Making a photo with rounded corners (Last Post : quality11 - Replies : 2 - Views : 3 )           »          Cookies and cflogin (Last Post : idesdema - Replies : 10 - Views : 11 )           »          DW Flash Encoder (Last Post : Hunter Elliott - Replies : 1 - Views : 2 )           »          DIV in Table not working. (Last Post : JoeyD1978 - Replies : 7 - Views : 8 )           »          Web Services (Last Post : DEnglsih - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 10-03-2008, 12:22 PM
flashharry!
 
Posts: n/a
Diggs:
Default Screen Grab UIComponent that is partly off screen

Sorry for title hard to state what I was wanting in a few lines.

I have a few apps that report back charts and datagrids. I have a function
that I can pass in a UIComponent and it gives me back BitMap data. I then
encoded this too jpg or png using JPGEncoder/PNGEncoder. I send the image to a
php script on the server, that just spits it back to the client as a download.
This enables the users to capture elements of the flex app to use in reports of
there own. This all works great bar one issue.

It only grabs what is visible on screen, not an issue with charts, but when I
capture datagrids I only get the visiual portion. I would like to grab the
whole grid sans scroll bar. Code below.
Thanks in advanced

(code snippet just core for ease of reading)
cursorManager.setBusyCursor();

imgeSource = getBitmapData( UIComponent(myDataGrid) );
var jpgEncoder:JPGEncoder = new JPGEncoder(50);
imgeStream = jpgEncoder.encode(imgeSource);

var header:URLRequestHeader = new URLRequestHeader ( "Content-type",
"application/octet-stream" );
var jpgURLRequest:URLRequest = new URLRequest
(io_modules/jpg_encoder_download.php);
jpgURLRequest.method = URLRequestMethod.POST;
jpgURLRequest.data = imgeStream;
var jpgURLLoader:URLLoader = new URLLoader();
navigateToURL(jpgURLRequest, "_self");
cursorManager.removeBusyCursor();

private function getBitmapData( target : UIComponent ) : BitmapData {
var bd : BitmapData = new BitmapData( target.width, target.height);
var m : Matrix = new Matrix();
bd.draw( target, m );
return bd;
}



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-03-2008, 03:11 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Screen Grab UIComponent that is partly off screen


"flashharry!" <webforumsuser@macromedia.com> wrote in message
news:gc4uv0$958$1@forums.macromedia.com...
> Sorry for title hard to state what I was wanting in a few lines.
>
> I have a few apps that report back charts and datagrids. I have a function
> that I can pass in a UIComponent and it gives me back BitMap data. I then
> encoded this too jpg or png using JPGEncoder/PNGEncoder. I send the image
> to a
> php script on the server, that just spits it back to the client as a
> download.
> This enables the users to capture elements of the flex app to use in
> reports of
> there own. This all works great bar one issue.


You may find that you can persuade the PrintDataGrid to help you.

HTH;

Amy


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 10:18 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk