开发者

Flash link on static text

开发者 https://www.devze.com 2022-12-20 22:44 出处:网络
in flash how to give a link on static text with the mouse over=underline effect.... please rep开发者_C百科ly....Adding hyperlinks to a static text is not straightforward as in the case of a normal te

in flash how to give a link on static text with the mouse over=underline effect....

please rep开发者_C百科ly....


Adding hyperlinks to a static text is not straightforward as in the case of a normal text field because

  • StaticText doesn't have htmlText property like a TextField - it inherits directly from DisplayObject.
  • You cannot mimic it by listening to mouse events as DisplayObject doesn't dispatch mouse events - only an InteractiveObejct would dispatch mouse/keyboard events.
  • There is no graphics property for a DisplayObject, hence you cannot mimic underlining behavior.
  • The authoring tool may export multiple text field objects comprising the complete text. For example, for vertical text, the authoring tool will create one text field per character.

May be you can work around these limitations by wrapping the static text inside a Sprite - but I would use a TextField instead of reinventing the wheel.

0

精彩评论

暂无评论...
验证码 换一张
取 消