[Tweener] text tween to append text

Zeh Fernando zehfernando at zeh.com.br
Wed May 21 11:43:03 PDT 2008


Funny, I got the reply but not the original text.

Regardless, thanks! I'll have a look at it and probably add it on my 
next semi-review.

Zeh

Jonathan Marston wrote:
> apologies, the correct _textAppend_preProcess method should be:
> 
> public static function _textAppend_preProcess (p_obj:Object, 
> p_parameters:Array, p_originalValueComplete:Object, p_extra:Object): 
> Number {
> p_extra.oldText = p_obj.text;
> p_extra.newText = p_originalValueComplete;
> return p_extra.oldText.length + p_extra.newText.length;
> }
> 
> 
> Jon Marston
> 
> Begin forwarded message:
> 
>> *From: *Jonathan Marston <jon at marstonstudio.com 
>> <mailto:jon at marstonstudio.com>>
>> *Date: *May 21, 2008 2:13:13 PM EDT
>> *To: *tweener at lists.caurinauebi.com <mailto:tweener at lists.caurinauebi.com>
>> *Subject: **text tween to append text*
>>
>> Hello, I've got a shortcut submission for the TextShortcuts special 
>> properties. I'ts a shortcut to append text as opposed to replacing it 
>> completely. Here is the extra code for TextShortcuts.as:
>>
>>
>>
>>
>> add to init
>>
>> Tweener.registerSpecialProperty("_textAppend", _textAppend_get, 
>> _textAppend_set, null, _textAppend_preProcess);
>>
>> extra methods:
>>
>> public static function _textAppend_get (p_obj:Object, 
>> p_parameters:Array, p_extra:Object = null):Number {
>> return p_obj.text.length - p_extra.oldText.length;
>> }
>>
>> public static function _textAppend_set (p_obj:Object, p_value:Number, 
>> p_parameters:Array, p_extra:Object = null): void {
>> p_obj.text = p_extra.oldText + p_extra.newText.substr(0, 
>> Math.round(p_value));
>> }
>>
>> public static function _textAppend_preProcess (p_obj:Object, 
>> p_parameters:Array, p_originalValueComplete:Object, p_extra:Object): 
>> Number {
>> p_extra.oldText = p_obj.text;
>> p_extra.newText = p_originalValueComplete;
>> return p_extra.oldText.length;
>> }
>>
>>
>> And belated congrats on releasing 0.70 as the stable version. :)
>>
>>
>> Jonathan Marston
>>
>> *Marston Development Studio LLC*
>> phone: (978) 758-7444
>> blog site: www.marstonstudio.com <http://www.marstonstudio.com>
>> email/gtalk/msn: jon at marstonstudio.com <mailto:jon at marstonstudio.com>
>> aol/yahoo: marstonstudio
>>
>>
>>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tweener mailing list
> Tweener at lists.caurinauebi.com
> http://lists.caurinauebi.com/listinfo.cgi/tweener-caurinauebi.com


More information about the Tweener mailing list