TextEvent in HTML text not sent?


Hello

I have a problem with HTML text within a text component, where links are created using the < a href = "event: syntax."

I created an event for the TextEvent listener, linkHandler, but the event seems to never go off when I click on a link.

Any clue? Here is a code snippet:

< mx:Script >
<! [CDATA]

flash.net import. *;
import flash.text.TextField;
import flash.events.TextEvent;

private void init(event:Event):void
{
Add an event handler (listener) HTML text
tandctext.addEventListener (TextEvent.LINK, linkHandler);
}

public void linkHandler(linkEvent:TextEvent): void {}
{Switch (linkEvent.Text)}
case "tandc":
navigateToURL (new URLRequest (" http://"), "_blank");
break;
case 'limit ':
navigateToURL (new URLRequest (" http://"), "_blank");
}
}

[]] >
< / mx:Script >

< mx:Text id = "tandctext" styleName = "conditionsgenerales" x = "10" y = "37" width = "331" height = "50" color = "black" fontStyle = "plain" fontSize = "10" >
< mx:htmlText >
<! [CDATA [it's a preview.] [[As such, there is a < a href = "event: tandc" > general conditions as well as some < /a > < a href = "event: limitations" > limits < /a >, you need to know.]] >
< / mx:htmlText >
< / mx:Text >

See you soon,.
Karl.

Good,

I found the idea.

Instead use:

private void init(event:Event):void
{
Add an event handler (listener) HTML text
tandctext.addEventListener (TextEvent.LINK, linkHandler);
}

I just use the binding attribute in the tag text:

And voila!

I get my sent event!

Tags: Flex

Similar Questions

  • is it possible to make a Web page expires? Is there a setting in dreamweaver or html text that will make a site Web do not load a page after a certain date?

    is it possible to make a Web page expires? Is there a setting in dreamweaver or html text that will make a site Web do not load a page after a certain date?

    You should probably give us more info on what you are trying to reach.

    I have Web sites that display information on the courses, with the possibility to register online. We do not want the announced course when their departure date has passed, so they are automatically removed from view. In this way, we have thousands of courses by year announced without worrying that the old courses are still on Web sites.

    To do this, the PHP and a database are used. Registration of database includes the date, which is verified by the query sent by PHP.

  • Text message error "message not sent".

    After upgrade to os 9.5.3, some text messages are not sent. I need to fix?

    Hono wrote:

    After upgrade to os 9.5.3, some text messages are not sent. I need to fix?

    Text is a characteristic of carrier, ask your cell phone provider which is the fix.

  • Search for text messages sent or not on the iPhone 6

    I can't locate text messages sent on the iPhone or not 6. Is there a location for human remains or is there something missing in my iOS?

    IF you have unsent Messages on the phone, they would be afficheraient always in the Messages application. There is no message.

  • Text message sent but not received?

    Recently, I sent a very long text to a friend who has an android. The message was not sent because it was too long, but he later received it. Now every time I text him messages are sent, but he can't see them. Send SMS with other androids just doesn't only a specific friend. Suggestions? We have both tried to restart our phones.

    Are you sure have the right number in his contacts? And make sure you have not blocked his number. I hope it works for you!

  • On Firefox only, I get problems with a few Joomla sites using the JA_purity template. Error: has not been loaded because its MIME type "text/html", is not "text /".

    Hello

    I updated Firefox on my computer for 13.01. Now, he struggles to read about 2 sites - both are Joomla and based on the model of JA-purity. What happens is that it fails to load the CSS files to do with the side and the top of the Joomla site menus. The file comes up with this:

    because its MIME type "text/html", is not "text/css".
    Source file: http://extensions.joomla.org/
    Line: 0

    This error does not appear with other browsers and it displays perfectly in fact in all other browsers.

    I'm new on this but I read the following article and think it could be my problem

    https://developer.Mozilla.org/en/Incorrect_MIME_Type_for_CSS_Files

    Where Im stuck, it's that I did not fully understand what to make of this article, if I could get a step by step guide to fix this problem that would be greatly appreciated.

    I apologize in advance if the answer lies somewhere here - I have had a look and couldn't get out.

    Thank you
    Alex

    I don't see that the error and all style sheets seem to load.

    Reload Web pages, and ignore the cache.

    • Hold SHIFT and click reload.
    • Press 'Ctrl + F5' or 'Ctrl + Shift + R' (Windows, Linux)
    • Press 'Cmd + Shift + R' (MAC)

    Clear the cache and cookies from sites that cause problems.

    "Clear the Cache":

    • Tools > Options > advanced > network > storage (Cache) offline: 'clear now '.

    'Delete Cookies' sites causing problems:

    • Tools > Options > privacy > Cookies: "show the Cookies".
  • Up to version 6.22 of entry and other components HTML texts have been with a width. Now, after installing version 7. The entries have increased in size not more about before defined sizes... You can fix this?

    Up to version 6.22 of entry and other components HTML texts have been with a width. Now, after installing version 7. The entries have increased in size not more about before defined sizes... You can fix this?

    I think it's about the size, just differently than before. See the discussion in:
    https://Bugzilla.Mozilla.org/show_bug.cgi?id=691157

  • BlackBerry smartphones can only send emails to plain text, not HTML

    my new phone will only send emails to plain text. its set up to send in HTML, but it also denies. any thoughts?

    Thank you!

    Hello and welcome to the Forums of Support BlackBerry.com.

    BlackBerrys send text, not HTML.

    Can receive and display HTML messages, but not send.

  • Dynamic text field changes color but the bullets are not html text.

    I am tarea to use a dynamic text field to shoot in the html text that contains a bulleted list. Easy enough, that works. But don't take the balls on the color assigned to the field. I tried to put in the html text and also using NewTextFormat and no work. Someone can help me. This should be a simple solution, but I'm not... I want my text and bullets to both be white.

    Simple code below. Using html text inside the document flash and presence of a PivotTable field on the screen named txt. Code should turn text and green balls, but it does not work, only the text goes green

    This.txt.html = true;

    var my_fmt:TextFormat = new TextFormat();
    my_fmt. Color = 0x00FF00; hexadecimal value corresponding to green

    this.txt.htmlText = "< P > This is the first paragraph < /P > < BR > < UL > < LI > Bullet 1 < /LI > < LI > < BR > Bullet 2 < /LI > < LI > < BR > Bullet 3 < /LI > < LI > < BR > Bullet 4 < /LI > < LI > < BR > Bullet 5 < /LI > < /UL >";
    this.txt.setTextFormat (my_fmt);

    Thanks for any help you can give me.

    works for me:

    create a new fla and add a textfield, the name of your instance and copy/paste the code that I have proposed.  any problem?

  • Why the result of the SQL query is not displayed in the HTML text box?

    Hello

    Under query result appears in home > workshop SQL > SQL commands.

    Select t.nom
    of pm_task t
    where: P5_Project_id = t.project_id
    and: P5_task_id = t.id

    But when the same code is run through EditRegion of HTML text box > region definition > sources > Source region, the result is not displayed.
    Why is this so, and what is the solution?

    Thank you
    Guy

    You need a report from the region for this ;) A region of HTML is to display a static text or page items.

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • Contact form are not sent to email

    I've done loads of this time contact form and it works very well, but for some reason that this particular form are not sent to email. Php is good, so it must be my form. I'll put the two pieces of code up anyway. Thank you

    PHP:

    <? PHP

    If {($_POST)}

    If (! filter_input (INPUT_POST, 'email', FILTER_VALIDATE_EMAIL)) {}

    $message = 'Please enter a correct e-mail address' ;} else {}

    $name = strip_tags($_POST['name']);

    $company_name = strip_tags($_POST['company_name']);

    $telephone = strip_tags($_POST['telephone']);

    $email = $_POST ['email'];

    $comments = strip_tags($_POST['comments']);

      $to = ' [email protected] ';

    $subject = 'Under contact form.';

    $body = $name. "\n". $company_name. "\n". $telephone. "\n". $email. « \n ». $comments;

    $headers = ' from: '. $email;

    If (mail ($ $subject, $body, $headers)) {}

    echo ' please contact us. We\ will be in contact soon!';

    } else {}

    $message = ' sorry, an error has occurred. Please try again later.';

    }

    }}

    ? >

    <? PHP echo "< style p =" color: red "> $message < /p >"? >

    HTML:

    < form id = "contact form" action = "" method = "post" > "

    < p > name: < br / > < input name = "name" type = 'text' required / > < / p >

    < p > company name: < br / > < input name = "company" type = "text" required / > < / p >

    < p > telephone: < br / > < input name = "phone" type = "such" required / > < / p >

    < p > E-mail: < br / > < input name = "email" type = "email" required / > < / p >

    < p > comments: < br / > < textarea name = required "comments" / > < / textarea > < / p >

    < input type = "submit" name = "submit" value = "Send!" formmethod = 'post' / >

    < / make >

    There is nothing wrong with the PHP script. If the mail service is not available or for some reason any does not run, you get the message "Sorry, an error has occurred." Because you do not get this consignment, the problem lies elsewhere.

    The server administrator is a person. Mean nobody that does not work contact form and ask if mail is configured on the server and if there is a reason email PHP would not work.

  • Buttons to send the html text to a textfield

    How to insert html text a dynamic textfield?

    Instance of the textfield object is called myDynamic. The first button is called button1_btn. I've read about htmlText and multiline, but I can't understand how simply attach text to a button and, when the button is pressed, the htmlText is sent into the field.

    firstText var = "";

    firstText.multiline = true;

    firstText.htmlText = "< p > test.» < /p > ";

    button1_btn.addEventListener (MouseEvent.CLICK, myInner);


    function myInner (m:MouseEvent): void {}

    myDynamic.htmlText = firstText;

    }

    First of all you need ro straighten what you do with firstText.

    firstText var = "";   It is granting firstText to a string, not a textfield

    firstText.multiline = true;   These two lines are trying to treat firstText as it is a TextField, but it is not

    firstText.htmlText ="

    test.

    ";

    What follows could close you get to what you're after, but you might need to explain what is not if...

    var firstText ="

    test.

    ";

    button1_btn.addEventListener (MouseEvent.CLICK, myInner);

    function myInner (m:MouseEvent): void {}

    myDynamic.htmlText = firstText;

    }

  • Safari 9.1.3 textedit html/css not displaying does not correctly

    I am trying to learn html/css and I'm going through a basis of teaching course that you type some html and css style, and then open it in Safari.

    I went to textedit preferences and selected plain text, I unchecked .txt extension and saved as index.html to try it in safari, and it does not display properly, are there other settings should I set in textedit or safari so that it appears correctly. Here is my simple html text. Safari does not display the style.

    < html >

    < head >

    < title > coffee Starbuzz < /title >

    < style type = "text/css" >

    {body

    background-color: #d2b48c;

    left margin: 20%;

    right margin: 20%;

    Border: 2px dotted black;

    padding: 10px 10px 10px 10px

    do-family: without serif.

    }

    < / style >

    < / head >

    < body >

    Drinks at the coffee Starrbuzz < h1 > < / h1 >

    House mix of < h2 > $ 1.49 < / h2 >

    A smooth, sweet blend of < p > coffee from Mexico, Guatemala and bolivar. < /p >

    < h2 > moka Caffè Latte, $2.35 < / h2 >

    < p > Espresso, steamed milk chocolate syrup. < /p >

    < h2 > Cappuccino, $1.89 < / h2 >

    mix of espresso, steamed milk and milk foam. < /p > < p >

    < h2 > the Chai, $1.85 < / h2 >

    < p > a spicy drink made with black tea, spices, milk and honey < /p >

    < / body >

    < / html >

    My iOS is 10.11.6 Safari is 9.1.3

    Thank you

    Mike

    Have you tried to give the file an extension .css?

  • When you reply to my messages arrive empty and I'm still wondering on some long filenames which is not sent

    I respond to emails a box will appear asking you if I want to save the text, and then when I send the answer, I still wonder about some long files that is not sent as and my replies come empty to the recipients.

    You use Avast?

  • text messages sent with an email address from a touch ipod duplicated on a second ipod touch using a different email address, but the two ipods are controlled by a parent with the same apple ID and password.

    Text messages sent with an email address from a touch ipod duplicated on a second ipod touch using a different email address, but the two ipods are controlled by a parent with the same apple ID and password.  This has happened recently.  My two girls have used their respective ipods and texting, without their messages of duplication for each of the other ipods for more than a year.  Somehow recently, both addresses seem to be synced with them or something, so that both see each and other messages.  I've recently updated two ipods, iTunes on my computer--not the cloud and added music for two ipods, but has not changed anything by email email settings or message I know.  Help, please!

    Welcome to the Apple community.

    I can't fully follow how you have everything set up, but a glance at the settings > messages > send & receive

Maybe you are looking for