Problem saving PNG of the charger

Well, I'm trying to save a png file I have loaded using charger of the internet.

Here is the code:

...
public var TempImage:BitmapData;
...
var loader:Loader = new Loader();
var url:String  = new String('http://myurl.com/image.png');
...LoadImage();
function addLoader():void{
    addChild(loader);
}
function LoadImage():void {
    var urlReq:URLRequest = new URLRequest(url);
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loader_complete);
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loader_err);
    loader.load(urlReq);
    addLoader();
}
function loader_complete(evt:Event):void {
    var target_mc:Loader = evt.currentTarget.loader as Loader;
    var TempImage1:Bitmap = Bitmap(target_mc.content);
    TempImage = TempImage1.bitmapData;
    target_mc.x = (stWidth - stWidth) + 15;
    target_mc.y = (stHeight - 15) - 165;
}...Button Code for Save button...
function SAVE(e:Event):void{
    file = new FileReference();
        var SaveString:String =- new String('myImage.png');
    file.save(TempImage, SaveString);
    file.addEventListener(IOErrorEvent.IO_ERROR,saveError);
    file.addEventListener(Event.COMPLETE, Complete);
    file.addEventListener(Event.CANCEL, Complete);
}...

Image (loader) is added to the step successfully, the SaveString works fine, I have access to the system using "access_shared" files, record the quick works...

The problem is that the recorded image (TempImage) contains no data, I tried countless variatioins to get the charger in a 'temp' image data, but without success.

Any ideas?

I found a solution based on my own earlier application code.

I used PNGEncoder to encode the TempImage in the service RECORD before the real economy.

Tags: BlackBerry Developers

