Is there any way to save an image from a nested movieclip as a .png using PNGEncoder

Hello all,
I am new to AIR and AS3 and I am developing a small AIR desktop application in Flash CS5 that saves a user generated image locally to their computer. 
The image is generated from a series of user choices based on .png files that are loaded dynamically into a series of nested movieclips via XML.  The final image is constructed by a series of these "user choices".
Sourcing alot of code examples from here and there, I have managed to build a "working" example of the application.  I am able to "draw" the parent movieclip to which all the other dynamic movieclips reside and can then encode it using PNGEncoder.  The problem is that the images loaded dynamically into the nested movieclips show as blank in the final .png generated by the user.
Is there a way to "draw" and encode these nested movieclips or do I need to find another way?  I can provide my clumsy code if required but would like to know if this concept is viable before moving any further.....
Thanks in advance....

Thanks for the files.......
Yeah I'm doing it in Flash but importing the images via an xml document.  The problem isn't in being able to view the eyes (based on the selection of the user) its when I go to save the resulting image as a .png.  When I open up the saved .png the eyes are blank even though they are visible in the swf
Even when the user clicks on the option to copy the image to the clipboard, it works as intended.
My only guess is there is an issue with the way my xml is loading (but this appears to work fine) or when the file is converted and saved.....
As I said I'm still learning but surely there must be a simple answer to this....
I have included the xml code I am using and also the save code to see if anyone spots an issue..... (I hope I copied it all)
// XML
import flash.net.URLRequest;
import flash.net.URLLoader;
var xmlRequest:URLRequest = new URLRequest("imageData.xml");
var xmlLoader:URLLoader = new URLLoader(xmlRequest);
var imgData:XML;
var imageLoader:Loader;
var imgNum:Number = 0;
var numberOfChildren:Number;
function packaged():void
rawImage = imgData.image[imgNum].imgURL;
numberOfChildren = imgData.*.length();
imageLoader = new Loader  ;
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadedImage);
imageLoader.load(new URLRequest(rawImage));
faceBG_mc.Eyes.addChild(imageLoader);
function loadedImage(event:Event):void
imageLoader.x = -186;
imageLoader.y = -94;
imageLoader.width = 373;
imageLoader.height = 186;
//  Clipboard
btn_Copy.addEventListener(MouseEvent.CLICK, onCopyClick);
function onCopyClick(event:MouseEvent):void
var bd:BitmapData = renderBitmapData();
Clipboard.generalClipboard.setData(ClipboardFormats.BITMAP_FORMAT, bd);
function renderBitmapData():BitmapData
var bd:BitmapData = new BitmapData(faceBG_mc.width,faceBG_mc.height);
bd.draw(faceBG_mc);
return bd;
// Save faceBG_mc as .png 
var fileRef:FileReference = new FileReference();
var myBitmapData:BitmapData = new BitmapData (faceBG_mc.width,faceBG_mc.height, true, 0);
myBitmapData.draw(faceBG_mc);
var myPNG:ByteArray = PNGEncoder.encode(myBitmapData);
function onSaveClickPNG(e:Event)
fileRef.save(myPNG, "myPNG.png");
So my problem is....
The final image is copied to the clipboard with the eyes visible - yes
The eyes appear in the image in the swf as intended - yes
When the image is saved as a .png and is meant to include the eyes, they are blank (see picture above)
I hope this helps.....
Thanks in advance

