I have a flex application and I want to add a new custom component with action script at runtime.
This works fine. I have created my custom component and added the following code:
var freeView:FreeView=new FreeView();
freeView.setStyle("showEffect",this.fadeIn);
freeView.setStyle("hideEffect",this.fadeOut);
freeView.visible=false;
this.addChild(freeView);
freeView.visible=true;
But my problem is the fade in effecto is not working. I know I’ve declared the effect correctly because if I use it in another component (like a panel) it works fine.
Can anybody help me with this issue?
Best regards!
Finally I solve the problem in a different way.
Instead adding the component at run time I have added the component to the application with visible property set to false and I change it to true when I need.