A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: change the depth of loaded movies

  1. #1
    RIDER
    Join Date
    Aug 2000
    Location
    Munich-Sydney
    Posts
    177

    change the depth of loaded movies

    I looked at the depths description in the thread "MX Depths Explained" but Im stuck.

    I have 5 external movies loaded in the same frame in different empty movies. They load fine, problem is I have a masking effect that overlaps each other.

    This is how Im loading them:
    loadMovie("flash/images/photo1.swf", "_root.contenido.photo_loader1");
    loadMovie("flash/images/photo2.swf", "_root.contenido.photo_loader2");
    .....

    This is the script for the mc loading:
    on (rollOver) {
    _root.contenido.photo_loader1.photo_mask1.gotoAndP lay("down");
    _root.contenido.photo_loader2.photo_mask2.gotoAndP lay("over");
    }

    I want to be able to tell Flash that when I rollover "photo_mask2" it goes over the other 4, the same goes for the others.

    is this possible?

    Thank you
    take it or leave it


  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    depending on your movie structure, you should be able to do something like this:

    main timeline:
    my_depth = 1;

    in each rollOver:
    _root.contenido.photo_loader1.photo_mask1.swapDept hs(++_root.my_depth);



    In MX 2004, instead of this variable, you can use getNextHighestDepth():
    code:

    _root.contenido.photo_loader1.photo_mask1.swapDept hs(getNextHighestDepth());


  3. #3
    RIDER
    Join Date
    Aug 2000
    Location
    Munich-Sydney
    Posts
    177
    thank you for your quick reply.

    main timeline:
    my_depth = 1;

    Would I put that in the FRAME above the empty mc's in the MC named "contenido" ?
    take it or leave it


  4. #4
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    usually, all the code goes in the first frame of the main timeline.

  5. #5
    RIDER
    Join Date
    Aug 2000
    Location
    Munich-Sydney
    Posts
    177
    ok, thanks, I did that but wanted to know if I was doing it right as its still not working.

    i will continue to try...thanks
    take it or leave it


  6. #6
    RIDER
    Join Date
    Aug 2000
    Location
    Munich-Sydney
    Posts
    177
    GOT it working,

    I had to put all the external swf's in one (5) because for some reason the fact that they loaded in different MC it didn't work.

    Anyway..THANK YOU !!
    will put place the URL very soon for you to see the final project.
    take it or leave it


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