Flex 超链接

来源:互联网 发布:protobuf3 json 编辑:程序博客网 时间:2024/05/22 00:06
 

<?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:Script>
  <![CDATA[
   internal function initApp():void{  
    var str:String = "<a target='_blank' href='BP.html'>点击超级链接</a>";  
    link.htmlText = str;
   }  
   internal function openUrl():void{  
    navigateToURL(new URLRequest("BP.html"),"_blank");  
   }


   
  ]]>
 </fx:Script>
 <fx:Declarations>
  <!-- 将非可视元素(例如服务、值对象)放在此处 -->
 </fx:Declarations>
 <mx:Button x="72" y="117" label="点击超级链接" fontSize="13" id="link2" click="openUrl()"/>  
 <mx:Text id="link" text="xcopy" x="72" y="47" fontSize="13"/>

</s:Application>

原创粉丝点击