ITeye博客

TextField html字符支持鼠标点击

fengxiangpiao · 2011-09-08 14:51 · AS3 · 编程语言 · Markdown

  1. MyTxt.htmlText="快去找<b><font color='#FF0000'><a href='event:X_100_Y_100'>【圣城铁匠】</a></font></b>,他为你做好了一把<b><font color='#0000FF'><img src='FuTou' align='left' id='futou'><a href='event:Id_200'>【屠龙宝刀】</a></font></b>不要犹豫了,快去试试看锋利程度!";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. })

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。