[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 535
  • Last Modified:

Bring Image to front on mouse over in Flash

I am trying to make a profile for myspace with a custom friends list. each persons picture enlarges on mouse over, BUT I can't get arrangement  to be on top on mouse over.

I'm somewhat new to Flash and I have very little experience with action scripting.

The link to the swf file is http://www.filethatfile.com/uploads/71221profile.swf You'll see what I mean on the friends list, I want each picture to be on top of the others only on mouse over.

  • 3
  • 3
1 Solution
if you are using movieclips your can use the swapDepths() function.... e.g.
chose a high number you know you won't exceed with amount of mc's on the stage. the number refers to the level.

it doesn't work with buttons, so if your rollover is inside a button, you'll need to place every button into its own movieclip and then add this code to the buttons onRollOver state:

2 ways of adding rollover functionality of your own to a button:

butInstanceName.onRollOver = function() {this._parent.swapDepths(3000);}
apply on (rollOver) {this._parent.swapDepths(3000);} directly to the button instance:

hope this helps,
duztinAuthor Commented:
I can't get your examples to work. they are buttons, I tried putting them into a movieclip. With no luck. Like I said I'm not familiar with action scripting so it's prob something I'm doing wrong. Would it be possible for you to look at the fla file for me?
i'm really sorry, but i won't be able to look at your fla until tuesday morning as i am about to leave the office and won't be back until then, so let me quickly try clear some stuff up.

each button needs to be in its own movieclip.... so, if you have 3 buttons on your stage, right click each one and say "convert to symbol".... you will now have a movieclip on your stage which holds your button. do this for every button individually.... you need as many movieclips on the stage as there were origionally buttons, each holding one of the buttons.

now, double click each of those movieclips,  and click on the button.
in the actions panel add this code: (i apologise, in my last post i said to use _parent for this way too, when indeed your shouldn't)

on (rollOver) {

make sure to do this for each button and make sure to click first on your button before adding this script to the actions panel.

i hope this helps you and if you're still suffering with it on tuesday, i'd be happy to look at the fla for you!
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

duztinAuthor Commented:
That was it, Thank you for taking the time to explain it to me, the wording used in flash is greek to me. Works perfectly!!!
duztinAuthor Commented:
Here is the finished product. Thanks again =P

glad i could help :)

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now