Professional Web Applications Themes

The size (width and height) in pixels of text - Macromedia Director Lingo

Hi, I have a text member that it's text is changed on time to time, and I need to know the size in pixels of the current text at a time I'm not asking for the width and height of the member (member("text).width and member("text).height), but just the size of the part with text in it. Or... in other words, can I resize the text member to adjust it's size to the text it is holding? That way I could get it's size with member("text).width and member("text).height Thanks...

  1. #1

    Default The size (width and height) in pixels of text

    Hi,

    I have a text member that it's text is changed on time to time, and I
    need to know the size in pixels of the current text at a time

    I'm not asking for the width and height of the member
    (member("text).width and member("text).height), but just the size of
    the part with text in it.

    Or... in other words, can I resize the text member to adjust it's size
    to the text it is holding?
    That way I could get it's size with member("text).width and
    member("text).height

    Thanks
    TomaHawK Guest

  2. #2

    Default Re: The size (width and height) in pixels of text

    --//hi!, put your member text in sprite 1 and Add it this behavior in sprite...

    on beginSprite(me)

    textMem = sprite(1).member --//your text in sprite 1
    textMem.width = 300
    textMem.height = 400

    sourceImage = member(textMem).image
    imageWidth = sourceImage.width
    imageHeight = sourceImage.height
    sourceRect = sourceImage.rect
    textRect = sourceImage.rect

    end
    TatoRivillas is offline Junior Member
    Join Date
    Sep 2012
    Location
    Bogotá
    Posts
    1

Similar Threads

  1. how to get stream width and height?
    By dsdsdsdsd in forum Macromedia Flash Flashcom
    Replies: 0
    Last Post: August 1st, 04:40 AM
  2. Stage width & height
    By migwia in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: February 11th, 11:45 AM
  3. Can't control height and width
    By Round Rectangle H & Width webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 3
    Last Post: October 9th, 09:31 PM
  4. The size in pixels of text
    By TomaHawK in forum Macromedia Director Basics
    Replies: 1
    Last Post: August 12th, 04:39 PM
  5. CAN I CHANGE SIZE (PIXELS) OF A PROJECTOR TO REDUCE THE FILE SIZE?
    By JB in forum Macromedia Director Basics
    Replies: 0
    Last Post: August 3rd, 06:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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