Monday, April 16, 2001

Text members vs. Field members

Today, I grappled again with the frustrating differences between the ways Macromedia Director deals with text members and field members.



Specifically, what I needed to do was generate an image object out of text, which had to be cropped close. I thought I would be able to use the charPosToLoc() command to find out where to crop the member's image from to get the desired picture, but it turns out that charPosToLoc() was only available for fields.



Unfortunately, you can only grab the image of a text member, not a field, so that approach leads to an impasse.



The final solution was less than elegant. I ended up having to trim the white space of the text member, a less than ideal situation because there's no elegant way to maintain your text baseline when you do that.



If there's any Macromedia people reading, please make some of the functionality between text members and field members cross over, or better yet, consolidate the two into one member type. It seems like every time I have to deal with text, I have to choose some feature to drop (or fudge) because each member type only supports half the features it should.