2 Replies Latest reply on Mar 29, 2013 9:27 AM by John Hall

    Possible opacity bug

    John Hall Level 4

      Or my lack of understanding.


      Rectangle on the stage. Convert to symbol. Name it "box". Action for box on click:




      Another rectangle with script inside it:

      var box = sym.$("box");



      It alerts 1 whether it is visible or not.


      For me.

        • 1. Re: Possible opacity bug
          sarhunt Adobe Employee

          Hey John,


          When you use e.target the opacity gets applied to the div you select. Since a symbol is just a fancy div, it follows the same structre as HTML which means the clickable area for the symbol is the lastmost layer of your object, and e.target will grab whatever div you select.


          Say you have 4 rectangles inside of a symbol (let's call it four_rect_sym) and used your code. At the stage level you apply $(e.target)...css as a click event for four_rect_sym, but if you click on any one of the rectangles the code will hit the rect and not necessarily the whole symbol.


          In this case you'd be better referencing the symbol element if you want opacity to apply to the whole symbol. So sym.$("four_rect_sym").css("opacity","0);



          • 2. Re: Possible opacity bug
            John Hall Level 4

            Ah. It's a process Sarah ;-) This is why one should never put the word "bug" in a subject line.