dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Graphic Ontop Help

  1. #1
    Junior Member
    Join Date
    Dec 2001
    Posts
    17
    Ok, I am making a little menu swf for my site and it has sliding graphics in it.
    There is three buttons and when you click a button a graphic slides out. It does this for each one but i need each one to be ontop. So when i press button 1 a graphic slides out, and when i press button 2 a graphic slides out ontop of the other which is good but while button 2's graphic is there when i press button 1 i cannot see it because it is behinde graphic button 2. How do i make it so when the graphic is slided out it is on top? Please help if you kind of understand.

  2. #2
    Senior Front End Developper
    Join Date
    Dec 2000
    Location
    Montréal
    Posts
    568
    use the MovieClip.swapDepths(depths) method

    usage exemple:

    myMovieClip1.swapDepths(10);

    or

    myMovieClip1.swapDepths(myMovieClip2);

  3. #3
    Junior Member
    Join Date
    Dec 2001
    Posts
    17

    How would i do it to all of them?

    I have three buttons and it works form 1 but not the others, how would i implement this?

  4. #4
    Junior Member
    Join Date
    Dec 2001
    Posts
    17

    Smile YES! I got it working!

    Yes, i put:
    on (release) {
    movieclipname.swapDepths(10)
    }
    I changed 'movieclipname' with thie name of the clip and each one was ontop of the other, thanks alot!!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center