Change depth of a movieclip on mouse over in Flash CS4

Hi,

I've got a Flash CS4 file that has 13 photos enlarge using a tween animation when you rollover them. I've got that working perfectly, however I don't know how to dynamically change the depth of the photos as they enlarge as I can still see thumbnails on top of the enlarged photo.

I've done some research into this and found that I need to update the "setchildindex" and found some solutions in the experts exchange knowledgebase - the problem I have is I'm not a Flash developer and have no idea on how to implement the "setchildindex" or even adapt the code found in the solutions. I know how to use "stop();" and that's it!

Please if anyone can take a look at the .flv file attached to this post and see if they can do anything, I would really appreciate it, thanks very much.
Overcliff-Gallery.fla
CSHTechAsked:
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.

InderjeetjaggiCommented:
0
CSHTechAuthor Commented:
I'm afraid it doesn't help, nothing on there that I need. I have no issue in finding solutions, its just the solutions I do find explain the setchildindex like were all developers, I need something step by step if possible.
0
AreDubyaCommented:
CSHTech,

You can use this in your rollover function -

setChildIndex(event.target as MovieClip, numChildren);


AreDubya

0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

AreDubyaCommented:
CSHTech,

Whoops. Didn't see your above comment before I posted that. I will take a look at your fla when I have a minute.

AreDubya
0
CSHTechAuthor Commented:
1. Do I add this to a frame in the movieclip, like frame 1?

2. I copied and pasted it into a frame and I get an error 'Access to undefined property event'

Thanks for all the comments so far!
0
AreDubyaCommented:
CSHTech,

There are a couple of issues:

 The "using a button to change states and then switch to a movie clip which has animation" thing isn't good. You should either keep the same symbol in place or...... not sure really, but it didn't work. What I did is a bit simpler, and works for all the pics. You can demo it by mousing over kitchen. Go through, get rid of all the buttons, and replace them with one frame MovieClips that are just a picture. Put them on stage, give them instance names, and add Event Listeners to those instance names (similar to kitchen_mc in the code). Then voila. The code is all in frame one, with some commenting. Also, to get specific params or info, highlight any of the colored text in your editor and hit F1

Good Luck,

AreDubya




Overcliff-Gallery.fla
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
CSHTechAuthor Commented:
AreDubya, Amazing thanks very much! I'll accept that as the solution! Really appreciate your help.

Without sounding ungrateful, there is one tiny little thing I wanted to ask, is there any way other than moving the mouse off the enlarged photo to begin minimizing it again?
0
CSHTechAuthor Commented:
I've got it, played with the code and can now click to minimise a photo! :D

Again, thanks AreDubya!!
0
AreDubyaCommented:
Anything way want, just change the event listeners. I was thinking clicking may be a better way to go anyway....

kitchen_mc.addEventListener(MouseEvent.MOUSE_DOWN, goFront);

etc, etc.... So, I changed this version to use clicks, look at the eventListener code, and use any event you want.

Glad this helped!

AreDubya

Overcliff-Gallery.fla
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
Web Development Software

From novice to tech pro — start learning today.