Sign in to follow this  
abbottmw

What properties are exposed to Javascript?

Recommended Posts

Is there a way to change the properties of the flash file like the background color via javascript. Ive read about it not being possible changing the width and height of the swf with javascript.  What i was looking to do is for the real-time charting, if the guage number falls betwen certain numbers Id like to change the background color of the swf file to draw attention to it. 

Is this even possible?

-Matthew

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello Matthew,

You can achieve this by updating the chart using the setDataURL or setDataXML method every time you are changing the bgColor.

 

However, this might cause slight flicker.

Share this post


Link to post
Share on other sites

I ended up using some annotations and making them the size of the swf file, and using alerts to show the different annotations, depending on the value of the dial in the guage.  The problem im having now is the alerts should hide the annotation automatically once it is out of the range of the alert, but that is not happening.  Ive can get it to show when the value is in the alert range, but cant get it to go away.

-matthew

Share this post


Link to post
Share on other sites
Guest Rajroop

Hi,

 

 

 

When the value goes out of the alert range, you could use JavaScript to note that and then use the render() method to re-render the chart with the new background color(bgColor) set in the XML, as per you requirement.

 

 

 

Note: Please add animation='0' in the <chart> element to have a smooth rendering effect each time.

 

 

 

Hope this helps. :P

Share this post


Link to post
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
Sign in to follow this