A Flash Developer Resource Site

Page 3 of 3 FirstFirst 123
Results 41 to 47 of 47

Thread: MX Depths Explained

  1. #41
    Junior Member
    Join Date
    Jul 2004
    Posts
    1

    Thumbnail Depths??

    Hey Guys,

    I'm extremely new to Flash and I'm trying to figure out a problem with my website.. I have thumbnails which are animated movieclips on my page, and they expand above each other when pressed.. I used the swapDepths(1); for each thumb and it works.. Each thumb when pressed is above all of the others..

    My only issue is that when you click on another webpage, the last thumbnail that was clicked, still has dominance and won't clear. How can I prevent this or eliminate it??? Please help! You can view my site at:

    http://www.aldenphotography.com

    thanks everyone!

    Kory

  2. #42
    Junior Member
    Join Date
    Jul 2004
    Posts
    7

    Depth Sorting Conundrum...

    Whee!

    OK, so here's my problem..

    I have a dynamic array of enemies, another of bullets, another of particles.

    I need to sort them out so that they sort according to their "Y" position.

    Problem:

    ENEMY[i].SwapDepths(y+somenumber);
    BULLET[i].SwapDepths(y+somenumber);
    etc.

    This works, but if an enemy and a bullet, or two enemies, or two bullets, end up on the same "Y" axis position, one of them will get deleted.

    So I can do:

    ENEMY[i].SwapDepths(y*moviewidth+x);
    BULLET[i].SwapDepths(y*moviewidth+x);
    etc.

    That works so long as they never have the same location (x/y).

    Now, what I WANT to do is to do this (psuedocode):

    if(getElementAt(y) == undefined)ENEMY[i].SwapDepths(y);

    which would work well enough for my designs... but there's no way to try to obtain a reference based on depth!

    Lil help?

    OH, and as for the question earlier about the thumbnails. You should make a "closeallthumbs" function or the like, which will set all the thumbnails on the page to their original position and depth. You should call this function before each photo is expanded, as well, as when you change to a different page.
    Last edited by beamsaber; 08-03-2004 at 04:08 PM.

  3. #43
    a small country village Trefor's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    328
    hi senocular

    help??

    I have a file that uses xml to place buttons on the screen.
    The first movieClip is the menu title
    code:

    _root.attachMovie("sectionClip", "heading"+headingCount, 100+headingCount);


    followed by the submenu movieClips which are place inside the sectionClip movie.
    code:

    _root[headingTarget].attachMovie("subSectionClip", "subSection"+subCount, 100-subCount);



    I'm missing something simple here I think but how can I get the subsection clips to be placed behind the sectionClip?

    Thanks

  4. #44
    a small country village Trefor's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    328
    Hi again.. after much careful reading of the article I fully understand.. the trouble is I didn't understand what was happening in my movie... it din't make a difference what depth I set the subButtons to as they were inside the main button and thus placed on top of my graphics.

    Inside the main button I made my graphic a movie clip and used the prototype for text fields and swapped depths..

    Thank you very much for a good article..

  5. #45
    Junior Member
    Join Date
    Sep 2004
    Location
    Texas
    Posts
    3

    active windows

    Hi, I feel really stupid posting this, but I cant figure out what the heck is going wrong.
    Ok so im trying to make a flash that will simulate windows. I got my windows to min, close and resize and drag. Now im trying to make an active window thing, were if clicked, the MovieClip will come to the front. So inside my MC window, i have on the button
    this.swapDepths(_root.getNextHighestDepth()-1);
    so that it will find the highest depth in the MC that is holding the window MC, wich I called menu.
    So i have multiple instinces of the window MC in the menu MC. So when the bar is clicked on one of windows MC, it does wut I want, it comes to the front. But wen I "close" the window MC's (it doesnt actualy leave the timeline, the window mc goes to a frame with nothing on it) and duplicate them, the duplicated MCs do not come to the front wen I click on the bar. I have the duplicates depths set to incrimate by 1 everytime they r dupliacted. I dunno, mabey something with the duplicates depths throws it off.
    id like to brush ur hair

  6. #46
    Junior Member
    Join Date
    May 2002
    Posts
    28

    man, u r my savior

    Hi

    I came to flashkit board today searching exactly for a answer about depths and found ur post, realy lucky! But i'm still not getting what I want:

    I want to load a movieclip and want it to appear behind all the other movies in the stage, i'm doing something like this:


    loadMovieNum("menu_agenda21.swf",1);
    _level1.swapDepths(0);

    but its not working
    what am I doing wrong?

    tnk u very much
    Mike

  7. #47
    Junior Member
    Join Date
    Sep 2004
    Location
    Philipphines
    Posts
    5

    help me to swapDepth

    hello world,


    I hope you can help me about my problem regarding with swapdepths.
    The swapDepths method function well on one of the movie clip but when i try it on another movieclip, with the same root parent it doesn't work. to be exact i have this mc i call wallClip and another mc named BedClip... firstly i set my main sprite depth to -995 then i set my wallClip to -996 and swap them everytime my main sprite walks behind the wall, so it function well. But when i set my main sprite to walk behind the bedclip, which has a -994 depths it is still on top of the bedclip. i had tried to check the bugs but i can't find any solution. All of them reside on one parent mc and the zone of depths is in the coverage of timeline zone.

    I hope somebody can tell me what was the problem of my movie... thank you very much

    always jopeman

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