Skip to main content
Participant
November 18, 2011
Question

Problem with InlineGraphicElement inside LinkElement

  • November 18, 2011
  • 1 reply
  • 741 views

Hi.

I have a problem with resized images inside LinkElements.

TLF Markup: <a><img source='"http://domain.com/images/6773_0.png"'/></a>

LinkElement has a listener of FlowElementMouseEvent.ROLL_OVER. The image is too big for container so i adjust its size after it is loaded (when InlineGraphicElementStatus.READY).

Here is the code for resize:

            if (image.actualWidth > CONT_WIDTH) {

                var coef:Number = image.actualWidth / image.actualHeight;

                image.width = CONT_WIDTH;

                image.height = image.width / coef;

            }

Problem:The area where LinkElement dispatches the event is much smaller than size of the image. What am i doing wrong?)

This topic has been closed for replies.

1 reply

Participating Frequently
November 22, 2011

Have you called updateAllControllers after you changed the image size? Please try this. Besides, please give us your code scrap so that we can track your problem. Thanks