csk0921 / tweener

Automatically exported from code.google.com/p/tweener
0 stars 0 forks source link

tweening html textfields on their _alpha property #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

First I wanted to say that you guys did a great job !!! Thanks !

Until now I was using mc_tween.as, today I found this class and tried to
use it.

For now my problem was to tween the _alpha property of a movieclip with
inside a background and a textfield containing html.

I tried this :

Tweener.addTween(this.text_mc, {_alpha:0, time:5, transition:"linear"});

The background of the movieclip is tweening well but the text is not
tweening at all (the same way as standard flash scripting without using the
class).

Then I tried :

Tweener.addTween(this.text_mc, {_alpha:0,_blur_blurX:0, time:5,
transition:"linear"});

Now both the background and the textfield are tweening perfectly.

Could you please add somewhere in the class a parametre that would allow to
force the class to use a blur filter or another one (I didn't test with
other filter) to allow html textfields to be tweened on their _alpha property.

Thanks.

Alex

Original issue reported on code.google.com by anonymou...@yahoo.fr on 13 Aug 2007 at 3:43

GoogleCodeExporter commented 8 years ago
Alex, it seems to me that your textfield doesn't have the fonts properly 
embedded and
it's using the system fonts instead. When that happens, _alpha change is not 
possible
- so the text would either have 100% of opacity, or 0%.

Incidentally, when that happens, adding an empty filter (like a blur of 0) does 
force
the textfield to be prerendered prior to drawing, so an _alpha works.

So I'd like to know the circumstances behind font embedding for that specific
textfield you're using. If my theory is correct, then there isn't much that 
should be
changed - afterall, it's the way it's supposed to work, and I wouldn't like to 
try to
circumvent limitations of the rendering algorithms with solutions that could 
create
problems elsewhere (like adding an empty filter). It'd be best for the 
developer to
use the trick when needed and just let Tweener do what it said it'd do, change 
the
_alpha.

Thanks,
Zeh

Original comment by zisfor...@gmail.com on 13 Aug 2007 at 5:53

GoogleCodeExporter commented 8 years ago
yes, you're right the font used in the textfield is not embeded.

If it was I guess the _alpha tween would work in any case.

On the other hand embeding fonts uses quiet a lot of space this is why I'm not
embeding them.

Anyway my little trick is working and that is the most important ;-)

Cheers.

Original comment by anonymou...@yahoo.fr on 13 Aug 2007 at 6:01

GoogleCodeExporter commented 8 years ago
Yeah, there are reasons to use non-embed fonts, but just keep in mind it's a
different rendering path so you'll have problems with _alpha and masking.

Thankfully the "empty filter" trick should solve them both though.

Original comment by zisfor...@gmail.com on 14 Aug 2007 at 2:23