Transparent Flex app click-through solution

In my project I had situation that I need to load flex transparent flex application and to haveposssibility to click through this applicatio
I was trying to set backgroundAlpha to zero, but it doesn’t help me because application container overlap object under this application
here is a trick
on application create complete:

private function creationCompleteHandler():void
{
rawChildren.removeChildAt(0);
}

it will removes displayObject in application which overlaps objects under flex app

9 Responses

  1. Rost Says:

    Interesting! Of course, I’d prefer avoid using “rawChildren” as risky stuff.

    Maybe, backgroundGradientAlphas can do the same job for you here?

    http://livedocs.adobe.com/flex/3/html/help.html?content=app_container_2.html

    But, anyway, your finding is useful in a lot of situations where any non-ordinary control over the app background is needed.

    Thanks, Rost

  2. Anton Says:

    in this case backgroundGradientAlphas same as backgroundAlpha, you can make transparent app but will not be able to click through flex app on ‘pure’ ActionScript objects under this app because of app container

  3. Rost Says:

    Ahh, clicking! Cool :)

  4. GMalartre Says:

    You could play with mouseEnabled or set the borderSkin style to null.

  5. GMalartre Says:

    Also try mouseChildren=”false”

  6. Sasha Dzeletovic Says:

    Very insightful Anton. Thank you very much for the tip! I will send you a link of where it was used at project end in spring ‘10.

  7. Sasha Dzeletovic Says:

    Update:
    Setting borderSkin to null turned like a better choice since removing childAt(0) caused an error at runtime at the first mouse click on the app but continued to work w/o issues after.
    Here’s the error:
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.

  8. songhuan in china Says:

    i try it ,but not work, do you know the solution?

  9. Mark Murphy Says:

    whats the solution for Flash Builder since this solution isn’t available for that.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.