flash - Multiline Handwriting -


i need develop animation in flex simulate handwriting textarea dynamic content. don't care pen following actual curves of font, need clean way show text line line, mask follows position of pen.

something this, native textarea , own font:

http://activeden.net/item/handwriting-animation-tool-v25/11733

the textarea in mxml can have 1 mask, guess should create mask programmatically. has done yet?

thank you

there few different techniques create true effect - shown on website. , aware pretty tedious work. can in flex show lines of text sequentially revealing letters mask of shape. here simple example:

<fx:script>     <![cdata[         import mx.graphics.solidcolor;          import spark.components.group;         import spark.components.richtext;         import spark.primitives.rect;          private function createmultilinemask():void         {                            var txt:richtext = new richtext();             txt.x = 20;             txt.width = 260;             txt.text = "lorem ipsum dolor sit amet, consectetur adipiscing elit. quisque tempus, eros ac dignissim interdum...";             txt.setstyle('fontfamily', 'times');             txt.setstyle('fontstyle', 'italic');             txt.setstyle('fontsize', 16);             txt.setstyle('color', 0xff0000);                              var textmask:group = new group();              var ln1:rect = new rect();             ln1.x = 0;             ln1.y = 0;             ln1.width = 0;             ln1.height = 14;             ln1.fill = new solidcolor(0x000000);             textmask.addelement(ln1);              var ln2:rect = new rect();             ln2.x = 0;             ln2.y = 20;             ln2.width = 0;             ln2.height = 14;             ln2.fill = new solidcolor(0x000000);             textmask.addelement(ln2);              var ln3:rect = new rect();             ln3.x = 0;             ln3.y = 40;             ln3.width = 0;             ln3.height = 14;             ln3.fill = new solidcolor(0x000000);             textmask.addelement(ln3);              var container:group = new group();             container.x = 100;             container.y = 100;             container.mask = textmask;             container.masktype = 'clip';             container.addelement(txt);             addelement(container);              addeventlistener(event.enter_frame, drawline);              function drawline(event:event):void             {                 if (ln1.width < 300)                     ln1.width += 2;                 else if (ln2.width < 300)                     ln2.width += 2;                 else if (ln3.width < 300)                     ln3.width += 2;                 else                     removeeventlistener(event.enter_frame, drawline);             }         }     ]]> </fx:script> 

hth ftquest


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -