Mailing List
Home
Flash Pro
Extending Flash
Flash Macromedia Developer
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Color : Transform.aa != _alpha

Color : Transform.aa != _alpha

2004-02-17       - By Santiago Esperanza

 Back
Reply:     1     2  


alpha is handled within 256 values in a range 0-255. Though the Color
transform and alpha properties work in a range of 0-100, the end resulting
alpha will be based on 0-255. In returning that to a 0-100 range, you 'll
see a difference in value from what you assigned it from the conversion.

-se


>From: "Ted Patrick " <ted@(protected) >
>Reply-To: flashcoders@(protected)
>To: <flashcoders@(protected) >
>Subject: [Flashcoders] Color : Transform.aa != _alpha
>Date: Tue, 17 Feb 2004 10:51:16 -0500
>
>I am working with the color object and weird things are happending when you
>compare the transform aa value and the _alpha values. They should be
>identical but they are not. The values seem to be identical at 0, 25, 75,
>100 but inbetween, they clearly off the whole number values.
>
>Here is an example:
>
>//Box is a MovieClip on Stage
>
>A = new Color(Box)
>A.setRGB(0xFF0000) //turns the box red
>Box._alpha = 20
>Trace(a.getTransform().aa) // 19.921875 where it should be 20!
>
>Box._alpha = 50
>Trace(a.getTransform().aa) // 50 works fine!
>
>Box._alpha = 60
>Trace(a.getTransform().aa) // 59.765625 where it should be 60!
>
>Box._alpha = 2
>Trace(a.getTransform().aa) // 1.953125 where it should be 2!
>
>Box._alpha = 95
>Trace(a.getTransform().aa) // 94.921875 where it should be 95!
>
>Box._alpha = 100
>Trace(a.getTransform().aa) // 100 works fine!
>
>Weird thing is if you do the opposite and use setTransform you get a
>different alpha values in the movieClip itself. This looks like a player
>error.
>
>Player WIN 7,0,14,0
>
>Anyone seen this before?
>
>Thanks,
>
>Ted ;)
>
>
>
>
>
>
>
>Theodore E. Patrick
>PowerSDK - Code for a distributed world
>http://www.powersdk.com
>
>
>
>=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
>Supported by Fig Leaf Software
>=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
>Be sure to check the archives and the wiki:
> http://chattyfig.figleaf.com/
>=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
>http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:104470
>=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
>To unsubscribe send a blank e-mail to:
>Normal Mode: flashcoders-unsubscribe@(protected)
>Digest Mode: flashcoders-digest-unsubscrive@(protected)
>

__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __
Stay informed on Election 2004 and the race to Super Tuesday.
http://special.msn.com/msn/election2004.armx


=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:104472
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)