Roll on dynamic text portion

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default Roll on dynamic text portion

    Hi,

    I would like to generate a rollover effect on a dynamic text (some word on the text).
    The text would come from XML data, parsed by flash.

    Let me explain:

    Here is the XML

    <myxml>
    <mytext>
    <p>Hi i'm here</p>
    <p>Helooo i'm still <myroll text="yeah">there</myroll></p>
    </mytext>
    </myxml>


    What I want is to parse the XML, then assign the content of <mytext> in a dynamic text area. In this text area, moving the mouse over the text "there" (between <myroll> element) will throw the text "yeah" in a rollover effect.

    I'm able to do everything, parse the XML, make the text area in action script.

    The big problem comes from the creation of the rollover effect throwing "yeah". I don't have any idea how to make it in actionscript. I might create an invisible button but I don't know how to position it...

    Any idea would be appreciate.
    Thx for your time.

    Nicolas



    cocosama webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. Streaming only a portion of a flv
      I am trying to set up a flv player which will play only a portion of a flv file from a streaming server. The file is a lengthy file, and I want two...
    2. load external text to dynamic text field in levels
      Dear Sir I found the Tech Noe Index #16238 is useful in creating dynamically loaded text from external text file. However, the method mentioned...
    3. Dynamic text box within dynamic movie clip
      I'm having a similar problem. On mine I noticed that although the text doesn't show and the border doesn't show, the cursor changes appropriately...
    4. Playing a portion of a movie
      Hi I'm wanting to play a movie as a linked movie in a portion of the main movie screen but only show a potion of the linked movie screen. I'm right...
    5. Portion of page showing a different url
      Yes it sounds like frames would likely be the best approach for this kind of design. Here's more info:...
  3. #2

    Default Re: Roll on dynamic text portion

    Flash does not natively support rollover events for text, but only for
    buttons and movieclip. So there is no direct way of achieving what you want.
    As a matter of fact, I don't think there's any way if you want to publsh for
    flashplayer 6 or earlier with dynamically loaded text.
    For Flash player 7, one workaround would be to replace your <myroll
    text="yeah">there</myroll> with a movieclip from the library using the IMG
    tag, which then can receive onRollover events. The replacement can be done
    either in your XML, or in actionscript. The latter may make things more
    flexible, but that's up to you.

    John

    --
    ----------------------------------------------------------------------------
    -----------
    RESOURCES
    [url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
    ----------------------------------------------------------------------------
    -----------
    TUTORIALS at
    [url]www.laiverd.com[/url]
    Flash & PHP Emailform
    Using textfiles in Flash
    ----------------------------------------------------------------------------
    -----------


    Laiverd.COM Guest

  4. #3

    Default Re: Roll on dynamic text portion

    Thanks for the reply.

    No problem with Flash 7, I'm able to use it and to publish my movies with it.

    I tested the <img> tag in html text with a call to a movie clip. Flash does replace with the right clip from the library, but the position is right or left (default left), no way to place it in the text like an image in real HTML.

    Any idea?

    Thanks for your time.

    Nicolas


    cocosama webforumsuser@macromedia.com Guest

  5. #4

    Default Re: Roll on dynamic text portion

    It can be done but you really have to play around with the size of the
    movieclip u use. If it's too lareg it will interfere with the leading of the
    text. Also; don't use the align attribute in the IMG tag.
    You may wanna check this file: it display's a tooltip over text in a dynamic
    textfield and uses what I described in the previous post. It's far from
    perfect (the search replace function only finds one custom tag to replace),
    but shows what can be done, with some work ;-)

    [url]http://home.hccnet.nl/john.mulder/flash/textfield_tooltip.zip[/url]

    John

    --
    ----------------------------------------------------------------------------
    -----------
    RESOURCES
    [url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
    ----------------------------------------------------------------------------
    -----------
    TUTORIALS at
    [url]www.laiverd.com[/url]
    Flash & PHP Emailform
    Using textfiles in Flash
    ----------------------------------------------------------------------------
    -----------


    Laiverd.COM Guest

  6. #5

    Default Re: Roll on dynamic text portion

    As a matter of fact; you may have to play around with the size of the
    textfield in the movieclip also to prevent interferecnce with the text
    leading.

    john

    --
    ----------------------------------------------------------------------------
    -----------
    RESOURCES
    [url]http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash[/url]
    ----------------------------------------------------------------------------
    -----------
    TUTORIALS at
    [url]www.laiverd.com[/url]
    Flash & PHP Emailform
    Using textfiles in Flash
    ----------------------------------------------------------------------------
    -----------


    Laiverd.COM Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139