5 Replies Latest reply on Dec 16, 2009 8:28 AM by Ned Murphy

    the first layer dissapears when i add a new layer

    itznaren

      Hi All,

      i am trying to build a fireplace in flash where the mantles, surround type and face plates are changable when a value from a drop down menu is selected.I put each of the objects(mantles, surround types and face plates) in a seperate layer and am making them visible/invisible by controlling the alpha property of each of the objects. It worked fine till i had about 30 layers/images on the flash file, but as i try to add new layers/ images the new layer sort of covers the first layer making it invisible.i am new to flash and can you please help me out it in resolving the issue. I have also attached the flash file i am working on.

       

      Thanks very much in advance

        • 1. Re: the first layer dissapears when i add a new layer
          Ned Murphy Adobe Community Professional & MVP

          If layers are blocking other layers then you can click the eye icon of whatever layers to hide/show them as desired.

           

          As far as using the alpha property, that's okay, but you might consider using the visible property instead.

           

          Also, for the code where you change the visibility, you can greatly reduce the amount of code by first calling a function that hides everything and following that with making the selected item visible.

          • 2. Re: the first layer dissapears when i add a new layer
            itznaren Level 1

            Thanks very much Ned for the valuable suggestions. I will impove the action script as suggested. Regarding the visibility...i think you misunderstood the question. For some reason when i import new images to the file the bottom most layer/image is ovelayed by the new one. If i make any of the below layers invisible by cliking the eye icon then every thing is looks fine, but when i publish the file the problem persists. The situation is driving me crazy. Does it have anything to do with the excessive images i am using or any of the settins on the file? Any help will be greatly appreciated.

             

            Thanks

            • 3. Re: the first layer dissapears when i add a new layer
              Ned Murphy Adobe Community Professional & MVP

              If it has anything to do with what I saw when I ran your file, you are probably just getting tangled in your design.  There is one mantle13 sitting atop everything that has no code to tell it to hide, and one face plate that is just an image, not a movieclip, so they block everything behind them when you run the file.  You may just need to take your time and be sure you have each element properly configured both on the stage and in your code.

              • 4. Re: the first layer dissapears when i add a new layer
                itznaren Level 1

                Hi Ned,

                 

                Thanks very much for the help again. The file i sent must have been a working version but even though i handled mantle13 in the action script the problem persisted. the new image masked the bottom most one.................changing the alpha property to visible has done the trick. i dont know why but thanks very much for the suggestion or else it would have taken me ages to figure that out

                • 5. Re: the first layer dissapears when i add a new layer
                  Ned Murphy Adobe Community Professional & MVP

                  You're welcome - if you still can, please mark this as answered if your problem is solved.