Similar Messages

  • Is there any way to save stills pulled from video to iphoto?

    Is there any way to save stills pulled from video to iphoto?

    Have a look at:  https://discussions.apple.com/docs/DOC-3231
    Geoff.

  • My brother-in-law was killed at work about 2 months ago. His wife has several voicemails from him on her iPhone 3GS  is there any way to save those voicemails as a sound file?  Preferably not using a handheld recorder.

    My brother-in-law was killed at work about 2 months ago. His wife has several voicemails from him on her iPhone 3GS  is there any way to save those voicemails as a sound file?  Preferably not using a handheld recorder.  Any help would be greatly appreciated!

    I offer my condolences, and this: Save Voicemails
    I have not used it but the manufacturer claims it will do what you want.

  • In Firefox 3.6.10 I was able to go forward and backwards between pages without the page defaulting to the top of the page. Is there any way to prevent the page from automatically moving to the top when using the forwards and back buttons in Firefox Four?

    I like to be able to navigate backwards and forwards without having to scroll down and find where I was previously. In Firefox Four, when using the forwards and back buttons, the page will automatically return to the top of the page. Is there any way to change this setting in Firefox Four to prevent it from doing that?

    Thanks for the response. No Time Machine, but I probably have a backup from a few months ago on an external hard drive. :/ I guess it'd have useful history, but not if it overwrote the last 3 months or so of Awesome Bar, that might not be so great.

  • Is there any way to set an image from your camera roll as a wallpaper without having a shadow over it on iOS7?

    Everytime you set a picture from Camera Roll as a wallpaper a dark shadow appears on the top and the bottom of the image.
    Is there anyway one can turn this off? I've noticed this doesn't happen with the preset wallpapers the phone brings.. Thanks
    Any suggestions would be appreciated!
    Thanks,
    Emilia

    I believe the iPhone does this a default so you can view the time more clearly   There is no way to turn this I think. But I have found zooming in on an image ever so slightly and moving it around can change the effect.  Good luck

  • Is there any way to save a library from an old device after it's shown up using home sharing to a new device?

    Just as the title says. I don't want to use a USB stick to transfer every single song so that it'll save on my new laptop's iTunes. I think Home Sharing only works at home, right? So if I bring my laptop anywhere, then I don't have any of my music anymore.

    Hi Kokomeeps,
    Welcome to the Apple Support Communities!
    You can actually import the music from one iTunes library on a computer to another using Home Sharing and all of your music will actually be located on both machines. Please use the following article as a guide to set up Home Sharing to import your music from one computer to another. 
    iTunes: How to move your music to a new computer - Apple Support
    Best regards,
    Joe

  • Is there a way to save an image from the Internet on my MacBook Pro v10.6?

    I am creating a poster on a website and want to upload some images of stars onto the poster. They can just be graphics. Can this be done?
    How? Thanks!

    Yes.  Use Google to search for the type of stars you want to use for your poster.  Download them to your desktop & follow the instructions on the poster website on how to upload to your poster.

  • Is there any way to SAVE this file?

    Is there any way to save this file from the federal reserve website?   If so, what version of acrobat do I need?
    http://www.federalreserve.gov/bankinforeg/PrivacyNotice_NoAffil_NoOptOut.pdf
    Any help would be appreciated!
    Thank you!

    If you enter any field information, the modified document cannot be saved with Adobe Reader. It does not have the necessary usage rights applied. You can save with a different PDF viewer that supports forms, such as Acrobat or Foxit Reader.

  • I purchased some movies off iTunes from my account from my fathers IPad as a gift but didn't realize can not view if not logged with my account. Is there any way to save directly to the IPad (regardless of account)? Or transfer to him so he can view have?

    I purchased some movies off iTunes from my account (but from my father IPad) to download as a gift,
    but didn't realize he can not view if not logged in with my account.
    Is there any way to save directly to the IPad (regardless of account) so he can view?
    Or transfer to his account?
    Or is any was to cancel the recent purchase if can not transfer as I will not watch these myself?

    sure pretty simple.  make a backup of your current settings
    http://support.apple.com/kb/HT1766?viewlocale=en_US
    then restore device from old backup you need pics off of
    then import pics to computer
    http://support.apple.com/kb/HT4083
    you may need to save pics to camera roll first
    then restore the new backup and sync pics back to phone via itunes
    Peace, Clyde

  • Is there any way to create this image in photoshop?

    Is there any way to create this image in photoshop?  ,Any help would be appreciated?

    What JJMack said. An example I pulled in less than 5 minutes:
    All I did was inserted a text layer with that same inside color and a stroke layer style with that same outside color (about 3 or 4 pixels; outside position). Font used was Calibri Regular.

  • My contacts are organized in different groups. An iPhone trade show app (Vinexpo) displays exhibitors infos and allows to create new contacts. Is there any way to save a new contact in a specified group instead of the contacts root? Thks in advance

    My contacts on my iPhone are organized in different groups. I have downloaded a trade show app which gives infos on the exhibitors of the show. It offers to create new contacts from these info. Is there any way to save these new contacts in a specified group instead of putting them into the contacts root, where they are mixed with all the old ones? By the way, can we create a new contacts group directly from the IPhone, without having to go through the sync process with the PC?
    Thanks a lot in advance

    Sorry, I forgot to bookmark the thread where the app was mentioned, but searching for "group" or "contacts" should bring a few results in the AppStore.

  • One of the folders on my external hard drive has transformed into a unix executable file and I can no longer access my files. Is there any way to save the data?

    One of the folders on my external hard drive has transformed into a unix executable file and I can no longer access my files. Is there any way to save the data?

    Wow, have seen Files do that, but a whole Folder as I recall!
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair. Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)

  • Is there any way to save the data on my ipod if it is in recovery mode and has to be reset?

    Is there any way to save the data on my ipod if it is in recovery mode and has to be reset?

    Only if this program will get the iPod out of recovery mode.
    RecBoot: Easy Way to Put iPhone into Recovery Mode

  • Is there any way to save an iphone with water damage?

    Is there any way to save an iphone 5 with water damage? I know older phones you could some times use rice to dry it out.

    1, Place in ziplock bag with dry raw white rice for a week.
    2, When that doesn't work take to Apple and purchase out of warranty replacement.
    3, If you have already turned on the power the damage is done so just proceed to step 2.
    Allan

  • Is there any way to save a Pages document with security?

    I mean, is there any way to save a file you just edited, with a password or something that prevent other people to access that file without a password?
    I am on iWork on trial version, to test if I change to iWork or keep Office 2008 for Mac.
    I used to save a file on Office (PC version) with a security option, two passwords, one for read the file and other for editing the file.....is there any way to do that on Pages 09?
    Thanks

    Yes:
    +Inspector > Document > Document > Require password to open+
    Just be aware that is not the same security as with MsWord. In other words they can not open each others secure documents.
    Peter

Maybe you are looking for

  • When I try to adjust the date and time of an event by selecting Photos from iPhoto, the year I enter is altered.

    I have images in iPhoto from an older digital camera which did not record the date and time.  In iPhoto, with an event selected, I have tried to adjust the date and time by choosing Photo.  When I adjust the date and check Modify original files, it m

  • How to repair my iPhone 4s shell

    i want to repir mt iphone 4s shell, because of some accident. my iphone 4s is still in warranty. how much should I pay?

  • Down Pmt -vendor

    Dear Experts,                       When i make vendor down Payment ,i am getting the following error. Account 24641000 5000 is blocked for posting Advance Thanks regards avudaiappan

  • Get the last query from the current user

    Is there a way to get the last query of the current user, so every query could be log with a database trigger? Let's just say I execute: DELETE xxxx; I tried : SELECT T.SQL_TEXT FROM V$SQLAREA T where ADDRESS=(SELECT prev_sql_addr FROM v$session wher

  • Problem during number assignment cause record in iw51

    Hi, I am getting this error message in my BAPI(BAPI_SERVNOT_CREATE).Kindly suggest me what am I supposed to do. I am getting the error message while assigning the cause code "Problem during number assignment cause record " Please have a look at my co