This content has been marked as final. Show 3 replies
Well, how big is the last movie attached?
I'm guessing you could find that with lastMovieAttached._height, right?
So add 10 to that and there you go.
If you have a bunch of them to do you can just keep adding like this:
curYpos += lastClipAttached._height +myMenuPad;
Make sure that in this case you start somewhere (outside of any loops) with
Trust me on defining that menu pad as a variable. Later you will need to change it and this way there is only one place too look. You won't have to go hunting through lines of code and wondering if any 10 you see is for that or for something else.
Thanks for the point in the right direction. That didn't work all the way because when the text would wrap it was still reading the btn height with text on one line. So what I did was determin if the length of the button title was past a certain # of characters then return a number to use for extra padding. Now all is working.
Here is the solution below:
You might want to look at getTextExtent() method of the TextFormat class. It will tell you how big text is or how big it will be.