A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: swapDepths - problem

  1. #1
    Member
    Join Date
    Feb 2005
    Posts
    62

    swapDepths - problem

    Hello.
    I try to make an rotate (perspective) menu (ilusion of 3d). And there is some problem with swapDepths.
    My idea was to detect some colision of elements (buttons), and check which have smaller scale to order the depth.

    shortcut: if scale of element 1 < element 2 then element 1 shoud be under the element 2.

    I did like I thought, but somethig goes wrong (sometimes goes ok but sometimes wrong)
    In my beta swf only two elements are under the script control: BONEY AND LONDON.
    Please have a look on the movie, and move the mouse cross the center of the page to change the rotate direction.
    http://www.multimedia.musicart.pl/st...depth_col.html

    I event tried to put all of elements in the first of group of colision elements and also all to the second group.
    My final wish is to make full co-relation between all elements, and I want to put about 10 buttons. Any suggestion how I should do this with more than 2 elements.
    Thanks for help and any ideas.
    Attached Files Attached Files

  2. #2
    Senior Member
    Join Date
    Dec 2006
    Posts
    274
    One quick idea for a special case, use 2 layers, both containing he same 3d rolling menu. Use top layer to show topmost half of menu elements and hide them from another layer.
    However, this works only if top layer elements do not intersect eachother.
    And you have to use a script to check which elements to show or hide in layers.

    If I remember correctly, Flash allows you to swap layers to the specific layer number, so menu item Z (deepnes value could be used for that.. (it wont work in preview..)

  3. #3
    Member
    Join Date
    Feb 2005
    Posts
    62
    Thanks for Your answer but I think I dont understand Your way of thinking in 100% and if it will work only in this case You wrote about, it will be not good for me.
    I want to put more than 4 buttons (pictures). They will intersect eachother for sure. Any other ideas? Did You check why the swapDepths doesn't work corectly?

  4. #4
    Junior Member
    Join Date
    Apr 2007
    Posts
    18

    Got your answer right here:

    Hi! I had exactly the same problem, and I figured it out. I have the javascript I wrote in 3DFA to solve the problem. I can e-mail it to you if you want. (It's complicated to explain here). My email is uncool.dude@yahoo.com.

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