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 Ted Patrick

 Back
Reply:     1     2  

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)