0 Replies Latest reply on Nov 11, 2010 2:04 AM by jkravitz

    AnimateProperty on TextFlow range


      I have a TextFlow and am featuring a range within it using a TextLayoutFormat - something like this


      flow:TextFlow = myTextArea.TextFlow;

      var ss:SelectionState = new SelectionState(flow,20,40);

      var tlf:TextLayoutFormat = new TextLayoutFormat();

      tlf.fontWeight = "bold";

      tlf.color = 0xFF0000;

      tlf.fontSize = 20;


      var afo:ApplyFormatOperation = new ApplyFormatOperation(ss,tlf,null);





      This works fine and my text in the range has different color and size from all the other text in the TextArea. But what I'd like to do is animate the transition - particularly the size so - so it grows from the rest of the text to a larger size when it is highlighted.


      My problem is I can't seem to find what to animate - if I do something like this:


      var ap:AnimateProperty = new AnimateProperty();

      ap.property = "fontSize";

      ap.fromValue = 16;

      ap.toValue = 24;

      ap.target = afo.textFlow;




      I am not sure what to set target to to only animate the text in the range. For example afo.textFlow is pointing to flow so it animates all the text. I tried "target = tlf" which is the fontSize property I want to animate, but that does nothing (no error and no effect) - has anyone tried using effects on a selection of text in a range in a TextFlow?