Embeding images in an Flex application

后端 未结 2 624
感情败类
感情败类 2021-01-23 16:53

I use the images in the tooltips. Images are on the server. I\'m using the code:

    var tip1:String;
    tip1 = \"

        
2条回答
  •  庸人自扰
    2021-01-23 17:02

    can't add a comment.. but change:

    imageArray[imageArrayIndex] = new Bitmap(Bitmap(event.currentTarget.content).bitmapData);
    

    to:

    imageArray.addItem(new Bitmap(Bitmap(event.currentTarget.content).bitmapData));
    

    also noticed:

    var request:URLRequest = new URLRequest(imageArray[imageArrayIndex].src_big);
    

    should be:

    var request:URLRequest = new URLRequest(imagesToLoad[imageArrayIndex].src_big);
    

    Jason thanks for this! I am totally new to actionscript/Flex and this helped out a lot. One question is.. How can i make sure the images are all loaded? I am running this code after user interaction, attempting to load a bunch of images, once all loaded i want something to happen (display them in a slideshow). But not sure of the best way to ensure they are all loaded. thanks again!

提交回复
热议问题