Jump to content
Search Community

Use XML data node for Alpha Tween Value

DeltaFrog test
Moderator Tag

Recommended Posts

Hi Jack and everyone!  I have some XML loading and I can pass a hex number to a colorTransform tween without a problem yay! ..but when I try it with a Alpha tween it doesn't not work. Can anyone help? Thanks in advance!

 

 

This works:

TweenMax.to(map_mc.CA, .2, {colorTransform:{tint:WindData.CA.hexColor.text()[0]}});
TweenMax.to(map_mc.NV, .2, {colorTransform:{tint:WindData.NV.hexColor.text()[0]}});
 
 
This works:
TweenMax.to(map_mc.NV, 6, {alpha:.5});
 
This does not work:
TweenMax.to(map_mc.NV, 6, {alpha:WindData.NV.opac.text()[0]}); 
This doesn't work even though WindData.NV.opac.text()[0] traces to the output window as .5
 
 
Here is my XML:
<WindData>
 
<CA>
<PTCNetImpact><![CDATA[$(195,849,979.44)]]></PTCNetImpact>
<peg><![CDATA[4.94%]]></peg>
<hexColor><![CDATA[0xF26B27]]></hexColor>
<opac><![CDATA[.5]]></opac>
</CA>
 
<NV>
<PTCNetImpact><![CDATA[$(195,849,979.44)]]></PTCNetImpact>
<peg><![CDATA[4.94%]]></peg>
<hexColor><![CDATA[0xF26B27]]></hexColor>
<opac><![CDATA[.5]]></opac>
</NV>
 
 
</WindData>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...