Skip to main content
Participant
Nov 18, 2011 4:15 PM UTC
Question

Problem with InlineGraphicElement inside LinkElement

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 is closed to new replies. Start a new post to keep the conversation going.

1 reply

Participating Frequently
Nov 22, 2011 2:07 AM UTC

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

Translate