A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: display image from hyperlink

  1. #1
    Senior Member
    Join Date
    Mar 2004
    Upper Marlboro, MD

    display image from hyperlink

    I'm trying to achieve this menu list affect in the following link: http://www.karascupcakes.com/cupcakes.html

    on frame 1 of my movie, i have a movie clip named imgholder.
    I have a text box that accepts html. I'm loading an external text file into the box. In the text file is a <ul> list of items.

    What I want to do is hover over the link, then display a specific image to load into the MovieClip.

    Does anyone know what i can do to achieve this affect?

  2. #2
    Senior Member
    Join Date
    Dec 2002
    What you are asking for is not that easy.

    You can use link events inside a dynamic textfield. That way a link event is dispatched when you click the link but it doesn't work for hovering.

    What might work is using getCharIndexAtPoint(x, y) with the mouse coordinates to get the index of the character below the mouse pointer, use getTextFormat(beginIndex, endIndex) with that index value to get the text format of that character and use the url property of that text format to detect what the link is. When you have the link, you can use it to load the image.

  3. #3
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Atlanta GA
    Why a dynamic textfield? First thought I had was a table component, a table of buttons built dynamically.

    Then it occurred to me that perhaps a static build is all that is required.

    Taly, make your "buttons" with the text and a over image like the little triangle for each item, then create a listener event for each that displays whatever you want.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center