svanryckeghem

Get the chart's _x position with ActionScript

Recommended Posts

Hi.

 

 

 

gap.jpg

 

 

 

How can I dynamically figure out the X position of the canvas (only the part with the graph)? I've added a layer on top of the chart object with ActionScript, and I need to know the exact size of the gap between the border of the flash movie and the canvas. I started with a fixed value, but sometimes the Y axis value labels size change, and thus cause the canvas to move a little.

 

 

 

Another way for me to solve this would be to have the ability to prevent that gap from being resized. Is there a way to do that?

 

 

 

Thanks.

 

 

 

Sebastien

Share this post


Link to post
Share on other sites

This is a dynamic position which is stored in a private object inside Chart class - it can be referenced as

this.elements.canvas.x inside the flash code, where this refers to the instance of chart class.

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