0
<s:TextArea id="txtAddress" x="118" y="31" width="150" height="88" maxChars="100"
                                tabIndex="2"/>

txtAddress.text="AAAAAAAAAAAA CCCCCCCCCCCCCCCCCCCCCC P OABCDEFGHIJKLMNOPQRSTUVWXYZWSDER-682021";

This actionscript code crashes flash plugin. Some times it will not crash but the text inside the text area will be overwrite twice. The same is happening with every browser I have tested. I think this is flash's bug. (Please note that if width of the textarea or if the value changes, it will work fine) Can any one comment on this?

Below is the markup code:

<s:BorderContainer x="2" y="32" height="125" width="565"  borderColor="#488AC7" 
                           backgroundColor="#EEF0EE" cornerRadius="2">
            <s:TextInput id="txtPhoneNo" x="407" y="3" width="150" maxChars="15" tabIndex="3"/>
            <s:Label x="12" y="13" text="Name" fontWeight="normal" />
            <s:TextInput x="118" y="3" width="150" id="txtName" maxChars="100" tabIndex="1" />
            <s:Label x="12" y="40" text="Address" fontWeight="normal"/>
            <s:TextArea id="txtAddress" x="118" y="31" width="150" height="88" maxChars="100"
                        tabIndex="2"/>
            <s:Label  x="302" y="13" text="Phone No." fontWeight="normal"/>
            <s:Label x="302" y="40" text="Mobile" fontWeight="normal" />
            <s:TextInput id="txtMobile" x="407" y="31" width="150" maxChars="15" tabIndex="4"/>
            <s:Label x="302" y="70" text="Email" fontWeight="normal" />
            <s:TextInput id="txtEmail" x="407" y="60" width="150" maxChars="100" tabIndex="5"/>
            <s:Label x="302" y="101" text="ECS Account NO"/>
            <s:TextInput id="txtECSAcNo" x="407" y="91" width="150" tabIndex="6"/>
        </s:BorderContainer>
4

2 回答 2

0

这与您的系统或实现是隔离的。

您提供的是功能性的:

文本区

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               creationComplete="creationCompleteHandler(event)">

    <fx:Script>
        <![CDATA[
            import mx.events.FlexEvent;

            protected function creationCompleteHandler(event:FlexEvent):void
            {
                txtAddress.text = "AAAAAAAAAAAA CCCCCCCCCCCCCCCCCCCCCC P OABCDEFGHIJKLMNOPQRSTUVWXYZWSDER-682021";
            }
        ]]>
    </fx:Script>

    <s:TextArea id="txtAddress"
                x="118"
                y="31"
                width="150"
                height="88"
                maxChars="100"
                tabIndex="2" />

</s:Application>
于 2012-05-16T04:37:37.213 回答
0

似乎在其他地方,您将 textarea 的字体大小设置为无效值。我之前也遇到过同样的问题,也许你只是将​​它设置为某个值,例如“10px”。

于 2012-05-16T09:05:14.277 回答