Creating a multiline CheckBox component in Flash using ActionScript 3.0

by Peter deHaan on December 1, 2008

in CheckBox

The following example shows how you can create a multiline CheckBox control in Flash by setting the wordWrap property on the CheckBox component’s internal textField property.

Full code after the jump.

// ActionScript 3.0
/* Requires:
 * - A CheckBox control in your Flash library.
 */
import fl.controls.CheckBox;
 
var checkBox:CheckBox = new CheckBox();
checkBox.label = "The quick brown fox jumps over the lazy dog.";
checkBox.textField.wordWrap = true;
checkBox.move(10, 20);
checkBox.width = 200;
addChild(checkBox);

{ 2 comments… read them below or add one }

1 Nice 12.11.08 at 8:57 am

Need to submit an enhancement request to Adobe to have this ability added to Flash/Flex..

2 Peter deHaan 12.11.08 at 9:57 am

Nice,

Flash enhancement requests/bug reports can be filed using the “Feature Request/Bug Report Form” at http://www.adobe.com/go/wish (select “Flash” from the Product name drop down menu)
Flex enhancement requests/bug reports can be filed using the public bug base at http://bugs.adobe.com/flex/

Peter

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Previous post: Displaying an embedded image using a UILoader container in Flash using ActionScript 3.0

Next post: Displaying a list of Video objects in your Flash document’s Library panel using JSFL