Flex 3.6 bitmap losing data

I am losing the bitmapdata inside of the bitmaps image1 and image2 in the code below, its happening after the first round of ticks,
so the first tick it loads image1 fine, second tick loads image 2 fine, after that the bitmaps have no data in them.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="1000" minHeight="1000" creationComplete="create()">
          <mx:Script>
                    <![CDATA[
                              var imagexml:XMLList;
                              private var tempTimer:Timer = new Timer(2000,0);
                              private var url1:Loader = new Loader();
                              private var url2:Loader = new Loader();
                              private var image1:Bitmap;
                              private var image2:Bitmap;
                              private function create():void{
                                        url1.load(new URLRequest("com/imaging/assets/image1.jpg"));
                                        url1.contentLoaderInfo.addEventListener(Event.COMPLETE,image1load);
                                        url2.load(new URLRequest("com/imaging/assets/image2.jpg"));
                                        url2.contentLoaderInfo.addEventListener(Event.COMPLETE,image2load);
                                        tempTimer.addEventListener(TimerEvent.TIMER,tick);
                                        tempTimer.start();
                              private function image1load(event:Event):void{
                                        var _image1:Bitmap = url1.content as Bitmap;
                                        image1 = new Bitmap(_image1.bitmapData);
                              private function image2load(event:Event):void{
                                        var _image2:Bitmap = url2.content as Bitmap;
                                        image2 = new Bitmap(_image2.bitmapData);
                              private var i:int=0;
                              private function tick(event:TimerEvent):void{
                                        if(i==1){
                                                  i = 0;
                                                  imagePlace.load(image1);
                                        }else{
                                                  i = 1;
                                                  imagePlace.load(image2);
                              protected function left(event:MouseEvent):void
                                        imagePlace.load("com/imaging/assets/image3.jpg");
                    ]]>
          </mx:Script>
          <mx:Image id="imagePlace" height="1000" width="1000"  />
          <mx:HBox>
                    <mx:Button label="Left" click="left(event)"  />
                    <mx:Button label="Right" />
          </mx:HBox>
</mx:Application>

Yes I was able to do this as well by creating a new image. Is there no flag/method for prevening flex from releasing that data?
What I am most concerned about is that flex is releasing the bitmap data on a bitmap that while it is  used as the source for an image it is still its own object and entity. It seems sort of arbitrary to in this one case say, oh I am goign to release the objects you are hodling in memory because it is no longer being used in this image (even though the bitmap could be tied up doing other things).

Similar Messages

  • How to reset without losing data?

    LS,
    Is there a way to reset my iPhone (through itunes or other) that will prevent me from losing data? 
    Situation:
    I have an iPhone 3G with ios4. Saturday night my phone acted weird, it would lock the screen every few seconds without me promting it (automatic screen lock is off).
    To reset the phone I pressed the home button and the on/off button simultamiously. Instead of simply resetting it stuck on the Aplle logo.
    Trying to get it going again, it went out.
    Since than whenever I try to switch the phone on, it asks for a reset through iTunes (picture of usb + itunes in screen).
    Since I have not been able to synchronise the phone for a few weeks, I was wondering if there is a workaround to prevend loss of data (for instance the recent photo's).
    I sincerely hope there is a workaround.
    Cheers

    Well, if you have a backup, that will save your text messages, settings, camera roll etc.
    Not the music, photos, videos, contact etc.
    So there is a way to restore without losing most of the important information. Since the music, videos and others are theoetically on your Mac/PC.

  • HT204053 I have one icloud id on my mac and want to share with an ipad with a different icloud id.  if I create a new id for both of us will this work?  My concern is losing data on either device.

    I have one icloud id on my mac and want to share photos, calendars, etc with an ipad with a different icloud id.  if I create a new id for both of us will this work?  My concern is losing data on either device. (the mac book pro is new, but has all of the retrieved data from my previous mac book pro)

    You will lose data from whichever was the 2nd to last to sync .
    Don't do it.

  • Is it possible to resize the partitions without losing data?

    I have following issue:
    I have dual-boot Arch with Windows XP. I created 4 partitions: 40GB XP's system disk (ntfs), 80GB ntfs data disk, 1GB swap and 25GB Linux partition.
    But I am running XP so rarely, that it is frustrating, that I have most of my data on ntfs partition... I'd like to wipe out that 80GB ntfs, resize the system ntfs partition up to for example 60GB, and add the remaining 60GB to my linux ext3 partition (because I'm running out of free space recently...).
    Has anyone done something like this, and how safe it is (if possible at all)
    Yes, I have read this: http://wiki.archlinux.org/index.php/Res … _partition, and a few more.
    I just don't have time to reinstall both systems (especially I would not like to install Windows, because I'd rather install Vista from my recovery disk, than hack the XP to work again...), and if some issues are likely to appear, then I'll give it up for now .

    It's trivial using gparted, but as with any similar operation, you run the risk of losing data - so you'd better backup.

  • Bought a new macbook air because my old computer is formatted. I want to sync my iphone to my new mac, so I can save the data on my iphone without losing data. how can I do?

    bought a new macbook air because my old computer is formatted. I want to sync my iphone to my new mac, so I can save the data on my iphone without losing data. how can I do?

    You need to copy everything form your old computer, or your backup copy of your old computer to your new one.
    The iphone is not a storage/backup device.  it simply mirrors the selected content of the computer to which it is synced.

  • Big bug in NW-PI-731, JDBC-adapter losing data

    Hi,
    we recognized a big bug in NW-PI-731 SPS07, processing data with JDBC_xxxx_SENDER, sometimes it occurs, that for example, from 13974 documents should be processed, but only a part of 13137 documents are processed successfully, but 837 documents are missing in the target system,
    In message-monitoring, PI displays all documents as processed successfully, but that is obviously wrong,
    so PI is sometimes losing data - this behaviour we did not have had in NW-PI-700-SPS18
    after upgrading to PI-731, we have big trouble with data processing.
    did other SAP-customers noticed the same behaviour?

    Hi
    You can count the total number message processed in PI from message monitoring in RWB.
    If you see that the number is 13137, then there is a problem while reading the data from database
    using JDBC sender adapter.
    Since the number of records are high, you can try to restrict the number of records using rownum in
    database select query.
    Check this
    PI 7.1 JDBC sender adapter huge load from DB se... | SCN
    PI JDBC Sender adapter - Some Learnings

  • How to view windows Xp formatted hard drive with Macbook pro without losing data

    How to view Windows Xp programed Hard drive with Macbook pro with out losing data on hardrive

    Go to the First Aid tab in Disk Utility, select the external drive partition and read the format from the lower left, at the bottom.

  • PLEASE READ REGARDING iPod losing data

    I have bought my 5th generation iPod and have not done anything to it that will cause to malfunction in anyway. But im getting annoyed that a lot of times i connect by black video iPod into my Windows Xp computer. Then iTunes pops out. I click on the iPod on the left and its WHITE!? Then i check how much space its used and it says 1.5 g data used? I normally have around 6.3 g.
    I just lost all my videos and photos but i still have the songs for some reason. Then i always have to keep updating it cause everytime i connect i keep losing data.
    Basically, when i connect my iPod a lot of stuff gets erased and i have to keep updating it.

    well umm of course it appears WHITE because it cant detect that your ipod is black and it sounds like you reset it or deleted your videos on your computer and lost them in the ipod last time you connected
    dell   Windows XP  

  • What is the proper way to convert a VHD from dynamic to basic without losing data?

    Hi,
    What is the proper way to convert a VHD from dynamic to basic without losing data?
    Our VM is running Windows Server 2008 R2 SP1
    Thanks in advanced

    Hi efebo,
    "After you convert a basic disk to a dynamic disk, you cannot change the dynamic volumes back to partitions. Instead, you must delete all dynamic volumes on the disk and then use the
    Convert To Basic Disk command. If you want to keep your data, you must first back it up or move it to another volume. "
    Please refer to following link:
    http://technet.microsoft.com/en-us/library/cc731274.aspx
    You can try to backup the dynamic volume via Windows Server Backup then restore it to a new basic VHD file ( the space is recommended to be   larger than or equal to the old one ) .
    Hope it helps
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Downloaded songs losing data..

    I have numerous previously downloaded songs that appear to be, losing data.   I'm listening to incomplete songs and it's driving me nuts...

    Yes, they were checked and selected to sync.. all purchased with the same appleid and I never received any error messages.. funny as it is though, after rwading some threads I saw one person mention that they played a few seconds of each song then synced again and it worked.. so I tried it and now all my purchases show up in my playlist on the iphone itself. Weird... but hey whatever works. Thanks SO much for responding though, I was definitely more than a little upset lol

  • Can I change partition size of external HD without losing Data

    I have an external HD that I use one partition for backup and use another partition for Time Machine. I need to change the sizes, need more on my backup. Can I change partition size of external HD without losing Data? I just changed from a Powermac G4 using Leopard to a Macbook Pro with Lion, so I am also thinkin in getting everything set up, format the Time Machine with the old stuff and make a new Time Machine.

    The Disk Utility can't change the starting point of a partition without erasing it and the data on it.
    (72024)

  • Why do I keep losing Data in my Health App DashBoard?

    Why do I keep losing Data in my Health App DashBoard? I have restored and got it back and it keeps losing data 4 days in a row.

    Hi saer1964, 
    Thanks for visiting Apple Support Communities. 
    It sounds like you're not hearing sound when using Bluetooth connected to your car stereo. It can be difficult to say why this might happen, and there are some good troubleshooting steps that we can use to isolate or resolve the cause of this behavior. 
    I would start with the troubleshooting steps mentioned at these links:
    iOS: Troubleshooting Bluetooth connections - Apple Support
    If you can’t use a Bluetooth accessory or car kit - Apple Support
    These steps can help resolve many common issues with Bluetooth connections. 
    Best Regards,
    Jeremy

  • How do I adjust my page so it fits on my desktop without losing data?

    How do I adjust my pages so they fit on my desktop without losing data?

    Hi Gemma,
    Which Mac? What app do you mean? What size screen do you have?
    Have you tried clicking the little green dot at he top left of the windows?

  • Can I resync without losing data?

    My computer just had a major crash, which in short caused all my itunes files to be dumped in folders around my computer. I managed to track down most of them, but I now have to empty my ipod and re sync to be able to use it with itunes again. unfortunately I have yet to find some itunes library files that will be deleted form my ipod if I sync.
    I have only 2 questions
    1. Is there a playlist file for (My) itunes playlist that I can use to sync?
    2. Can I re sync my apps WITHOUT losing data such as save games and high scores?
    Any responses would be appreciated

    1. Look around for an iTunes xml file - iTunes Music Library.xml. I believe that file contains playlists and other "format" type things.
    2. If you restore your iPod, you will lose the data with your games. If you don't have to restore it, then no, it will not be lost on a sync.
    Google Pod to PC. It's a freeware program for transferring your library from your touch back to your computer. This would have saved you hours, BTW.

  • How to avoid losing data when communicat​e with high speed motor?

    I connect with high speed servo motor via RS232. To avoid losing data. i thought to set receive buffer, only read the buffer if it collected all bytes. Is this possible?

    Hi,
    If you know the number of bytes you are trying to read, you can set a viRead call to return information once the particular number of bytes have been read.  For more information on this, take a look at the KnowledgeBase article on a Serial VISA Read to read a requested number of bytes. 
    Even if you read before all bytes have been collected, you should not lose data.  When the specified number of bytes are stored in the buffer, the viRead call will send the information to the program, and new data coming in will be stored in the buffer until the byte count is reached again.
    I hope this helps,
    Lauren L.
    Applications Engineering
    National Instruments

Maybe you are looking for

  • Mid-2010 MacBook Pro - Irregular internet/wi-fi performance

    Hey all. First, let me apologise if this is a repeat of old discussions. It seems people have been having a few connection issues with the latest MacBook Pro but I couldn't find the exact problem I'm having. So... ever since upgrading to a MacBook Pr

  • Windows not loading properly in boot camp, black screen

    Hi guys, having problems with bootcamp, running the latest version under snow leopard on an intel mac mini i bought a copy of XP on ebay, to my dismay, what i actually got in the post was a recovery disk for a dell laptop, and a product key. Although

  • Acrobat 9 Pro fillable form used in website

    I created a form in 9 Pro, and I attempted to enable it to be viewed in Reader, but I got a message saying "this form cannot be enabled for Acrobat Reader."  I'm not sure why.  When I insert the form into my website, the link (in IE and Firefox) star

  • Resolving connection lost....

    Hi, Many times when I'm moving data from one DB to another, my connection is being lost and the procedure results in "running" status for longer time. Is there any piece of code which frequently check the connection (like the one we have in Toad (Tes

  • VA05 Transaction Userexit Division Problem

    Hi All, I have a problem during division for VA05 Transaction. I had appended few fields in VBMTV structure. Fieldname        Data Element   Data type  length Decimal  Refernce table   Refernce field ZZSETREM      ZSETREM        QUAN        13      3