im making a chat app and I want to add individual pieces of textfields to an mc so that those textfields can be costumized by the users ie backgrounds, fonts, and stuff. and to do that I have to get the height of the textfield, because Im going to need it for placing the next textfields (height = Y of the next textfield)
I have tried multiline and wordwrap but it only shows 1 line... I HAVE also TRIED AUTOSIZE = left BUT... it adds a huge unecessary blank space at the end
heres the code enter code here`for (i=0; i
// Apply some text to the textfield
boxMC.txTitle.htmlText ="<div style='width:50px'>Instance:aefvasdfawe efaegfawegfaw egawerg alejr joaej alejuf owirt a iajsejrt a aopeu rt tauwe taiej r aiejrt a mc"+nextYPos+"</div>";
//attach the newly created instance to the container
myContent.addChild(boxMC);
//set y value for next item
boxMC.txTitle.width = 100;
boxMC.txTitle.autoSize = "100";
boxMC.txTitle.wordWrap = true;
boxMC.txTitle.multiline = true;
nextYPos+=boxMC.txTitle.height;
}
fixed it... I think
boxMC.txTitle.width = apW-30;
boxMC.txTitle.wordWrap = true;
boxMC.txTitle.multiline = true;
if(boxMC.txTitle.textHeight == 15)
{ var theight = 9; }
else { theight = 0; }
boxMC.txTitle.height = boxMC.txTitle.textHeight + 4;
myContent.addChild(boxMC);
nextYPos+=boxMC.txTitle.textHeight + theight + 4 + 6;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.