Bitmap image in Flex

我的未来我决定 提交于 2019-12-13 06:45:39

问题


I was trying the following

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" >     
    <mx:Canvas id="myBox">
        <mx:Box id="myBox2">
            <mx:Image source="img/hippo.bmp"></mx:Image>
            <mx:Image source="img/close_button.gif"></mx:Image>
        </mx:Box>
    </mx:Canvas>    
</mx:Application>

I got the image of close_button.gif while the other hippo.bmp is not displayed. What is the problem with bitmap file in Flex?


回答1:


Short Answer:

  1. Add the package to your project
  2. Add an image container on the screen
  3. var image1:BmpReader=new BmpReader;
  4. imageObjectOnScreen.addChild(image1.BmpReaderEx(“MyPicture.bmp”));

You must definitely check this.




回答2:


Flex supports embedding JPEG, GIF, and PNG files. You can use these images for icons, skins, and other types of application assets.

http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf60546-7ff2.html



来源:https://stackoverflow.com/questions/7761882/bitmap-image-in-flex

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!