varoon

Placing a button over the chart in flash

Recommended Posts

Hi

 

 

 

i am using multiple chart in a single flash file.

 

 

 

i need to place a button above the flash chart...

 

 

 

it always stays behind... any idea ?

 

 

 

is this possible ?

Share this post


Link to post
Share on other sites

Hi

It is only an issue with depth management of MovieClips in the flash file.

1. It seems like you are having the button created in authoring environment. In that case, use MovieClip.swapDepth() method to move the movieClip containing the button to a safe higher depth.

2. Else, if you are creating the button in runtime, simply find the highest depth for it.

Edited by Guest

Share this post


Link to post
Share on other sites

Hi

You see, flash reserves negative depths for placing content added at authoring time (when working in .fla) ... while contents added at runtime (when .swf runs) is managed using the non-negative depths.

It seems that you are placing the the "button" at authoring time ... so it is placed at a negative depth. Thus, anything (your other charts) added at runtime (those added using code) will be above the "button", cause the "charts" will be in non-negative (zero and positive)depths.

Please remember that content at depth 2 will be over content at depth -2 (say).

Your easiest solution to bring the "button" on top of others (your charts) will be to change (swap) the "button" 's depth to a positive one, higher than the topmost chart.

The catch is to use the method of the MovieClip API: swapDepth().

Please confirm of what have you used as your so called "button" from the following options:

1. Movieclip

2. Button

3. Button component

Edited by Guest

Share this post


Link to post
Share on other sites

hi... can u chk my flash file...

 

 

 

place FLA inside FusionCharts_EnterpriseSourceCode

 

 

 

i dont know my code is correct or not...

Edited by Guest

Share this post


Link to post
Share on other sites

Hi,

Have seen your code ... please let me know your problem precisely. What is that you can't achieve through this piece of code.

Please refer everything with respect to the fla you provided ... like movieclip names.

Edited by Guest

Share this post


Link to post
Share on other sites

just try moving the button , to the center... and preview it,

 

 

 

the button will not be visible...

 

 

 

at present i have kept it far from the chart loading position...

 

 

 

hope u get, what im saying... :)

Share this post


Link to post
Share on other sites

thx.. i actually added the code...

 

 

 

then nothing happened.. so removed it...

 

 

 

but i did not know we should pass value like.. """Max.swapDepths(1000)""""

 

 

 

im just new to this flash... and dont know much abt it.. hope u understand my situation...

 

 

 

thx for helping me... :)

 

 

 

im trying out... now.... will let u know wat happens....

Share this post


Link to post
Share on other sites
nilanjan (10/29/2008)
Hi

 

 

 

I think you haven't yet tried with swapDepths() as I asked you to earlier. Just simply add this line at the end of your code:

 

 

 

Max.swapDepths(1000)

 

 

 

Worked like charm... :w00t:

 

 

 

thx... :) :)

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