Using Flash Depth Manager Across Multiple Scenes

Hello All,

First time poster with a Flash/Actionscript question.

I have a Flash app which displays information as pop-ups on movie-clip mouse-overs.  It is a map with location dots - mouse over a dot, get info about that location - mouse out, the info disappears.

When I started this job and inherited this file, it was set up as buttons with empty Up frames, and the info graphic in the Over/Down frames.  The problem with this was the map dots had to be placed on a separate layer than the buttons so they would be hidden by the Over popup.  Otherwise, the popups appeared behind neighboring dots and couldn't be seen.  Also, as we added/removed locations, I was having to add a visible dot on one layer and an invisible button exactly over it on another layer.  

I resolved this by converting the buttons to movie clips with Rollover and Rollout actionscripts to pop up the info.  That allowed me to completely remove the layer of plain dots.  Each movie clip instance contains its own dot and simply changes frames within the clip to display the info.  Works great.  However, depending on which layer the clip was on, they were being hidden by neighboring movie clip dots.  

I got around this, I thought, by invoking the DepthManager class in the root timeline and using it to position the active clip to the top depth on mouseover and back to the bottom depth on mouseout.  But, because the file is set up in scenes allowing users to isolate regions (All, SouthCentral, MidWest, etc.) I still have one problem.  

If I mouseover a California dot in the All scene, I get its info.  Mouseout, it disappears.  Great.  Then change scenes to MidAtlantic, or Northeast, or anywhere besides West, and the California dot I moused over is still visible.  Each scene actually contains only the dots for its region, but something about the shuffling algorithm in the Depthmanager makes the dots from one scene visible in another once they have been invoked.  I need a way to clear the Depthmanager layers each time I move between scenes.  

I have searched high and low for info about this, but the Depthmanager doesn't seem to be thoroughly documented, and I am having a hard time finalizing this.

Am attaching the actionscript to invoke Depthmanager on the root timeline (on the root timeline within each scene - is identical, could this be problematic?) as a code snippet, along with a snippet from one of the movieclip instances.

I can provide the .FLA file zipped up if needed.  Just let me know how to post a link to it here.

Thanks in advance for any info.
---From Root---
import mx.managers.DepthManager;
 
mcFocus = function(n){
  this[n].setDepthTo(DepthManager.kTop);
}
 
mcUnFocus = function(n){
  this[n].setDepthTo(DepthManager.kBottom);
}
 
---From Movieclip---
on (rollOver) {
 	_root.mcFocus("MankatoCYclip");  // Bring clip instance to top via Depthmanager
	this.gotoAndStop("On");  // Go to internal frame with info displayed
}
on (rollOut) {
	this.gotoAndStop("Off");  // Go back to internal frame with info hidden
 	_root.mcUnFocus("MankatoCYclip");  // Send back to bottom via Depthmanager
}
on (release) {
	getURL("http://www.wherever.com","_blank");
}

Open in new window

InterMountainMgmtAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

blue-genieCommented:
add a .txt extention to your fla and zip it - let's have a lookie look.
0
InterMountainMgmtAuthor Commented:
here's the source

IMM-FlashMap.zip
0
blue-genieCommented:
hey sorry i didn't get back.
i've downloaded the files now and had a fiddle, but no joy.
I've not worked with DepthManager myself, i use the good ol swapDepths.
I'm assuming (did some tests but can't 100% verify) - that because you've got instance with the same name, i.e. the files in All and then the other sections, there might be conflict.
would you be willing to change your file structure and take the items out of scenes?
i personally hate scenes and in my experience it often results in funny things happening.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

InterMountainMgmtAuthor Commented:
blue-genie,
I'm not particularly attached to the scenes-structure.  That's just how I inherited the file, and I haven't had time to restructure it.  I'm not even sure I would know the easiest way to do so.  
I'm assuming it would involve linking region visibilities to the region-selection buttons across the bottom.  Whatever it is, I need it to provide an easy way to add new properties - not a lot of customized AS buried within clips within other clips.  Cutable-pastable AS where I can change just an instance name is preferable for time reasons.
Any suggestions or code hints for implementing visibility/functionality of the regions via the buttons rather than scene-changes would be highly appreciated.
Thanks - IMM.
0
blue-genieCommented:
i would turn the whole thing(map) into a movieclip with a few frames.
1st frame have All stuff
and then just cut and paste the stuff from each scene into subsequent frames.
then NorthWest will goto frame 2 of that clip etc.
see how the Depth manager handles then.


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
InterMountainMgmtAuthor Commented:
blue-genie, thanks for pointing me in the right direction.  I ended up placing my regional groups into regional movie-clips and putting them all in the first frame.  That allowed me to turn region visibility on/off involving the timeline.  I am still working on the DepthManager, but I have the worst of it worked out.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.