Hello,

I have a simple component, it is a multiline TextField with wordWrap
switched on and with a yellow rectangle drawn underneath:

  http://preferans.de/flash/ - the files Bubble.*

I'd like the users of my component to be able to resize its width in the
authoring environment, so that they can control where the word wrapping
will happen. However I can't figure out how to find out that width.

I tried printing it in init(), createChildren() and even draw() -
but it always shows the orig. values I've set for the bounding box:

        private function createChildren():Void {
                trace('width=' + this._width + ', ' + this._xscale);

                // create a yellow rectangle with a shadow underneath
                rect_mc = this.createEmptyMovieClip('rect_mc', depth++);
                rect_mc.filters = [ new DropShadowFilter(0, 90, 0x000000,
                    0.30, 10, 10, 1, 1, false, false, false) ];

                // create a multiline text field above the rectangle
                field_txt = this.createTextField('field_txt', depth++,
                    __padding / 2, __padding / 2, 120, 20);
                //field_txt.border = true;
                field_txt.multiline = true;
                field_txt.autoSize = true;
                field_txt.wordWrap = true;
                field_txt.text = __text;

                size();
        }

This prints: width=160, 100  ( <-- the scale is 100% even for resized Bubble ??)

Any suggestions are very welcome
Alex
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to