A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Alert Component Depth Control with API Drawing

  1. #1
    ASR | FlashComm Ceasar Aware0's Avatar
    Join Date
    Aug 2002
    Location
    Aurora, Colorado, USA
    Posts
    110

    Alert Component Depth Control with API Drawing

    I've got an mc on _root that I use as an API drawing board. Now I've created a button component that, when pressed, launches a scary Alert component saying "Are you sure you want to delete your precious drawing? It was so good and all...". The problem is that when the Alert shows, it's underneath the API drawing.

    Now the code for drawing is something like createEmptyMovieClip("draw_mc", nextHighestDepth()) then draw_mc.moveTo(x,y)/lineTo(x,y) etc.

    Why is it that if the Alert is called AFTER the draw_mc is created, that it is behind all the drawings. Is API Drawing on the _root for some reason above all other MCs on the _root? if so, how might I solve my problem?


    Peace,
    Ian

  2. #2
    Senior Member
    Join Date
    Nov 2003
    Location
    Las Vegas
    Posts
    770
    The alert component must be at a lower level than the drawing mc. Using getNextHighestDepth() on your drawing mc puts it on top of everything else.

    You could have your alert component include AS to swapDepths() with the drawing board mc.

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