Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3499766
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:39:06+00:00 2026-05-18T12:39:06+00:00

I’m loading data from TextFlow to spark:TextArea. In TextFlow i have ‘a href’ elements.

  • 0

I’m loading data from TextFlow to spark:TextArea. In TextFlow i have ‘a href’ elements. Problem lies with the address of the ‘link’ elements. Some of them will go outside of the page (these i will leave without doing anything), other will go to other subpages in my site(these one i have to catch and process in code).

I planned on catching ‘clicking on link’ event to decide what to do, but i can’t do this. I read that by writing

<a href="event:page_adress"> 

i could catch the event on link:event in old mx:TextArea, but i cant do this here. I tried to manualy add:

addEventListener(TextEvent.Link, functionName)

but it doesnt work.
When i change to catching MOUSE_CLICK event i’m catching the event, but cant parse it to get the needed address.

Anybody have idea how to do it? I doesnt have to stick with TextArea, but component have to download content form TextFlow.

PS I noticed that when i added event:page_adress to the ‘a href’ the link stopped working (that means it probably started throwing events), but i cant catch it…

PS2 TextFlow is imported from external database with

TextFlowUtil.importFromXML

i tried using in link element, click event but it doesnt work:

<a click="myClickHandler(event)">

myClickHandler doesnt run after clicking on link…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T12:39:06+00:00Added an answer on May 18, 2026 at 12:39 pm

    OK i found answer on this blog: http://flexdevtips.blogspot.com/2010/10/displaying-html-text-in-labels.html

    Bassicly i had to search whole textFlow and in case of founding a Link – adding manually Event to it.

    Im posting my code in case that the flexdevtips blog might be down in the future:

    /**
    * Finds the first LinkElement recursively and returns it.
    */          
    
    private function findLinkElement(group:FlowGroupElement):void
    {
        var childGroups:Array = [];
        // First check all the child elements of the current group,
        // Also save any children that are FlowGroupElement
        for (var i:int = 0; i < group.numChildren; i++) {
            var element:FlowElement = group.getChildAt(i);
            if (element is LinkElement) 
            {
                linksArray.push(element as LinkElement);
            } else if (element is FlowGroupElement)
            {
                childGroups.push(element);
            }
        }
        // Recursively check the child FlowGroupElements now
        for (i = 0; i < childGroups.length; i++) {
            var childGroup:FlowGroupElement = childGroups[i];
            findLinkElement(childGroup);
        }
    
      }
    

    and i had to use it in my code like this:

    linksArray = [];
    
    findLinkElement(tt.textFlow);
    
    var iter:int=0;
    for (iter = 0 ; iter<linksArray.length ; iter++)
    {
                    linksArray[iter].addEventListener(FlowElementMouseEvent.MOUSE_DOWN,linkSelect, false, 0, true);
    }
    

    where tt is my textarea with imported textFlow

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.