I have a paragraph with text and a link.
The link contains a span (backgroundColor = blue, fontWeight=bold) and all properties of each link format (format, linkNormalFormat, linkActiveFormat, linkHoverFormat) inherit from the paragraph format.
I added event listener on the link to manage tooltip.
It works perfectly if paragraph.textAlign = "left" or "right" as shown in attached pictures.
But if I change my code to paragrah.textAlign="justify" (without changing anything else), I obtain a bad result (as shown in attached picture) :
- the backgroundColor on the span doesn't work anymore (but the bold is still working)
- my tooltip event listener doesn't work anymore.
I don't understand why, thanks for your help !
PS : I used the build 13875.
I can't quite duplicate the bug. Can you send your markup or even better a small actionscript example demonstrating the problem that can be built? Also does removing the event listener make a difference? Finally have you tried it with the 10.1 player?
Here is the code :
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
private var textFlow:TextFlow;
private function init():void
var container:UIComponent = new UIComponent();
container.width = textArea.width - 5;
container.height = textArea.height - 5;
textFlow = new TextFlow();
var controller:ContainerController = new ContainerController(container);//, width, height);
var p:ParagraphElement = new ParagraphElement();
p.textAlign = TextAlign.JUSTIFY;
textFlow.paragraphStartIndent = 50;
textFlow.paragraphEndIndent = 50;
var span1:SpanElement = new SpanElement();
span1.text = "Legal values are numbers from 1 to 720 Legal values are numbers from 1 to 720 ";
var link:LinkElement = new LinkElement();
var linkSpan:SpanElement = new SpanElement();
linkSpan.text = "a link";
link.addEventListener(FlowElementMouseEvent.ROLL_OVER, function (e:Event):void
onoverbtn.visible = true;
link.addEventListener(FlowElementMouseEvent.ROLL_OUT, function (e:Event):void
onoverbtn.visible = false;
var span2:SpanElement = new SpanElement();
span2.text = " Legal values are numbers from 1 to 720 Legal values are numbers from 1 to 720 ....";
<mx:Button id="onoverbtn" label="on over !!!!" visible="false" fontSize="50"/>
<mx:Canvas id="textArea" backgroundColor="#ffffff" verticalCenter="0" horizontalCenter="0" height="500" width="500"/>
Comment and uncomment row 31 (p.textAlign = TextAlign.JUSTIFY;), if commented, everything is ok, else, the link doesn't work anymore
I have flashplayer 10,0,32,18 installed.
Thanks a lot.
The behaviour is very mysterious :
on my pc, if I put :
==> everything works in justify mode
==> it doesn't work in justify mode !!!
On an other pc, the limit is different :
8048 => it works
8049 => it does'nt work
Any limitation known about the composition height ?
I can duplicate the bug with the 10.0 player - it doesn't reproduce with the 10.1 player. Looks like its one of the player bugs that was fixed in 10.1.
You can download player 10.1 beta 2 here:
I'm using a more recent 101 player than beta 2 so I can't guarantee the fix is in beta2.
I don't have a 10.0 workaround.
It seems to work in this case but why are you using UIComponent? Why not use a Sprite and add it to the textArea's rawChildren? Is there an advantage to UIComponent? A sprite is fully interactive in this case. Switching to Sprite doesn't solve the bug but I was just curious.
Europe, Middle East and Africa