Skip to main content
Known Participant
March 1, 2010
Question

ContainerController Transparent Background

  • March 1, 2010
  • 1 reply
  • 588 views

I have a need to make the size of the transparent background added to the ContainerController smaller so I can layer other components under the controller but also be able to accept mouse events.

I noticed above attachTransparentBackgroundForHit there is this comment:

/** No mouse clicks or moves will be generated for the container unless it has a background covering its area.  Text Layout Framework

* wants those events so that clicking on a container will select the text in it.  This code

* adds or updates (on size change) that background for Sprite containers only. This may cause clients problems

* - definitely no hits is a problem - add this code to explore the issues - expect feedback. 

* We may have to make this configurable. @private */

One thing that would be nice to have would be is a transparentBackgroundTopOffset and transparentBackgroundBottomOffset.  Then change values of the local variables bgheight and bgy to accommodate for the offsets.

This topic has been closed for replies.

1 reply

Adobe Employee
March 1, 2010

You can accomplish your goals by subclassing ContainerController and overriding the function.

Hope that helps,

Richard

Known Participant
March 1, 2010

Thanks Richard,

I noticed a bunch of properties in the function were private but now that I look most of them are only referenced inside of attachTransparentBackgroundForHit.  The only exception to that is _minListenersAttached but I guess I could override attachContainer and detachContainer and store my own private variable.

Thanks,

Joel Marks