---
title: "TextField html字符支持鼠标点击"
author: "fengxiangpiao"
date: "2011-09-08T14:51:44Z"
tags: []
categories: ["编程语言"]
slug: "textfield-html"
draft: false
lastmod: "2011-09-08T14:51:44Z"
id: 1168523
url: "https://kaillansoft.iteye.com/blog/1168523"
---

1. MyTxt.htmlText="快去找&lt;b&gt;&lt;font color='#FF0000'&gt;&lt;a href='event:X\_100\_Y\_100'&gt;【圣城铁匠】&lt;/a&gt;&lt;/font&gt;&lt;/b&gt;，他为你做好了一把&lt;b&gt;&lt;font color='#0000FF'&gt;&lt;img src='FuTou' align='left' id='futou'&gt;&lt;a href='event:Id\_200'&gt;【屠龙宝刀】&lt;/a&gt;&lt;/font&gt;&lt;/b&gt;不要犹豫了，快去试试看锋利程度!";MyTxt.addEventListener(TextEvent.LINK,showit);
2. trace(MyTxt.getImageReference('futou'));
3. MyTxt.getImageReference('futou').addEventListener(MouseEvent.CLICK,function(e){
4. trace('heheheheheheh');
5. })
6. MyTxt.getImageReference('futou').addEventListener(MouseEvent.MOUSE\_OVER,function(e){
7. trace('over');
8. })