Mx:Text autoSize?

Hi!
I have a mx:Text component with a specified width. On every
change of the text property in this Text component the height
should be updated to fit the whole text. How is that possible?
Anyone knows a work-around with other classes?
When I try following...
myText.text = "targettext, can grow multiline";
myText.height = myText.textHeight;
... the height property changes, however always too late (on
the next programmturn).
change="updateMyText()" in the .mxml also haven't worked.
Eventlistener on FlexEvent.DATA_CHANGE won't get called.
validateNow() haven't worked.
I'm very tired of this problem and hope, someone can help me.
mfg Tschouba

You're right, the height gets adjusted automatically in your example.
However, in my target programm it wasn't so, althougt it was the same text-component-code as in yours.
So again I tried around and finally I found my error: At the canvas tag (that was surrounding the Text component) autoLayout was set to false. Because of that the height of the text inside wasn't adjusted automatically.
autoLayout="true" --> all works fine
Thanks for your help, myIP!
Greets

Similar Messages

  • Do NOT use text.autoSize onEnterFrame or any other loops!!

    do NOT use test.autoSize = true - with onEnterFrame or any
    other loops!! - it kills the processor i just found out the other
    day why my movieclip scrollers and dynamic menus have been laggin
    so much sins the dawn of time -- its all because of text.autoSize =
    true -
    i turn it off as soon as i has the final text length and
    everything runs smooth

    Hi Swetha,
    Maintain traslations for your text in Tcode: se63
    Regards,
    kalandar

  • Text autosize height

    Having problems with autosizing height on a text control. I'm
    setting the text dynamically and when I set it the first time, it
    doesn't adjust the height properly to display text multiline if
    needed, it just get cut off. If I set the text one more time
    though, it seems to adjust fine. Problem is that first time, seems
    the height isn't being set properly. Here's what I've got.
    private function switchTitle(text:String):void {
    title.htmlText = text;
    <mx:Text id="title" width="340" styleName="featuredTitle"
    textAlign="left" paddingTop="1" />

    I have been loooking at this and I see your point. I will have to replace the text box with a movieclip to see if it works.
    thx
    rd

  • Ticker text width problem

    I have created news ticker in my Flash application. I took
    one movie clip and put one dynamic text into it. made the dynamic
    text autosize. so text and movie clip width are set to the text
    width automatically. I am moving the movie clip by changing the _x
    postion of movie clip to implement the scrolling ticker
    functionality. It works fine if the text width is less then 7749.
    If text width is greater then 7749 then for some interval text
    becomes blank even though scrolling is going on properly. Can
    anybody help me on this issue.

    Pl. help me

  • Layout with rows defined by variables

    Joint Venture Name is one of our characteristics. We will create a planning layout with two rows, for two different Joint Venture Names selected by the user. The Joint Venture Names should be selected by the user, preferably when opening the layout using a planning folder.
    We are already using variables for making the user select year and period in other layouts. This is easily done by using variables in the planning level (or package) selection. But these values are only a part of the header area in those layouts.
    Variables may easily be inserted in the rows of the layout. The problem is to set their values. The variables are defined as Fixed Value. "Restriction of Value Required by User" is checked. When entering a range in the the Selection Conditions (or nothing), we get an error message when trying to insert the variable into the layout: Variable ASSET1 could not be replaced in row. The problem is we need a single value and not a range. We would like the user to be able to select that single value. Using "Set Variables" doesn't work. We are not allowed to select a value for those variables. No error message though. If we instead enter possible values in the Selection Conditions, one per line, we may use Set Variables to select a single value per variable and then insert them into the layout. The user will then be able to change value later. However, the number of values is large and may change. So adding all possible values is both time consuming to do the first time and to maintain. Any ideas how to avoid this?

    Alrighty! Got it working =]
    onClipEvent(Load){this.mt="Portfolio";
    this.mc=mt // used elsewhere for transition effects
    this.texter.autoSize = "left"
    rt = this.texter.textWidth
    _x=(_root.intro.footer.Home._x)+(_root.intro.footer.Home.rt)+10
    on(rollOver){this.gotoAndPlay(11)}
    on(rollOut){this.gotoAndPlay(1)}
    on(release){
    this.gotoAndPlay(21);
    _root.sectioncontrol.nextsection=mt;}
    What id like to know now if possible, is how to refresh the movie clips?
    In the last "link area" of the lower linkbar I have this line of code to determine the correct placement of the first link area upon which all the rest are aligned
    widther= (_x+((_root.intro.footer.Home._x)*-1)+rt)
    _root.intro.footer.Home._x=(widther/2)*-1
    And that places the "Home" link area in the correct location for what I'm looking for,
    since all of the other areas get their x locations on load, and I dont want them sitting there checking the area every frame, I know there is a "refresh" function, I'd just like to know how to apply it (when placing after the "middle location" code for home) to the rest of the clips =]

  • Missing right paren and left brace

    Hello !
    I can't rid of  :
    1084: Erreur de syntaxe : rightparen est attendu devant semicolon.
    1084: Syntax error : expecting rightparen before if
    1084: Syntax error : expecting rightbrace before leftbrace
    The code :
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    var tween:Tween = new Tween(texte, "y", Strong.easeOut, 0, 0, 30);
    var tween:Tween = new Tween(texte2, "y", Strong.easeOut 0, 0, 60);
    tween.stop()
    var urlLoader:URLLoader = new URLLoader()
    urlLoader.addEventListener(Event.COMPLETE, completeXMLHandler)
    function completeXMLHandler(evt:Event)
    var xml:XML = new XML(evt.target.data)
    texte.texte.htmlText = xml.descendants("texte")[0].text()
    texte2.texte2.htmlText = xml.descendants(("texte2")[0].text()
    if(texte.height>masque.height){
    if(texte2.height>masque2.height){
    stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler)
    urlLoader.load(new URLRequest("xml.xml"))
    texte.texte.autoSize = TextFieldAutoSize.LEFT
    texte2.texte2.autoSize = TextFieldAutoSize.LEFT
    texte.y = masque.y
    texte2.y = masque2.y
    texte.mask = masque
    texte2.mask = masque2
    function mouseMoveHandler(evt:MouseEvent)
    /*on recupere la position de la souris par rapport au masque*/
    var p:Number = (mouseY-masque.y)/masque.height
    var p:Number = (mouseY-masque2.y)/masque2.height
    if(p<0)p=0
    if(p>1)p=1
    tween.continueTo(masque.y-p*(texte.height - masque.height),30)
    tween.continueTo(masque2.y-p*(texte2.height - masque2.height),30
    Part of the code must be bad... but I'm not able to fix it !
    I have two texts... A mouse scroll animation is added based on the mouse position... So, I can scroll through all text...
    Message was edited by: danae830

    in order for you code to work it should look like this:
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    var tween:Tween = new Tween(texte, "y", Strong.easeOut, 0, 0, 30);
    var tween1:Tween = new Tween(texte2, "y", Strong.easeOut, 0, 0, 60);
    tween.stop()
    var urlLoader:URLLoader = new URLLoader()
    urlLoader.addEventListener(Event.COMPLETE, completeXMLHandler)
    function completeXMLHandler(evt:Event)
        var xml:XML = new XML(evt.target.data)
        texte.texte.htmlText = xml.descendants("texte")[0].text()
        texte2.texte2.htmlText = xml.descendants("texte2")[0].text()
        if(texte.height>masque.height)
            if(texte2.height>masque2.height)
                stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler)
    urlLoader.load(new URLRequest("xml.xml"))
    texte.texte.autoSize = TextFieldAutoSize.LEFT
    texte2.texte2.autoSize = TextFieldAutoSize.LEFT
    texte.y = masque.y
    texte2.y = masque2.y
    texte.mask = masque
    texte2.mask = masque2
    function mouseMoveHandler(evt:MouseEvent)
        /*on recupere la position de la souris par rapport au masque*/
        var p:Number = (mouseY-masque.y)/masque.height
        var p:Number = (mouseY-masque2.y)/masque2.height
        if(p<0)p=0
        if(p>1)p=1
        tween.continueTo(masque.y-p*(texte.height - masque.height),30)
        tween1.continueTo(masque2.y-p*(texte2.height - masque2.height),30)
    first - why did you give to both of your tween objects the same name?
    in the line -
    texte2.texte2.htmlText = xml.descendants("texte2")[0].text()
    there was a redundant '('.
    and in the line -
    tween1.continueTo(masque2.y-p*(texte2.height - masque2.height),30)
    there was a missing ')' (i've also renamed the tween object to 'tween1')
    that should do it i think

  • Autosize TextField to text width

    Hi,
    I want to have my TextField automatically resize to be the width of the text in it. Currently it seems to be fixed width (when added to a FlowLayout) and the text inside scrolls (pans out to the left) when the max size is reached.
    I have worked out a nasty hack that manually tries to set the preferred width:
    inputField = new TextField();
    inputField.textProperty().addListener(new ChangeListener<String>()
        public void changed(ObservableValue<? extends String> observableValue, String s, String s1)
            int cols = s1 != null ? Math.max(2, s1.length() + 1) : 2;
            inputField.setPrefWidth(cols * 8);
    });This is nasty code, but also it doesn't adjust the size to the font used by the TextField (and there is no getFont that I can see?).
    Does anyone know if there is either another (nicer) way to do this or, at least a way to determine the width of a string on the TextField?
    Note, I have tried setPrefColumnCount but this seems to have no affect after the field has been created. I have also tried the 'autosize' method on TextField but it doesn't seem to do anything in this context either.
    Cheers,
    zonski

    After a few hours of search I have finally found myself an answer! What you have to do to get this working is very simple indeed.
    I found my answer in the Adobe Designer help files here is the contents I have found:
    Floating fields in a dynamic form
    You can insert a floating field into a text object to display different types of information.
    Floating fields are text field objects that support the merging of text, numeric values, run-time properties, and scripting within a text object when the form is rendered. You can insert floating fields into text objects only.
    Because floating fields are text field objects, you can bind floating fields to a data source to display specific text or numeric values. For example, you can insert a floating field (Dear Mr./Ms. {TextField}), to render individual customer names in the introductory greeting of a form letter.
    Note: Floating fields are text field objects by default, but you can change the object type using the Type list in the Field tab of the Object palette, to suit your needs.
    Keep in mind that you must set the properties of the floating field object independently of setting the properties of the text object. By default, floating field objects are set to Hidden (Exclude from layout) in the Presence list.
    To insert a floating text field into a text object:
    Click inside the text object in which you want to place the floating text field object.
    Place your cursor on the line where you want Designer to insert the floating text field object.
    Select Insert > Floating Field.
    To set the properties of the floating field, click the floating field marker inside the text object, and then select options as needed. It is good practice to rename the floating text field object and specify the necessary binding.

  • How can I autosize a text box and when I change text the objects below it got auto pushed down and up?

    Now the text box seems at absolutely position and fixed size.
    What I need is when I change text it grows or shrinks accordingly. And all objects after it also move up or down. How can I do that?
    Thanks.

    The Text will not scale with the Textbox.
    Peter

  • Text caption height in responsive project is not automatically resizing

    Hi all,
    I have a Captivate 8 responsive project in which a text caption is not behaving properly. When I get down to smartphone-sized screens the width of the text caption reduces with the width of the device. But, the height of the text caption does not increase accordingly to fit the content. The text just gets cut off at the bottom.
    I've tried the Auto height setting for the object size, but this scales the text down within the boundaries of the text caption. I would like to maintain the size of my text and have it grow down the screen the way plain text does in an HTML page.
    I also do not want to set my text caption height to 100% because I would like to stack objects beneath the text caption.
    Any help or advice is great appreciated.

    Hi cntdmds,
    There's a setting buried in Preferences > Defaults > Autosize Captions that changes all text captions in your file. This has enabled my responsive layouts to work better in Captivate.
    Re: creating something reliable: I'm in the midst of creating a large responsive e-learning course. It's been a really steep learning curve and a very frustrating one. I believe a reliable course can be created, but it's a hard journey. (My largest problem is my smart position markers don't stay at their assigned places, but I think I'm on track to solve it... perhaps.)
    Yet to see if this whole responsive Captivate adventure will be worthwhile. I hope Articulate adds a responsive capability to Storyline.
    Cheers.

  • How can I make rectangular speech bubbles that adapt to the text inside them without the "arrow" that points towards where the bubble is coming from getting changed?

    I have to make lots of speech bubbles (150+) that all have texts inside them which differ in length. I want the speech bubbles to look the same in terms of style, but I need different sizes of course for each text. This means that the rectangular part of the speech bubble should adapt in length and width to the text inside it, while the "arrow" pointing towards where the bubble is coming from (e.g. the person who speaks) should stay the same on every bubble. So is there a way or a workaround to make such "adapting" speech bubbles?
    I appreciate any kinds of help
    Thanks in advance!

    Here's another way I found:
    1. Draw a speech bubble. Mine is a rectangle with rounded corners and a triangular pointer added with Pathfinder > Add
    2. Drag out a frame the same size as the speech bubble. Select the speech bubble and Copy; then select the empty frame and choose Edit > Paste Into...
    3. Alt-Drag the frame with the pasted speech bubble to make a copy, then crop one copy to leave only the top of the bubble showing, and crop the other copy to leave only the bottom.
    4. Drag out a text frame and insert a table consisting of 1 column, 3 rows. Set the text frame to Autosize > Height Only.
    5. Set the stroke/fill of the top and bottom rows to none, and style the middle row to match the speech bubble, (in my case a white fill and 2pt stroke; left and right).
    6. Anchor (paste) a copy of the speech bubble top in the top table row, and a copy of the speech bubble bottom in the bottom row.
    Getting the 3 parts to match up with is where you just have to work on it until you get it right. Use the positioning tools in Anchored Object options and the column width setting in Cell options to line everything up.
    Enter your text in the middle row. (Hey, look at that...a valid application of Comic Sans!) With the Cell Height set to an "At Least" setting, the cell will expand to fit whatever text you enter, pushing the the bottom row down, with the text frame auto-sizing to keep everything in play...

  • Problem with characters in text field

    hi all
    i am missing a few characters, once i load text into a dynamic text field. chars are not missing per say; they are being replaced with empty squares.
    characters like the euro sign and accentuated german a letter.
    whats is weird is that other accentuated german letters do appear. so only a few selected are missing.
    How ive set up the fla:
    1) i've added 4 text fields to the stage in the font im using, Arial, one for each font style: normal, italic, bold and bold italic, and in all 4 fields ive embedded all latin characters (to include the german accentuaded characters and im guessing it's in the punctuation group that holds the euro sign, so that one is also embedded), besides lowercase, uppercase, numerical, and all the default groupd to include basic text.
    2) i've got a dynamic text field, created with createTextField, and setup the following ActionScript (2):
    this.createTextField("T_text",1,0,10,Stage.width-60,50);
    var myFmt = new TextFormat();
    myFmt.size = 12;
    myFmt.leading = 3;
    myFmt.font = "Arial";
    T_text.html = true;
    T_text.autoSize = "left";
    T_text.multiline = true;
    T_text.wordWrap = true;
    T_text.selectable = false;
    T_text.embedFonts = false;
    T_text.textColor = "0x666666";
    T_text.htmlText = _global.gallery_1_image_text_1; // this holds the text im displayed, called in from a database.
    T_text.setNewTextFormat(myFmt);
    now, im calling text from a database.
    when calling the text from the browser  url bar, there's no chars missing.
    its just when i make this call from flash and load the text into the dynamic text field, that characters go missing.
    below is a link to a print screen of the faulty text that is displayed in flash's dynamic text field.
    http://img210.imageshack.us/img210/340/utf8.png
    any ideas? i mean, it seems that the arial font is missing a few accentuated characters! because the code i have setup loads other accentuated characters.
    anyone has seen this issue before and know how to solve it?
    regards

    no.
    you assigned your embedFonts property to be false.
    look, you can test if you've embedded fonts correctly by using:
    T_text._rotation=3;
    if you see no text, you're not embedding fonts correctly.
    so, use:
    T_text.embedFonts=true;
    and then test.  if you see no text, use:
    click on the upper right of your library panel > new Font > select Arial and tick the symbols you need to embed > tick export for actionscript and assign a linkage id (eg, ArialID). click ok.  then use:
    this.createTextField("T_text",1,0,10,Stage.width-60,50);
    var myFmt = new TextFormat();
    myFmt.size = 12;
    myFmt.leading = 3;
    myFmt.font = "ArialID";
    T_text.html = true;
    T_text.autoSize = "left";
    T_text.multiline = true;
    T_text.wordWrap = true;
    T_text.selectable = false;
    T_text.embedFonts = true;
    T_text.textColor = 0x666666;  // no quotes here.  this is a number
    T_text.htmlText = _global.gallery_1_image_text_1; // this holds the text im displayed, called in from a database.
    T_text.setTextFormat(myFmt);  // to format the above text, use setTextFormat().  if you want to format text added after this line, use setNewTextFormat()

  • In SSRS , after exporting report in excel,wrap text property for cell and freeze column for SSRS table header not working in Excel

    I am working no one SSRS my table headers are freeze cangrow property is false and my report is working perfect while rendering data on RDL and i want same report after exporting in Excel also , i want my table header to be freeze and wrap text property
    to work after exporting in my report in excel but its not working ,is there any solution ? any patch ? any other XML code for different rendering ? 

    Hi Amol,
    According to your description, you find the wrap text property and fix column is not working after exporting into Excel. Right?
    In Reporting Services, when exporting to excel file, it has limitation for textbox.
    Text boxes are rendered within one Excel cell. Font size, font face, decoration, and font style are the only formatting that is supported on individual text within an Excel cell.
    Excel adds a default padding of approximately 3.75 points to the left and right sides of cells. If a text box’s padding settings are less than 3.75 points and is just barely wide enough to accommodate the text, the text may wrap in Excel.
    In this scenario, it supposed to be wrap text unless you merge cells. If cells are merged, word-wrap does not work correctly. If any merged cells exist on a row where a text box is rendered with the
    AutoSize property, autosize will not work. For the Fix Data Property, it can't be working in Excel. These are features when exporting to Excel. We can't change it because it's by design.
    Reference:
    Exporting to Microsoft Excel (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Importing Text File data

    At the moment I know how to enter data from a text file into
    a flash file, for example this is my 'Monday.txt' file (a cut down
    version)
    "AK2~Hairdressing Level 2 Year 2 Of
    2","HDRN2AK2-2B1FA","12:30","14:30"," 10/ 9/2007","M316"
    "AK2~Hairdressing NVQ L2 (Grp
    A)","HDRN2AK2-1B1FA","12:30","14:30"," 10/ 9/2007","M316"
    "AK2~Hairdressing NVQ L2 (Grp
    B)","HDRN2AK2-1B1FB","12:30","14:30"," 10/ 9/2007","M308"
    "Beauty Therapy Level 1 Grp D","BTHN1-1B1FD","9:00","10:30","
    10/ 9/2007","M306"
    "Beauty Therapy NVQ Level 1 Grp
    A","BTHN1-1B1FA","9:00","10:30"," 10/ 9/2007","M306"
    "Beauty Therapy NVQ Level 1 Grp
    B","BTHN1-1B1FB","9:00","10:30"," 10/ 9/2007","M306"
    "Beauty Therapy NVQ Level 1 Grp
    C","BTHN1-1B1FC","9:00","10:30"," 10/ 9/2007","M306"
    "Beauty Therapy NVQ Level 2 Grp
    A","BTHN2-1B1FA","9:00","12:00"," 10/ 9/2007","M217"
    "Beauty Therapy NVQ Level 2 Grp
    A","BTHN2-1B1FA","12:30","14:00"," 10/ 9/2007","M306"
    "Beauty Therapy NVQ Level 2 Grp
    D","BTHN2-1B1FD","12:00","15:00"," 10/ 9/2007","M217"
    Using this coding, I now know how to get it into columns in a
    tabbed layout
    var lv:LoadVars = new LoadVars();
    lv.onLoad = func;
    lv.load("Monday.txt");
    function func(ok) {
    if (!ok) {
    trace("file not loaded.");
    return;
    var tf:TextFormat = new TextFormat();
    tf.tabStops = [220, 340, 390, 440, 490, 520];
    tf.font = "Verdana";
    tf.size = 9;
    var nextD:Number = _root.getNextHighestDepth();
    var w:Number = Stage.width - 20;
    var h:Number = Stage.height - 20;
    var txt:TextField = _root.createTextField("schedule", nextD,
    10, 10, w, h);
    txt.wordWrap = txt.multiline = /*txt.border =*/ true;
    txt.autoSize = true;
    txt.setNewTextFormat(tf);
    var temp1:Array =
    unescape(this).split("=&onLoad")[0].split("\n");
    for (var i:Number = 0; i < temp1.length; i++) {
    var temp2:String = temp1
    .split(",").join("\t").split("\"").join("");
    txt.text = (txt.text.length > 0 ? txt.text : "") + temp2
    + (i == temp1.length-1 ? " " : " \n");
    The problem I have now is, in the text file I am going to
    have upto 120-130 of these records, now the maximum I can fit onto
    the screen is 20, is there a way I can split this text file up so I
    can show Page 1/7, 2/7, 3/7, 4/7, 5/7, 6/7 and 7/7, where it
    switches over automatically via a timer of some sort, say after 20
    seconds. Any help would be greatly appreciated, thanks

    sure. there are many ways to do this.
    one would be to use one textfield and load all your text into
    it. use a timer like setInterval() to periodically increase the
    scroll property of your textfield by its bottomScroll property.
    you'll need to fill your last page with carriage returns or
    new lines so the last page can scroll to the top of your
    textfield.

  • Android, backspace doesn't work properly in a flash.text.TextField

    Hello,
    I have a bug on my Nexus 5 Android 4.4 Air 4.0.
    when I scroll the text in the textField and I select the text (in my example near "subclass" word), the TextField get focus, if I put on the backspace key, the character deleted is the previous character the first time, and if I put again on the backspace key, the caracter deleted is the first character and not the previous character.
    package{
    import flash.text.TextField;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    public class Main extends Sprite {
      private var myTextField:TextField = new TextField();
      public function Main() {
        stage.scaleMode = StageScaleMode.NO_SCALE;
        stage.align = StageAlign.TOP_LEFT;
        addEventListener(Event.ADDED_TO_STAGE, init);
      private function init(event:Event):void {
        myTextField.type="input";
        myTextField.text="The TextField class is used to create display objects for text display and input. You can give a text field an instance name in the Property inspector and use the methods and properties of the TextField class to manipulate it with ActionScript. TextField instance names are displayed in the Movie Explorer and in the Insert Target Path dialog box in the Actions panel.\nTo create a text field dynamically, use the TextField() constructor.\n\nThe methods of the TextField class let you set, select, and manipulate text in a dynamic or input text field that you create during authoring or at runtime.\n\nActionScript provides several ways to format your text at runtime. The TextFormat class lets you set character and paragraph formatting for TextField objects. You can apply Cascading Style Sheets (CSS) styles to text fields by using the TextField.styleSheet property and the StyleSheet class. You can use CSS to style built-in HTML tags, define new formatting tags, or apply styles. You can assign HTML formatted text, which optionally uses CSS styles, directly to a text field. HTML text that you assign to a text field can contain embedded media (movie clips, SWF files, GIF files, PNG files, and JPEG files). The text wraps around the embedded media in the same way that a web browser wraps text around media embedded in an HTML document.\n\nFlash Player supports a subset of HTML tags that you can use to format text. See the list of supported HTML tags in the description of the htmlText property.\n\nView the examples\n\nMore examples\n\nModifying the text field contents\nDisplaying HTML text\nUsing images in text fields\nScrolling text in a text field\nSelecting and manipulating text\nCapturing text input\nRestricting text input\nFormatting text\nWorking with static text\nTextField Example: Newspaper-style text formatting\nLearn more\n\nUse native features with a soft keyboard\nDisplay programming\nBasics of display programming\nCore display classes\nChoosing a DisplayObject subclass\nBasics of Working with text\nUsing the TextField class\nDisplaying text\nAdvanced text rendering\nRelated API Elements\n\nflash.text.TextFormat\nflash.text.StyleSheet\nhtmlText\n\nPublic Properties\n Show Inherited Public Properties\n   Property  Defined By\n      alwaysShowSelection : Boolean\nWhen set to true and the text field is not in focus, Flash Player highlights the selection in the text field in gray.\nTextField\n      antiAliasType : String\nThe type of anti-aliasing used for this text field.\nTextField\n      autoSize : String\nControls automatic sizing and alignment of text fields.\nTextField\n      background : Boolean\nSpecifies whether the text field has a background fill.\nTextField\n      backgroundColor : uint\nThe color of the text field background.\nTextField\n      border : Boolean\nSpecifies whether the text field has a border.\nTextField\n      borderColor : uint\nThe color of the text field border.\nTextField\n      bottomScrollV : int\n[read-only] An integer (1-based index) that indicates the bottommost line that is currently visible in the specified text field.\nTextField\n      caretIndex : int\n[read-only] The index of the insertion point (caret) position.\nTextField\n      condenseWhite : Boolean\nA Boolean value that specifies whether extra white space (spaces, line breaks, and so on) in a text field with HTML text is removed.\nTextField\n      defaultTextFormat : flash.text:TextFormat\nSpecifies the format applied to newly inserted text, such as text entered by a user or text inserted with the replaceSelectedText() method.\nTextField\n      displayAsPassword : Boolean\nSpecifies whether the text field is a password text field.\nTextField\n      embedFonts : Boolean\nSpecifies whether to render by using embedded font outlines.\nTextField\n      gridFitType : String\nThe type of grid fitting used for this text field.\nTextField\n      htmlText : String\nContains the HTML representation of the text field contents.\nTextField\n      length : int\n[read-only] The number of characters in a text field.\nTextField\n      maxChars : int\nThe maximum number of characters that the text field can contain, as entered by a user.\nTextField\n      maxScrollH : int\n[read-only] The maximum value of scrollH.\nTextField\n      maxScrollV : int\n[read-only] The maximum value of scrollV.\nTextField\n      mouseWheelEnabled : Boolean\nA Boolean value that indicates whether Flash Player automatically scrolls multiline text fields when the user clicks a text field and rolls the mouse wheel.\nTextField\n      multiline : Boolean\nIndicates whether field is a multiline text field.\nTextField\n      numLines : int\n[read-only] Defines the number of text lines in a multiline text field.\nTextField\n      restrict : String\nIndicates the set of characters that a user can enter into the text field.\nTextField\n      scrollH : int\nThe current horizontal scrolling position.\nTextField\n      scrollV : int\nThe vertical position of text in a text field.\nTextField\n      selectable : Boolean\nA Boolean value that indicates whether the text field is selectable.\nTextField\n      selectionBeginIndex : int\n[read-only] The zero-based character index value of the first character in the current selection.\nTextField\n      selectionEndIndex : int\n[read-only] The zero-based character index value of the last character in the current selection.\nTextField\n      sharpness : Number\nThe sharpness of the glyph edges in this text field.\nTextField\n      styleSheet : StyleSheet\nAttaches a style sheet to the text field.\nTextField\n      text : String\nA string that is the current text in the text field.\nTextField\n      textColor : uint\nThe color of the text in a text field, in hexadecimal format.\nTextField\n      textHeight : Number\n[read-only] The height of the text in pixels.\nTextField\n      textInteractionMode : String\n[read-only] The interaction mode property, Default value is TextInteractionMode.NORMAL.\nTextField\n      textWidth : Number\n[read-only] The width of the text in pixels.\nTextField\n      thickness : Number\nThe thickness of the glyph edges in this text field.\nTextField\n      type : String\nThe type of the text field.\nTextField\n      useRichTextClipboard : Boolean\nSpecifies whether to copy and paste the text formatting along with the text.\nTextField\n      wordWrap : Boolean\nA Boolean value that indicates whether the text field has word wrap.\nTextField";
        myTextField.border=true;
        myTextField.width=myTextField.height=300;
        addChild(myTextField);
    Thanks.

    I have this bug on Galaxy Nexus Android 4.3, I don't have this bug on Galaxy S Android 2.3, the bug occurs with the new Google Keyboard 3.0
    the app descriptor
    <?xml version="1.0" encoding="utf-8" standalone="no"?>
    <application xmlns="http://ns.adobe.com/air/application/4.0">
    <!-- Adobe AIR Application Descriptor File Template.
              Specifies parameters for identifying, installing, and launching AIR applications.
              xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/3.5
                                  The last segment of the namespace specifies the version
                                  of the AIR runtime required for this application to run.
              minimumPatchLevel - The minimum patch level of the AIR runtime required to run
                                  the application. Optional.
    -->
              <!-- A universally unique application identifier. Must be unique across all AIR applications.
              Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
              <id>TextFieldFB</id>
              <!-- Used as the filename for the application. Required. -->
              <filename>TextFieldFB</filename>
              <!-- The name that is displayed in the AIR application installer.
              May have multiple values for each language. See samples or xsd schema file. Optional. -->
              <name>TextFieldFB</name>
              <!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.
              Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
              An updated version of application must have a versionNumber value higher than the previous version. Required for namespace >= 2.5 . -->
              <versionNumber>0.0.1</versionNumber>
              <!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
              <!-- <versionLabel></versionLabel> -->
              <!-- Description, displayed in the AIR application installer.
              May have multiple values for each language. See samples or xsd schema file. Optional. -->
              <!-- <description></description> -->
              <!-- Copyright information. Optional -->
              <!-- <copyright></copyright> -->
              <!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 -->
              <!-- <publisherID></publisherID> -->
              <!-- Settings for the application's initial window. Required. -->
              <initialWindow>
                        <!-- The main SWF or HTML file of the application. Required. -->
                        <!-- Note: In Flash Builder, the SWF reference is set automatically. -->
                        <content>[Cette valeur sera remplacée par Flash Builder dans le fichier app.xml de sortie]</content>
                        <!-- The title of the main window. Optional. -->
                        <!-- <title></title> -->
                        <!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
                        <!-- <systemChrome></systemChrome> -->
                        <!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
                        <!-- <transparent></transparent> -->
                        <!-- Whether the window is initially visible. Optional. Default false. -->
                        <!-- <visible></visible> -->
                        <!-- Whether the user can minimize the window. Optional. Default true. -->
                        <!-- <minimizable></minimizable> -->
                        <!-- Whether the user can maximize the window. Optional. Default true. -->
                        <!-- <maximizable></maximizable> -->
                        <!-- Whether the user can resize the window. Optional. Default true. -->
                        <!-- <resizable></resizable> -->
                        <!-- The window's initial width in pixels. Optional. -->
                        <!-- <width></width> -->
                        <!-- The window's initial height in pixels. Optional. -->
                        <!-- <height></height> -->
                        <!-- The window's initial x position. Optional. -->
                        <!-- <x></x> -->
                        <!-- The window's initial y position. Optional. -->
                        <!-- <y></y> -->
                        <!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. -->
                        <!-- <minSize></minSize> -->
                        <!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. -->
                        <!-- <maxSize></maxSize> -->
            <!-- The aspect ratio of the app ("portrait" or "landscape" or "any"). Optional. Mobile only. Default is the natural orientation of the device -->
            <!-- <aspectRatio></aspectRatio> -->
            <!-- Whether the app will begin auto-orienting on launch. Optional. Mobile only. Default false -->
            <!-- <autoOrients></autoOrients> -->
            <!-- Whether the app launches in full screen. Optional. Mobile only. Default false -->
            <!-- <fullScreen></fullScreen> -->
            <!-- The render mode for the app (either auto, cpu, gpu, or direct). Optional. Default auto -->
            <!-- <renderMode></renderMode> -->
            <!-- Whether the default direct mode rendering context allocates storage for depth and stencil buffers.  Optional.  Default false. -->
            <!-- <depthAndStencil></depthAndStencil> -->
                        <!-- Whether or not to pan when a soft keyboard is raised or lowered (either "pan" or "none").  Optional.  Defaults "pan." -->
                        <!-- <softKeyboardBehavior></softKeyboardBehavior> -->
                        <!-- Display Resolution for the app (either "standard" or "high"). Optional, OSX-only. Default "standard" -->
                        <!-- <requestedDisplayResolution></requestedDisplayResolution> -->
              <autoOrients>true</autoOrients>
            <fullScreen>false</fullScreen>
            <visible>true</visible>
        </initialWindow>
              <!-- We recommend omitting the supportedProfiles element, -->
              <!-- which in turn permits your application to be deployed to all -->
              <!-- devices supported by AIR. If you wish to restrict deployment -->
              <!-- (i.e., to only mobile devices) then add this element and list -->
              <!-- only the profiles which your application does support. -->
              <!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> -->
              <!-- Languages supported by application -->
              <!-- Only these languages can be specified -->
              <!-- <supportedLanguages>en de cs es fr it ja ko nl pl pt ru sv tr zh</supportedLanguages> -->
              <!-- The subpath of the standard default installation location to use. Optional. -->
              <!-- <installFolder></installFolder> -->
              <!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
              <!-- <programMenuFolder></programMenuFolder> -->
              <!-- The icon the system uses for the application. For at least one resolution,
              specify the path to a PNG file included in the AIR package. Optional. -->
              <!-- <icon>
                        <image16x16></image16x16>
                        <image29x29></image29x29>
                        <image32x32></image32x32>
                        <image36x36></image36x36>
                        <image40x40></image40x40>
                        <image48x48></image48x48>
                        <image50x50></image50x50>
                        <image57x57></image57x57>
                        <image58x58></image58x58>
                        <image72x72></image72x72>
                        <image76x76></image76x76>
                        <image80x80></image80x80>
                        <image96x96></image96x96>
                        <image100x100></image100x100>
                        <image114x114></image114x114>
                        <image120x120></image120x120>
                        <image128x128></image128x128>
                        <image144x144></image144x144>
                        <image152x152></image152x152>
                        <image512x512></image512x512>
                        <image732x412></image732x412>
                        <image1024x1024></image1024x1024>
              </icon> -->
              <!-- Whether the application handles the update when a user double-clicks an update version
              of the AIR file (true), or the default AIR application installer handles the update (false).
              Optional. Default false. -->
              <!-- <customUpdateUI></customUpdateUI> -->
              <!-- Whether the application can be launched when the user clicks a link in a web browser.
              Optional. Default false. -->
              <!-- <allowBrowserInvocation></allowBrowserInvocation> -->
              <!-- Listing of file types for which the application can register. Optional. -->
              <!-- <fileTypes> -->
                        <!-- Defines one file type. Optional. -->
                        <!-- <fileType> -->
                                  <!-- The name that the system displays for the registered file type. Required. -->
                                  <!-- <name></name> -->
                                  <!-- The extension to register. Required. -->
                                  <!-- <extension></extension> -->
                                  <!-- The description of the file type. Optional. -->
                                  <!-- <description></description> -->
                                  <!-- The MIME content type. -->
                                  <!-- <contentType></contentType> -->
                                  <!-- The icon to display for the file type. Optional. -->
                                  <!-- <icon>
                                            <image16x16></image16x16>
                                            <image32x32></image32x32>
                                            <image48x48></image48x48>
                                            <image128x128></image128x128>
                                  </icon> -->
                        <!-- </fileType> -->
              <!-- </fileTypes> -->
        <!-- iOS specific capabilities -->
              <!-- <iPhone> -->
                        <!-- A list of plist key/value pairs to be added to the application Info.plist -->
                        <!-- <InfoAdditions>
                <![CDATA[
                    <key>UIDeviceFamily</key>
                    <array>
                        <string>1</string>
                        <string>2</string>
                    </array>
                    <key>UIStatusBarStyle</key>
                    <string>UIStatusBarStyleBlackOpaque</string>
                    <key>UIRequiresPersistentWiFi</key>
                    <string>YES</string>
                ]]>
            </InfoAdditions> -->
            <!-- A list of plist key/value pairs to be added to the application Entitlements.plist -->
                        <!-- <Entitlements>
                <![CDATA[
                    <key>keychain-access-groups</key>
                    <array>
                        <string></string>
                        <string></string>
                    </array>
                ]]>
            </Entitlements> -->
              <!-- Display Resolution for the app (either "standard" or "high"). Optional. Default "standard" -->
              <!-- <requestedDisplayResolution></requestedDisplayResolution> -->
              <!-- Forcing Render Mode CPU for the devices mentioned. Optional  -->
              <!-- <forceCPURenderModeForDevices></forceCPURenderModeForDevices> -->
              <!-- File containing line separated list of external swf paths. These swfs won't be
              packaged inside the application and corresponding stripped swfs will be output in
              externalStrippedSwfs folder. -->
              <!-- <externalSwfs></externalSwfs> -->
              <!-- </iPhone> -->
              <!-- Specify Android specific tags that get passed to AndroidManifest.xml file. -->
        <!--<android> -->
        <!--          <manifestAdditions>
                        <![CDATA[
                                  <manifest android:installLocation="auto">
                                            <uses-permission android:name="android.permission.INTERNET"/>
                                            <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
                                            <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
                                            <uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
                                            <application android:enabled="true">
                                                      <activity android:excludeFromRecents="false">
                                                                <intent-filter>
                                                                          <action android:name="android.intent.action.MAIN"/>
                                                                          <category android:name="android.intent.category.LAUNCHER"/>
                                                                </intent-filter>
                                                      </activity>
                                            </application>
                </manifest>
                        ]]>
            </manifestAdditions> -->
                  <!-- Color depth for the app (either "32bit" or "16bit"). Optional. Default 16bit before namespace 3.0, 32bit after -->
            <!-- <colorDepth></colorDepth> -->
            <!-- Indicates if the app contains video or not. Necessary for ordering of video planes with graphics plane, especially in Jellybean - if you app does video this must be set to true - valid values are true or false -->
            <!-- <containsVideo></containsVideo> -->
        <!-- </android> -->
              <!-- End of the schema for adding the android specific tags in AndroidManifest.xml file -->
    <android>
            <manifestAdditions><![CDATA[
                                  <manifest android:installLocation="auto">
                                      <!--See the Adobe AIR documentation for more information about setting Google Android permissions-->
                                      <!--La suppression de l’autorisation android.permission.INTERNET aura comme effet secondaire
                        de vous empêcher de déboguer l’application sur le périphérique.-->
                                      <!--<uses-permission android:name="android.permission.INTERNET"/>-->
                                      <!--<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>-->
                                      <!--<uses-permission android:name="android.permission.READ_PHONE_STATE"/>-->
                                      <!--<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>-->
                                      <!--Les autorisations DISABLE_KEYGUARD et WAKE_LOCK doivent être permutées
                        afin d’accéder aux API SystemIdleMode d’AIR.-->
                                      <!--<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>-->
                                      <!--<uses-permission android:name="android.permission.WAKE_LOCK"/>-->
                                      <!--<uses-permission android:name="android.permission.CAMERA"/>-->
                                      <!--<uses-permission android:name="android.permission.RECORD_AUDIO"/>-->
                                      <!--Les autorisations ACCESS_NETWORK_STATE et ACCESS_WIFI_STATE doivent être
                        permutées afin d’utiliser les API NetworkInfo d’AIR.-->
                                      <!--<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>-->
                                      <!--<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>-->
                                  </manifest>
                        ]]></manifestAdditions>
        </android>
        <iPhone>
            <InfoAdditions><![CDATA[
                                  <key>UIDeviceFamily</key>
                                  <array>
                                            <string>1</string>
                                            <string>2</string>
                                  </array>
                        ]]></InfoAdditions>
            <requestedDisplayResolution>high</requestedDisplayResolution>
        </iPhone>
    </application>

  • Linking a class to a dynamic text field to load XML data.

    Hi,
    I'm quite new to ActionScript and would be grateful for any help here.
    I want to load text into a dynamic text field (called 'about_tab') using  a class depending on the language selected (by clicking on a flag icon)  by the user.
    I managed to get this to work when the ActionScript was written directly  in the timeline, but am having problems with doing the same thing via a  class.
    This is my class file:
    package
    import flash.display.SimpleButton;
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import flash.net.URLRequest;
    import flash.net.URLLoader;
    import flash.events.Event;
    public class ChangeLang extends SimpleButton
    public function ChangeLang()
    addEventListener(MouseEvent.CLICK, switchLang);
    trace("ChangeLang class working");
    public function switchLang(event:MouseEvent):void
    var lang = event.target.name;
    var req:URLRequest = new  URLRequest("languages/"+lang+".xml");
    var loader:URLLoader = new URLLoader();
    var substance:XML;
    function xmlLoaded(event:Event):void
    trace("function xmlLoaded is running");
    substance = new XML(loader.data);
    about_tab.text =  substance.about_lbl;
    loader.addEventListener(Event.COMPLETE, xmlLoaded);
    loader.load(req);
    Here's one of my XML files (the other is the same except "About" is  written in German):
    <substance>
    <about_lbl>About</about_lbl>
    </substance>
    When I run it, it returns my trace statements that the class ChangeLang  and the function xmlLoaded are running, but no text appears in the  dynamic text field (I should/want to see the word 'About'). I get this  error message:
    1120: Access of undefined property about_tab
    The problem, I'm guessing, is in the part in red in my code. I think I need to target the text field in the display list by creating a  reference to it. If so, could someonw point out how I do this, or perhaps a tutorial that would help. I've tried adding the word stage (i.e.,stage.about_tab.text =  substance.about_lbl; ) but it still doesn't connect. I guess there's something really simple I'm missing, so I  apologize if this comes across as a stupid question
    Thanks for any help.

    Hello flashrocket!
    I'm also new to AS3 and I've just started using external classes and I think I know what you should do to put your code to work.
    Instead of using the text field you created inside your flash file, why don't you use the "TextField" class to create an instance of this object? It's the exact same thing as when you create and instantiate a new text field inside Flash.
    First, import flash.text.*; (includes classes like TextField, TextFieldAutoSize, TextFormat, TextFormatAlign, etc)
    Than you just have to create a var like
    public var about_tab : TextField;
    or
    public var about_tab : TextField = new TextField();
    then, to adjust the properties of this tab you use dotsyntax as if it where on your stage like:
    about_tab.x = 50; about_tab.alpha = .5; etc...
    you can even create a function to "config your textField"
              private function createAndConfigTextField() : void {
                   about_tab = new TextField(); //you only need this line if you
              // only typed something like "public var about_tab:TextField;
              // if instead you used "public var about_tab:TextField = new TextField(); outside
              // this function, just skip this first line because you already have an instance of
              // text field named "about_tab"...
                            about_tab.autoSize = TextFieldAutoSize.CENTER;
                   about_tab.background = true;
                   about_tab.border = true;
                   var aboutTextFormat : TextFormat = new TextFormat();
                   format.font = "Arial";
                   format.color = 0x000000;
                   format.size = 11;
                   format.bold = true;
                   format.align = TextFormatAlign.CENTER;
                   about_tab.defaultTextFormat = aboutTextFormat;
                   addChild(about_tab);
    This is just an example of what you can do... I hope you get it... let me know if you have any doubt...

Maybe you are looking for

  • Production order q's

    Hi all , 1) What should be the selection criteria in COOIS  for open production order list for the one month frame ? 2) How can we know that for a production order Overhead , Varience, Settlement has been carried out if the production if the order is

  • DON'T UPGRADE LION until you read this thread

    https://discussions.apple.com/thread/3197249 You will see from this thread that many people who have upgraded to Lion (versus a clean install) have had a disasterous experience. For instance: I have lost count of how many times my computer has crashe

  • Provisioning - Emailing User Name and Password to end user

    In GRC AC 5.3  Access Enforcer when a new user account is provisioned, a URL or link is sent to the end user's email. When the user clicks the link the user can view the user name and password. My questions? 1. Should the end user have a UME role, to

  • Is it possible to open multiple files in their own workspace, rather than as tabs or floating?

    You could do this in CS5, but it doesn't seem possible in CS6. It's a bit clunky when dragging from one file to another in the tab mode. I liked having the workspaces open side by side.  Help?

  • Fonts not recognized in Dreamweaver

    I have purchased and downloaded Linotype fonts from fonts.com (webfonts) and installed the TTF on my system for mocking up and building out websites. The fonts display in the font list and work just fine in Photoshop and Illustrator, but when I move