[Xerte] Re: Drag and drops - close
Julian Tenney
Julian.Tenney at nottingham.ac.uk
Tue Feb 1 12:16:47 GMT 2011
Yeah, if you size up a moveiclip, you stretch iot;'s children. Draw into a new movieclip in the icon? Or fake it with two icons?
What's the scenario? I'm sure there's a neat answer here.
I'd draw, set the initial text to '', then when you want to show the text do iconID.setText("my txt") and then iconID.clear(), iconID.redrawtheRectangle(); //fictional method, but you get the idea
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 31 January 2011 23:38
To: Xerte list
Subject: [Xerte] Re: Drag and drops - close
OK, real close
Text icon properties 200 x 30.
daveid.txt.setSize(200,30); //set the actual text object (txt) to match the icon
daveid.txt.autoSize = "none"; //tell the text object not to resize
daveid.drawBorder(2,0x000000,80); //fill the text icon area
daveid.fillIcon(0xff0000,80); //fill the text icon area
So I get a red object 200 X 30 with the first line of text showing in it.
Now I want to expand it and show all:
daveid.txt.autoSize = "left"; //tell the text object to resize to show all text
daveid.txt._height = daveid.txt.textHeight; //get the height of the text object
daveid._height = 400; // try to expand the icon area to match the new text object height
Unfortunately, this expands the text as well, with the font size jumping radically.
I thought the icon and txt objects were divorced at this point?
Problem because it's a child?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110201/8a0add11/attachment.html>
More information about the Xerte
mailing list