1 Replies - 5398 Views - Last Post: 22 July 2010 - 05:45 PM

#1 Smiling1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 08-February 09

AS3 RadioButton multiline/wordWrap help

Posted 19 July 2010 - 01:53 AM

Hi,

I have searched high and low for some form of tutorial or example yet to no avail...

Could someone please assist???

I have built a multiple choice quiz where I am trying to make the label text wrap around when it reaches 500px.
The length of the label text varies.

The best I can achieve with the below code (and many variations and hours of research) has ended up with nothing better.

var myGroup:RadioButtonGroup = new RadioButtonGroup("buttons");
myGroup.addEventListener(Event.CHANGE, changeHandler);
for(var j:int = 0; j < choices.length; j++) {
var rb:RadioButton = new RadioButton();
rb.textField.multiline = true;
rb.textField.wordWrap = true;
rb.textField.width = 500;
rb.textField.height = 50;
rb.label = choices[j];
var format:TextFormat = new TextFormat;
format.size = 12;
format.font = 'verdana'
rb.setStyle("textFormat", format);
rb.group = myGroup;
rb.value = j + 1;
rb.x = answerX;
rb.y = answerY + (j * spacing);
addChild(rb);
}
}

What happens is that the text is hidden until mouse over which then prompts the text to show in the label's default size, which overlaps and is un-readable.

I'm sure the answer is staring me int he face but I am at my wit's end.........HELP!!!!

Is This A Good Question/Topic? 0
  • +

Replies To: AS3 RadioButton multiline/wordWrap help

#2 Guest_Guest*


Reputation:

Re: AS3 RadioButton multiline/wordWrap help

Posted 22 July 2010 - 05:45 PM

I have resolved the issue....

Thank you
Was This Post Helpful? 0

Page 1 of 1