I am needing some help with vector shape and text.
The vector shape is a cartoon/comic book like box ( a
rectangle with rounded corners and a spike pointing to persons
mouth - sort of like a thought bubble) and I want to have changing
text inside this vector shape.
I am having trouble aligning the two.
I am using the height property to change the height of the
vector according to the amount of text but I can't work out how to
calculate the offset (or whatever). I'm guessing that as text has
reg point at top left and vector shape not. Can someone please give
me some guidance.
Here is the code for chaging the text. I'm using an empty
text sprite as the text placeholderwhich is on top of my vector box
property pTargetSprite --placeholder sprite
property pMyTextMember --text which goes into the placeholder
on getPropertyDescriptionList me
set pdList = [:]
addprop pdList, #pTargetSprite, [#comment: "Which sprite is
target?", #format: #integer, #default: 26]
addprop pdList, #pMyTextMember, [#comment: "Which cast
member?", #format: #text, #default: "placeholder"]
on beginSprite me
pMySprite = sprite(me.spriteNum)
on mouseUp me
sprite(pTargetSprite).member = member(pMyTextMember)
sprite(17).height = member(pMyTextMember).height + 50
--sprite(17) is the vector shape "cartoon speech box"