3 Replies Latest reply on Jun 23, 2013 10:25 AM by CopyPixels

    Big problem with SWF

    anjemalo Level 1

      Hello:

      I have a swf file imported to Director. the swf has a button in it. I have put on SWF a transparent sprite with a behavior, the problem is that I need to push the button in the SWF but I can't because the code over my transparent sprite.

      Do you know a way to get this?

      I need to use a sprite over the swf because I have to drag and throw multiples swf at a time.

      Can you help me , please?

       

      many thanks

        • 1. Re: Big problem with SWF
          CopyPixels

          There is a trick that I have used with bitmap sprites that may work with a swf.

           

          Just add the swf sprite to the scriptInstanceList of the the Transparent sprite.

           

          -- Transparent sprite behavior

          on beginSprite me

            SwfSpriteNum = 10

            sprite(me.spriteNum).scriptInstanceList.add(sprite(SwfSpriteNum))

          end

          • 2. Re: Big problem with SWF
            anjemalo Level 1

            I have try it but does not work

            • 3. Re: Big problem with SWF
              CopyPixels Level 1

              Hmmmm...

               

              If your transparent sprite has opaque parts then you can set the ink property to "matte" and then mouse clicks will pass through.

               

              If your transparent sprite is a completely transparent rectangle then I suggest deleting it and using some lingo code to determine if a mouse click is inside the drag area.

               

              on prepareMovie

                the mouseDownScript = "checkMouse()"

              end

               

              on checkMouse

                put "checking mouse loc"

               

                TransparentRect = rect(150,80,470,320)

               

                if _mouse.mouseLoc.inside(TransparentRect) then

                  put "mouse click inside transparent Rect"

                  -- add drag code here

                end if

              end checkMouse