Flex图片加载失败和遮罩效果处理实例
发布时间:2020-12-15 04:33:30 所属栏目:百科 来源:网络整理
导读:?xml version="1.0" encoding="utf-8"?s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"fx:Declarations!-- 将非可视元素
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Declarations> <!-- 将非可视元素(例如服务、值对象)放在此处 --> </fx:Declarations> <fx:Script> <![CDATA[ [Embed(source='assets/default.gif')] public var defaultImg:Class; ]]> </fx:Script> <s:Group horizontalCenter="0" verticalCenter="0"> <s:Group depth="99" x="-22" y="-35" width="120" height="120"> <s:Image id="doctorAvatar" source="http://blog.minidx.com/images/2.jpg" width="110" height="110" horizontalCenter="0" verticalCenter="0" mask="{cornerRadiusMask}" scaleMode="letterbox" ioError="doctorAvatar.source=defaultImg;" /> <s:BorderContainer id="cornerRadiusMask" width="100%" height="100%" backgroundColor="0xffffff" cornerRadius="90" /> <s:BitmapImage source="@Embed('assets/bg.png')" /> </s:Group> </s:Group> </s:Application> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |