Skip to main content
kutu182
Participant
May 16, 2009
Question

Hand Cursor over LinkElement

  • May 16, 2009
  • 1 reply
  • 1124 views

I try 432 and 427 build.

In \examples\actionscript\swfs\CustomLinkEventHandler.swf dont work hand cursor over LinkElement

Then i write simple code for testing.

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"

horizontalAlign="left"

applicationComplete="init()">

<mx:Script>

<![CDATA[

import flashx.textLayout.events.FlowElementMouseEvent;

import flashx.textLayout.edit.SelectionManager;

import flashx.textLayout.container.ContainerController;

import flashx.textLayout.elements.LinkElement;

import flashx.textLayout.elements.SpanElement;

import flashx.textLayout.elements.ParagraphElement;

import flashx.textLayout.formats.TextLayoutFormat;

import flashx.textLayout.elements.TextFlow;

public function init():void {

var sp:Sprite = new Sprite();

rawChildren.addChild(sp);

var textFlow:TextFlow = new TextFlow();

var format:TextLayoutFormat = new TextLayoutFormat();

format.fontFamily = "Trebuchet MS";

format.fontSize = 18;

textFlow.hostFormat = format;

var p:ParagraphElement = new ParagraphElement();

var span:SpanElement = new SpanElement();

var link:LinkElement = new LinkElement();

var linkSpan:SpanElement = new SpanElement();

span.text = "link on yandex ";

link.linkHoverFormat = {color:0xFF0000, textDecoration:"underline"};

link.href = "http://ya.ru";

linkSpan.text = "yandex ru";

link.addChild(linkSpan);

p.addChild(span);

p.addChild(link);

textFlow.addChild(p);

textFlow.flowComposer.addController(new ContainerController(sp, stage.stageWidth, stage.stageHeight));

textFlow.flowComposer.updateAllControllers();

}

]]>

</mx:Script>

</mx:Application>

How can i do hand cursor over LinkElement?

This topic has been closed for replies.

1 reply

Adobe Employee
May 19, 2009

This is a bug -- thanks for the isolated example, it made it really easy to reproduce. Looks like it happens when the end of the link coincides with the end of the TextFlow. Shouldn't take too long to get a fix in. Thanks!