varoon Report post Posted October 22, 2008 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
nilanjan Report post Posted October 22, 2008 (edited) 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 October 22, 2008 by Guest Share this post Link to post Share on other sites
varoon Report post Posted October 22, 2008 i use the button in same layer.... i put arrange -> "bring to front" but it did not... Share this post Link to post Share on other sites
nilanjan Report post Posted October 23, 2008 (edited) 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 October 23, 2008 by Guest Share this post Link to post Share on other sites
varoon Report post Posted October 23, 2008 Thx for your detailed explanation... im trying out... let u know soon... Share this post Link to post Share on other sites
varoon Report post Posted October 28, 2008 (edited) hi... can u chk my flash file... place FLA inside FusionCharts_EnterpriseSourceCode i dont know my code is correct or not... Edited October 28, 2008 by Guest Share this post Link to post Share on other sites
varoon Report post Posted October 29, 2008 anyone here ???? Share this post Link to post Share on other sites
nilanjan Report post Posted October 29, 2008 (edited) 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 October 29, 2008 by Guest Share this post Link to post Share on other sites
varoon Report post Posted October 29, 2008 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
nilanjan Report post Posted October 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) Share this post Link to post Share on other sites
varoon Report post Posted October 29, 2008 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
varoon Report post Posted October 29, 2008 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