Ask a Question related to Macromedia Director 3D, Design and Development.

  1. #1

    Default Text overlays

    I have a text overlay which is one line long. when I swap the cast member with
    another text that wraps to a second line, the text on two lines is squished to
    the same height as the orignal text.
    It looks like it is trying to fit the wrapped text into the same area as the
    orignal text. Any solution for this? Or am I loading the new text wrong? I use
    this code to replace the overlay text with a new text.




    on setText (nextText)
    trace("nextText"&&dirText)
    sCastName = getCastName() -- this is the
    cast name for the 3d scene
    scene = member(sCastName)
    member("myText").text = nextText -- set the new text
    scene.deleteTexture("oText") -- delete the old text overlay
    texture
    overlay2 = scene.newTexture("oText", #fromcastmember, member("myText"))
    -- load the new texture with the new text
    overlay2.renderformat=#rgba8888
    end

    positdan Guest

  2. Similar Questions and Discussions

    1. limitation to numer of overlays
      hello 3d artists, I am currently designing a director/shockwave3d application that makes extensive use of overlays for a modular user interface...
    2. Image overlays - how?
      I'm prototyping an application at the Australian Bureau of Met. I want to design a set of controls for overlaying and interacting with images. I...
    3. Creating overlays with an alpha channel
      Here are two methods to create textures for an overlay, depending upon its usage: * Easiest way to create an opacity mask (giving a shape to...
    4. Flash overlays DHMTL menu
      Hi, I'm a bit of a novice with flash. I have a drop-down DHMTL menu on my site and have added a flash animation underneath. Unfortunately, the flash...
    5. translucent text overlays.
      could someone explain how to make a translucent scroll bar frame that overlays a background image? The textbox should be translucent, but the text...
  3. #2

    Default Re: Text overlays

    You may want to create your texture from a "container" image object that is a
    power of 2, rather than creating it from a cast member with random dimensions.
    Look at imaging lingo...

    Measure the width and height of your text member after putting the new text
    into it. Then create an image who's dimensions are the next power of 2 larger
    than your text dimensions (ex. a 98 x 14 text member would need a 128 x 16
    image). Then copypixels() the text member's image onto the container image, and
    create your texture from the container image using #fromImageObject.

    You can set the alpha of the image too, so the background of your text is
    transparent.

    tedalde2 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