hampelman / tweener

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

Alpha tweening in AIR and AS3 multiplication factor is broken #29

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In case of a defect report, please use this form for *VERIFIED* bugs only.
If you're unsure whether this is a defect or not, or you're unsure you're
using the right syntax, use the mailing list first to ask for advice or to
check if you're doing anything wrong.

Q. What is the expected outcome? What happens instead?
expected: alpha tween for appropriate number of time. When i say 2000 it
should tween for 2 seconds. or when i say 2 it shoud tween for two seconds,
however this only works when tweening from 0 to 100, but when tweening
back, from 100 to 0 it breaks.

Q. What code will reproduce the problem?
Tweener.addTween(theClipToTween_mc, {alpha:0, time:2});

Q. What version of the class are you using, and under which development
environment (IDE version, compiler, etc)?

Flash IDE, CS3 Prof.

Please provide any additional information below. Also, please attach
*small*, sample files with minimum functionality to reproduce the problem
if possible.

When tweening from 0 to 100, 2000 is equal to two seconds
but when tweening back from 100 to 0, 2000 does not equal two seconds, and
2 does not equal 2 seconds, so there must be wrong with the multiplication
factor in the time

see attached file for example

Original issue reported on code.google.com by sidney.dekoning on 31 Jan 2008 at 4:18

Attachments:

GoogleCodeExporter commented 8 years ago
AS3 uses 0-1 for alpha, not 0-100. If you try to tween alpha to 100, it'll 
reach 1
(full opacity) very fast, hence you'll appear as it's going to fast. It'll also 
be
wrong because using that value you'll be multiplying the alpha value of every 
pixel
by 100, literally obliterating semi-transparency on the display object.

There's no defect. Just use 1 as alpha target instead when you need full 
opacity on
your code instead, as AS3 mandates.

Original comment by zisfor...@gmail.com on 31 Jan 2008 at 5:05