-
1. Re: Problem with movieclip height
Ned Murphy Apr 13, 2012 4:38 AM (in response to bhargavi reddy)Are you saying that the line trace(cell.height); indicates a value greater than what you believe the height is (280)?
What value of height does it trace is you just manually add an instance to the stage?
-
2. Re: Problem with movieclip height
bhargavi reddy Apr 13, 2012 4:43 AM (in response to Ned Murphy)ya i manually added an instance to the stage.
-
3. Re: Problem with movieclip height
bhargavi reddy Apr 13, 2012 4:46 AM (in response to bhargavi reddy)according to my i got the output as follows:
337.5 - cell.height for i=0
337.5 - mc.height
197.5 - cell.height for i=1
535 - total mc height (cell height for i=0 + cell height for i=1)
-
4. Re: Problem with movieclip height
Ned Murphy Apr 13, 2012 4:57 AM (in response to bhargavi reddy)If the manually placed instance still measures 337.5 then chances are that is its true height. If you can show a screenshot of the offending movieclip, I can probably recreate it to see if I get the same result and then maybe determine which object within it it might be creating height that you can't see.
-
5. Re: Problem with movieclip height
bhargavi reddy Apr 13, 2012 5:05 AM (in response to Ned Murphy) -
6. Re: Problem with movieclip height
Ned Murphy Apr 13, 2012 6:10 AM (in response to bhargavi reddy)1 person found this helpfulHere's what I have concluded... the label elements are what are causing the problem, the one inside the button component being the contributor to the 337.5 value. If you were to remove that button I am guessing you would still see something around the 311 height value due to the label above the button.
I cannot answer why this is the case, but that's what it is. The labels apparently carry some unseen baggage. I generally avoid using components for a few reasons... they tend to weigh too much byte-wise, some can be a pain to manage, and then they go and pull stuff like this.
What I did to investigate this is to place each component on a separate layer in the movieclip and made each layer a guide layer. Then I gradually changed them back and watched the height values reported by your code.
You options for a solution...
1) don't use labels or button components... use textfields and button symbols (ones you create yourself)
2) create the backgrounds as movieclips and use those to find the height.
3) assign some property to the movieclips for their height values and use those instead of the height you read as a property.
-
7. Re: Problem with movieclip height
bhargavi reddy Apr 15, 2012 10:35 PM (in response to Ned Murphy)Thank you so much for your answer that helps me alot.
-
8. Re: Problem with movieclip height
Ned Murphy Apr 16, 2012 4:19 AM (in response to bhargavi reddy)You're welcome