5 Replies Latest reply on Dec 23, 2009 7:14 AM by Rothrock

    Line depth problems

    deshggg

      Hey everyone,

       

      I am using CS3 (with AS2) and have an intro animation using AS2. This merely involves a number of lines being drawn on the stage which eventually make up an outline box that the content sits within. This works fine and its layer is placed above everything else on the stage (as it should be in front of everything) apart from the menu layer. The menu has drop down options which (when being displayed) cover parts of the outline box. For some reason no matter what i seem to do i cannot get the menu to be the front most element, it is in front of everything on the stage apart from the outline box. It is on the highest layer and i have tried specifically setting the depths of the menu and the box but nothing i do has any impact on the order. I'm sure i'm being crazy, but i would very much appreciate any pointers anyone can give as i have been playing with this for ages now and i'm really not sure the best way to progress?

       

      Thanks so much everyone, this is beginning to drive me crazy as i'm sure it's just something stupid that i'm not understanding,

       

      Dave

        • 1. Re: Line depth problems
          Ned Murphy Adobe Community Professional & MVP

          If the lines are being drawn using actionscript, chances are they do not have a home in the timeline.  If that's the case, try drawing them inside a movieclip that lives in a layer below the menu.

          • 2. Re: Line depth problems
            deshggg Level 1

            Ned, thanks very much for your help as ever. Each line lives within a movieclip, i use the following code:

             

            this.createEmptyMovieClip("myLine7", 10);

            (with an increasing depth value as otherwise it wouldn't seem to display properly) for each line and then within each movieclip draw the relevant line. This code is placed within the actions of a frame within a layer beneath the menu layer. Does this amount to what you were suggesting or is there a difference in collating all of these movieclips into one container movieclip?

             

            Thanks so much for your help,

             

            Dave

            • 3. Re: Line depth problems
              carl schooff Level 3

              putting the script in a layer below other visual assets does not make that script draw on that layer of your movie.

               

              Ned's advice was correct.

              On your outline layer place an empty movieclip and give it the instance name "outline_mc"

               

              In all of your code that draws lines try something like this:

               

              outline_mc.createEmptyMovieClip("myLine7", 10);

               

              outline_mc.myLine7.blahBlah();

              1 person found this helpful
              • 4. Re: Line depth problems
                deshggg Level 1

                Thank you both so much, that has made it work perfectly now i have physically added a movieclip on the stage and placed everything within that as suggested. This makes perfect sense, what i'm still slightly confused about (i don't need it for this, i'm just intrigued!) is how you would create that movieclip using actionscript and have it placed in that location (rather than manually adding it)? Or is that not actually possible? I had thought if i put

                this.createEmptyMovieClip("myLine7", 10); within the actions of a frame then it would place the movieclip within that frame, although i'm now pretty sure that's wrong.

                 

                Thanks so much guys!

                 

                Dave

                • 5. Re: Line depth problems
                  Rothrock Level 5

                  For everything you wanted (and more) to know about depth management in AS2.

                   

                  http://www.kirupa.com/developer/actionscript/depths.htm

                   

                  Read the whole thing, but the second page will explain the difference between timeline placed artwork and dynamic artwork.