Flex 字幕滚动效果 网站公告效果
发布时间:2020-12-15 05:03:56 所属栏目:百科 来源:网络整理
导读:这篇总结的不错 ?xml version="1.0" encoding="utf-8"?mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"creationComplete="complete()" mx:Script![CDATA[private function complete():void{move_up.xFrom = ca.width - 6; //加
这篇总结的不错 <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="complete()" > <mx:Script> <![CDATA[ private function complete():void { move_up.xFrom = ca.width - 6; //加6减6是为了首尾连接更加自然" move_up.xTo = 0 - description.width + 6; //加6减6是为了首尾连接更加自然" move_up.repeatCount = 0; //循环 move_up.repeatDelay = 0; //循环间隔时间 move_up.duration = 7000; //滚动一次的时间,单位毫秒 move_up.play(); } private function move_pause():void { move_up.pause(); //停止 } private function move_resume():void { move_up.resume(); //从停留位置开始 } ]]> </mx:Script> <mx:Move id="move_up" target="{description}" /> <mx:Panel width="800" height="200" layout="absolute" title="Affiche" fontSize="13" horizontalCenter="0" verticalCenter="0"> <mx:Canvas id="ca" width="100%" height="100%" left="0" top="0" horizontalScrollPolicy="off" verticalScrollPolicy="off" mouSEOver="move_pause()" mouSEOut="move_resume()"> <mx:Label id="description" horizontalCenter="0" text="<font color='#ff0000'>1. some text here</font><br><font color='#ff0000'>2. <a href='http://sports.sina.com.cn/nba' target='_blank'>链接到新浪NBA</a></font><br>some text here" verticalCenter="0"> </mx:Label> </mx:Canvas> </mx:Panel> </mx:Application>这个也不错 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |