CSHTech
asked on
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
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
ASKER
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.
CSHTech,
You can use this in your rollover function -
setChildIndex(event.target as MovieClip, numChildren);
AreDubya
You can use this in your rollover function -
setChildIndex(event.target
AreDubya
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
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
ASKER
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!
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!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?
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?
ASKER
I've got it, played with the code and can now click to minimise a photo! :D
Again, thanks AreDubya!!
Again, thanks AreDubya!!
Anything way want, just change the event listeners. I was thinking clicking may be a better way to go anyway....
kitchen_mc.addEventListene r(MouseEve nt.MOUSE_D OWN, 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
kitchen_mc.addEventListene
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
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/MovieClip.html