Resize browser causes FlashEff2 Flex objects to vanish when loaded into second swf

Posted by movalator 
I am using Flex 3.

I have a Flex project that contains an Image which has a FlashEff3 Flex FESBrightSquares effect applied against it and it works fine.

However, when I load that swf into a second Flex project's swf and resize the browser, the image disappears. Looks like it is removing itself on resize. But only happens when one swf is loaded into another.

I tried switching from the Flex version to creating it using the Flash version and had the same problem when loading into a Flex swf.

I need a solution to this asap - any ideas?
After looking into this a bit more I think your components remove themselves if their parent is a container class and the container is trying to move them to a contentPane on resize. see: http://jonathanbranam.net/flex3anatomy/class/Container/contentPane

This is a bug - they should not do this. Is there a workaround?
movalator,

Indeed that seems to be a bug but there is a workaround that should prevent that malfunction. For that you will have add the following code for the flasheff's 2 parent.

fe.parent.addEventListener(Event.REMOVE_FROM_STAGE, rem)

function rem(ev:Event){

ev.preventDefault(); //or ev.stopImeddiatePropagation();

}




Edited 1 time(s). Last edit at 10/01/2010 11:52AM by florodebat.
Hello,

I'm thinking i might have the same problem.

I have a picture with a FESFlipSquare inside two nested canvas, nothing else.
When i resize the browser, and the application scroolbars appear, the picture disappears (!).

I tried adding the code in the last post, but unfortunately, it does not say what class should i import for that event to be abailable, so i only get an error.

Could someone post the import line as well?
Re: Resize browser causes FlashEff2 Flex objects to vanish when loaded into second swf
October 04, 2010 01:39PM
@user397029
If you use the Event.REMOVE_FROM_STAGE event you need to import flash.events.Event.
Sorry, you do not have permission to post/reply in this forum.