Flex 2: Bug with Panel and Filters?

ActionScript, Flex Add comments

We just ran into a weird thing when we wanted to create a transition on a “collapsable” panel, so that only the header is shown. It seems that the actual container inside the panel is not hidden when a filter is applied to the Panel. As an example, my co-worker created a little app that shows the problem. Below are 2 panels, one without filters and one with a blur filter. You can see that when you click the button to collapse the Panels, things seem to go wrong.

So what do you think, is this a bug or are we doing something wrong here? Any solution to this?


(view source is enabled)

[Update] – Fixed link to view source


Add to Bloglines - Digg This! - del.icio.us - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner
 

6 Responses to “Flex 2: Bug with Panel and Filters?”

  1. jwopitz Says:

    Two things:
    1) The right-click source doesn’t seem to reflect the content of the swf. Maybe I am missing something. But I can’t really look at the implementation without it. So that leads me to…

    2) How are you collapsing your panels? My approach would be to resize the panel.height to that of the headerHeight (which looks like what you are doing) but also make sure that you turn off the visible and includeInLayout properties of it content’s children.

    Of course I haven’t worked much with the filters so I can’t attest to the success of my proposed implementation. But it sounds logical, right?

  2. Christophe Says:

    Thx for the notice on the view source. I just fixed the link. I’ll also check what we can do with the properties, thank you for the suggestion.

  3. jwopitz Says:

    So after looking at the source, I see you are using states. I have never used states in this fashion so I have no input to how that would be affecting it.

    However you might try this: Rather than using states, try having the buttons fire functions that explicitly set the Panels’ heights.

    The other approach might be this: If hiding the content of the panel is a much desired feature, you might try subclassing the Panel, and then creating convenience getters for the mx_internal::contentPane:Sprite. I believe this is where all the children get added for the Panel.

    Hope that helps.

  4. Yaniv De Ridder Says:

    Hi Christophe,
    this is looking like a bug in the flex framework, you should get an account in http://bugs.adobe.com/flex/ to be able to fill a new bug in the public bugbase.
    also you should try your testcase with Flex 3 (make sure you choose the moxie SDK) to see if it is fixed.

    Cheers,

    /yaniv

  5. Kristof Neirynck Says:

    That bug seems oddly familiar.
    Iiley had a similar problem when developing aswing.

    Jeremy mentions scrollRect and filters are not working well together in actionscript 3 in the comments of that blogpost.

    Maybe you could look at the generated code and see if this is the same bug.

  6. fede Says:

    i run into a problem with visualisation,when i do visualization on browser he say npswf32.ddl missing in mozilla directory,try to reinstall the last plugin of flash 9 or reinstall adobe flex 2. what have i to do ?
    i tried to re-install flash 9 plugin,but this bug comes everytime

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in