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

  • Home
  • SEARCH
  • 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 811289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:01:18+00:00 2026-05-15T01:01:18+00:00

when the embedFonts is removed, it works perfectly as expect. Otherwise when an image

  • 0

when the embedFonts is removed, it works perfectly as expect. Otherwise when an image is clicked, it selects the whole text around it.

Alternatively can anyone suggest a method to style dynamic textfields instead of using html?

  • 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-15T01:01:18+00:00Added an answer on May 15, 2026 at 1:01 am

    I was able to have bring the same effect without using the anchor tag. Apparently there’s a bug in using Anchor tag with images. Anyway here’s what I did to overcome this.

    import flash.display.*;
    import flash.text.*;
    import flash.events.*;
    import flash.ui.Mouse;
    private function init():void {
    
         //....
         var txt:String = "Curabitur dolor eros, gravida et.<p class='defStyle'><img src='003.jpg' id='0002'><br><br><br><br><br>Quisque facilisis erat a dui. Nam malesuada ornare dolor. Cras gravida, diam sit amet rhoncus ornare, erat elit consectetuer erat, id egestas pede nibh eget odio.</p>";
         testtext.htmlText=txt;
    
         var myPattern:RegExp =/<img[^>]+ids*=s*['"]([A-Za-z0-9]+)['"][^>]*\s*>/igmxs;  
         var result:Object = myPattern.exec(txt);
    
         while (result != null) {
              var id = result[1];
              trace(id);
              var image:DisplayObject = testtext.getImageReference(id);
              image.addEventListener(MouseEvent.CLICK, imgClick);
              image.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
              image.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
              result = myPattern.exec(txt);
          }
    
         ...//more
    
    }
    
    function imgClick(e:MouseEvent):void {
         trace('hello '+e.target.name);
    }
    function mouseOverHandler(e:MouseEvent):void {
         Mouse.cursor='button';
    }
    function mouseOutHandler(e:MouseEvent):void {
         Mouse.cursor='auto';
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to save text of textarea (flash 10, as3, cs5) in some
This is a test for a XML image menu. In the code I create
I'm using Flex 3, SDK 3.2. I'm having problems determining the height of a
I'm stuck with a problem. I'm trying to embed fonts with @font-face but they

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.