Similar Questions

  • LaserJet Pro 200 color MFP: print problems when you use the charger

    Copy and scan works very well when I place the original on the glas

    However, if I use the charger a straight black line appears from the top down in the middle of the copied or scanned document.

    How can I fix

    Thanks, MariusMo

    Hi MariusMo,

    I'm glad that the problem has been resolved with the cleaning.

    Please consider tagging 2 Message like "Accept as Solution" so that someone else in the community who may encounter this problem can more easily find the solution.

    Best regards!

  • Equium L40-156 - problem with the battery or the charger?

    Hi all, I'm new here and have a question about my laptop.

    My laptop does not turn on when I play and hold the thread at the back of the laptop where it charges and I have to hold it in place while the laptop charge upwards and once I connected, is that after a matter of a few minutes (if there are that) it says low battery and stops.
    Is it my battery in the laptop that has disappeared or is it the charger adapter?

    Any help is appreciated, thanks.

    Hey,.

    Of course it is not easy to say which is the reason why, but according to your announcement, there seems to be problem AC adapter.
    I mean just start the laptop when you place the cable in place and if Windows starts up, it says low battery, so it s not charging but in the worst case, it could also be a malfunction of the motherboard.

    So if you can get a new power adapter you should test. It s worth a try! ;)
    ?

  • I have problems to make my battery charged, because the cable does not have a link solid with the socket of the phone.  The problem seems compatible with a lot of cables, so I think the problem is with the phone. Can it be fixed?

    I have problems to make my battery charged, because the cable does not have a link solid with the socket of the phone.  The problem seems compatible with a lot of cables, so I think the problem is with the phone. Can it be fixed?

    Probably there is debris and dust in the decision-making of the lightning.  Serve with compressed gas canned (NEVER orally).  If this doesn't help, try electronic contact cleaner has a q - Tip.  Finally, take it to Apple.

  • Problems to start the iPad after the charge.

    I have left the iPad charging outside the area during the night and have had start-up problems. I have a screen black and white and on pressing them and holding the sleep/home button an image of a battery. I release the buttons and finally after pressing the buttons, I get my home screen indicating a 100% charge. Has happened twice in the last few days when I greeted the battery power to reduce to 5%. My question is - this problem occurs when the battery power is authorized to reduce equal to or less than 5% before recharging or is the battery dying and requiring a replacement?

    Without knowing at what age the iPad is, it would be difficult to blame it on the battery dying. I never let my battery get too low before I reload them iOS devices. In fact, I put my Air 2 iPad and iPhone 5s on the charger all night in order to get a full charge overnight. I use the iPad all day at work, so I need to reload or to take the charger and cable with me, I prefer not to do. I prefer to load the day after.

    Why don't experiment you a little and do not let the unit run as low. Maybe that load when it gets to 25% left and see if that makes a difference.

  • Dell Inspiron 17R 5720 does not work with the charger. Charger is not recognized. No problem with charger.

    My Dell Inspiron 17R 5720 does not recognize charger. And unfortunately my warranty expired 2 months ago.
    It was plugged and work in the morning, but then in the afternoon I noticed he was running on battery only. It does not start without battery (charger just plugged).

    1 this is what I did to debug. Me and my brother, we bought the same computers Dell laptops at the same time a year and a bit ago. That's why a debugging purposes, it was good.
    I took my charger and plugged into his computer. And it works. Certainly not the charger problem I guess. And when I plug the charger my computer, green light is still on the charger. And I have the original charger provided with the laptop.

    2. now, laptop is running on battery only, so that means that this motherboard works. I think so.

    3. the next thing I did was charger disconnected and removed the battery from the laptop. Then I pushed and hold the "Power" button for 45 seconds to pay a royalty to the flea market. Charger plugged in but laptop will not start.

    4. then I booted the laptop on battery, went to the BIOS and check if the charger is recognized in the BIOS. No, it does not recognize charger. So, if this isn't a charger so what else can we?

    5 laptop has no strange smells so I don't know if something happened with the motherboard, but I guess that motherboard is ok because it works battery.

    6. I was thinking of updating the BIOS, but I can't do it, because it will be not be updated then the laptop runs on the battery, it needs to be plugged.

    Now I'm stuck. I don't know what I can do. I'm willing to spend a little more money on it to try to fix.

    If someone had such a problem in the past please let me know what you have done and if it fixed it.
    Or if anyone has any other ideas, I will be happy and appreciated the help.

    Hello and sorry for this late post. Just had this problem... If there is nothing wrong with the AC adapter, it's a software problem.

    Close the laptop... Unplug the AC adapter / CC... Remove the battery... Plug the power adapter... Start the laptop... Go to the control panel... Find and select the Device Manager... Batteries, left click... Uninstall Microsoft AC Adapter, uninstall Microsoft ACPI compatible with battery control method... In fact, uninstall all you can under the batteries, but that should be all there is. It will be re - install when starting... Stop cell phone... Remove the AC adapter / CC... Replace the battery... Plug the power adapter... Start the laptop... Now, everything should be good.

  • problem, plug the charger on my Zire

    I have an old Zire I used for about 10 years.  I think that I made a mistake and tried to put the needle in the hole for the battery charger. The result is that the charger is not 'connect' to the Zire... and the Zire tells me that the battery is low.  All the world had this problem?  Is there a solution? I really wouldn't want to lose all the data I have stored more than 10 years!  What's a guy to do?

    The male part may have broken free of the motherboard.

    Removable instructions (courtesy of Directfix.com)

    http://www.DirectFix.com/category/_ZIRETAKE.html

    WyreNut

  • I opened my laptop and I lit the charge then it shows connect to 65w adapter y at - it a problem with my charger?

    I opened my laptop and I lit the charge then it shows connect to 65w adapter y at - it a problem with my charger?

    I pressed the f1 key to continue, then my laptop recharges normally.

  • Problem with Port on the DV7-3079wm of charge

    Hello world.  I searched the forum for this question and other places and I think I probably know what is the problem, but I wanted to make sure that before I go ahead with trying to fix and get some advice on my specific problem.

    I have a HP Pavilion DV7-3079wm running Windows 7 64 bit.  I have problems with the laptop to load.  I've already replaced the battery to eliminate this problem, but I need one anyway, because one was not maintain a load more.

    So the problem is when I plug my power adapter most of the time that he does not even recognize that I have it plugged.  No light load on the side or the front.  So if I slowly wiggle out or try to angle in one sense or the other, eventually he'll catch a connection and then 1 of 2 things going on.  Either she viewed the laptop too long that I do not move the charger of whatever the position in GOLD, it pops up a message saying "Smart AC output adapter is too weak for this computer." and then proceeds to the load of the laptop or it just says: "plugged in, do not load.

    I do not know if my problem is the AC adapter or if the port inside the laptop is messed up, which from what I've read on other forums requires either a new motherboard or tear down my laptop and re - solder a new fee on the motherboard port.

    I can't wait to buy a new adapter if it isn't the problem.  Also another problem, I am very happy with my laptop and really intended to max on memory and improve for one SSD but I don't want to sink money into it until I get this problem resolved.  Any help would be appreciated.

    Thank you

    No rust spots on the inside or outside of my plug adaptors CA.  I finally just went and got a new adapter and when comparing it to mine its all brilliant inside the end of the plug where mine is dull looking.  Which may mean it was just salty and was not getting a good connection.  A new Bill without problem, and immediately, although she Wiggles, if fortunately is not the port inside the laptop.  I'll try to clean my AC adapter / CC and see if it makes too much work again.  Thanks for everyone's help and info that it was appreciated and he has helped guide me in the right direction.  Also, if the port never turn off, now I know where to get a replacement.

    Up next... go to the SSD & maxing out the memory.  I can't wait!

    Thank you!!!

  • My problem is with the scanning. I can't use the charger of the scanner, it always scans go flat.

    My problem is with the scanning. I can't use the charger of the scanner, it always scans go flat.

    Also, when I scan several pages, just the first page is scanned.

    Adobe/Acrobat Reader cannot parse documents; What software do you use?

  • Problem saving to the PDF/A format

    Hello

    I have problems saving my. PDF to PDF/A. My thesis deadline is in a few days, so quick help is appreciated.

    I use Mac Acrobat version 10.1.0

    When I export, I get this message:

    Screen Shot 2015-04-09 at 2.52.29 PM.png

    When I run the preflight, I get the following errors:

    Screen Shot 2015-04-09 at 3.50.15 PM.png

    The document has been exported from word to PDF, then edited in acrobat. It has been necessary to adapt the page numbering, since the word is impossible to work with.

    Please help, thanks!

    I had the same probems and solved it like this:

    • Option 1: Install the latest version of acrobat pro DC (that much improves the conversion of PDF/A-1). There is a trial version if you want to try first...
    • Possibility 2: If you're stuck with Acrobat X, try the following
      1. to export the file to Word using the 'Adobe PDF' printer and set the stanard to PDF/A-1b. This will provide you with a file conform to PDF/A-1.
      2. Make your changes in Acrobat (page numbering etc.)
      3. Use the preflight (convert to PDF/A-1) or you can try the File\Save as\PDF-A

    The two have worked for me...

  • I have a problem with my iPhone 6 s more battery.  When he arrives less than 30% the phone will stop and will not restart unless I connect it to the charger.  Once it reboots it shows the same battery as the entry stop percentage.

    I have a problem with my iPhone 6 s more battery.  I had to 'support' from Apple telling me there is nothing wrong with the battery, I was at the store and had them test and I had two replacements and they all did the same thing, even to start the replacement up as a new phone so that there are no applications that could contribute to the problem.  I told them repeatedly it was their software problem, but they said they had never "heard of someone having this problem.  I have not updated to the latest version of the software to see if the problem still occurs and initially it didn't, but then he was back at close to 30% or less, even if there is a power adequate to continue much longer.  I've updated to the latest version because it refers to a "correction of battery problems.  Unfortunately, it makes no difference at all.  I had iPhones for many years and have always been a fan, but my next phone will be a Samsung unless Apple admit to their problem and sorting.

    When you've got additional phones you restore from a backup or set up as a new device?  If the first case, then this is probably your problem.

    Restore the configuration as a new device / phone and be on your way.

    PS None of your fellow users on these forums really care if you get a samsung and I don't know that apple will do fine without you as a customer.

  • problem on the charge of

    I use hp G62, when I connect the charger that plugged does not support, I tried all the procedures, but it still does not, it is said

    Help me please

    I have triesd... my battery works but must calibrate it is said that

  • Problem in the incorporation of a file png for the skin to a button

    I'm trying to incorporate a PNG in the form of a skin of a button using actionscript for a custom component class. It has an error: "unable to resolve 'btn.png' for transcoding" - see the code in method 1 below. However, it works very well in method 2. Code are all shown belown. Someone can help about why this happens and how to make method 1 work?

    Received the error in the method 1:

    package net.abc.free
    {

    Import mx.core.BitmapAsset;

    public class myComp extends Canvas {}

    [Embed(source="assets/btn.png")]
    [Bindable]
    public var clasBtn: Class;

    public void myComp() {}
    Super();
    }
    }
    }

    Success in the method 2:

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "layout ="absolute"creationComplete =" init () "> "
    < mx:Script >
    <! [CDATA]
    Import mx.core.BitmapAsset;

    [Embed(source="assets/btn.png")]
    [Bindable]
    public var clasBtn: Class;
    []] >

    < / mx:Script >
    < mx:Panel id = "main" width = "400" height = "300" backgroundAlpha = "0" >
    < mx:HBox width = "100%" height = "100%" horizontalAlign = "center" horizontalGap = "100" >
    < mx:Button id = upSkin 'myBtn' = "{clasBtn}" / >
    < / mx:HBox >
    < / mx:Panel >
    < / mx:Application >

    Add a "/" in front of the path from the folder root 'src '.

    [Embed(source="/assets/btn.png")]

  • BlackBerry Smartphones BlackBerry Curve 9320 phone charger exploded during the charge.

    I put my BlackBerry Curve 9320 on charges this morning that the battery is running low. Plugged into a wall jack, and after 1 hour, the charger went pop! Fortunately, I was sitting next to and off the charger to the power outlet before unplugging. Used cable comes with the phone and is plugged into my laptop (I know very risky) and hey presto on the phone was OK, so was the USB cable so that the fault was the charger plug! Jack was OK as my other half is an electrician and he said that the outlet was OK also. I am waiting for a new charger be delivered by Royal mail while I'm typing this. A lot of people who have this phone have the same problem? I was just lucky that I was able to disconnect immediately without any damage to the phone thanks to God.

    Yes, the tat is thought too. Generally use a surge protected socket but used a regular wall outlet this day there without thought. My husband is an electrician and was told that the used was ok, the USB cable was ok, but the damage has been done to the charger and saved the phone thank God! My other half, with my permission opened the charger and one of the items was burned and stank! Have since been replaced charger and had a free USB cable included in the package that I'll keep it as a spare.

Maybe you are looking for