Skip to main content
Participant
February 21, 2009
Answered

Disappearing links?

  • February 21, 2009
  • 1 reply
  • 402 views
I've been using the mxmlChildren setter in ActionScript to add multiple elements to textflows and paragraphs at once. After trying the last two Gumbo builds, it seems like whenever I use mxmlChildren setter to append an array of links and spans to a textflow or to a paragraph, the links do not show up for some reason (but the other spans do). Has the way this method worked changed? Is there something special I need to do for links?

Edit: Actually, I made a coding mistake while trying to reproduce the issue. The links are still disappearing from my application when changing the Flex compiler to the last two Gumbo builds for some reason. mxmlChildren doesn't seem to be the problem though.

This topic has been closed for replies.
Correct answer rdermer
I recommend calling replaceChildren directly.

mxmlChildren is intended for compiled mxml and has special handling intended of the children intended only for that case. It tosses out links if they aren't in a paragraph.

Of course if you call replaceChildren on a TextFlow, for example, it'll throw if you add links that aren't in paragraphs.

1 reply

rdermerCorrect answer
Adobe Employee
February 21, 2009
I recommend calling replaceChildren directly.

mxmlChildren is intended for compiled mxml and has special handling intended of the children intended only for that case. It tosses out links if they aren't in a paragraph.

Of course if you call replaceChildren on a TextFlow, for example, it'll throw if you add links that aren't in paragraphs.
Participant
February 23, 2009
Thanks. I didn't notice the replaceChildren method before.
I was using mxmlChildren repeatedly on the same paragraph to append different links and text. It seems like that was messing things up (not appending correctly maybe?).