yestaro / efflex

Automatically exported from code.google.com/p/efflex
0 stars 0 forks source link

Effects do not apply to dynamically created viewstack children #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
If you create the children of the viewstack with action script, the effects 
don't work.

For example, assuming the viewstack in question is called "mainStack":

private function buildSlides():void{
for each(var slide:XML in dataXML){
   var slideUnit:Slide = new Slide();
   mainStack.addChild(slideUnit);
}

Each "Slide" component is a Canvas.

Original issue reported on code.google.com by smlomba...@gmail.com on 5 Mar 2009 at 5:59

GoogleCodeExporter commented 8 years ago
I'm not sure what slide means in your code.

but I could add canvases to the viewstack through actionscript

just set the styles for hideEffect and showEffect to the animation type that 
you want.  I used the scroll class for 
this example.

CustomCanvas is just how it sounds, it's basically just a custom canvas that 
has some visual elements in it.  
Also make sure in your custom component that you want to add to make sure all 
the components inside are 
wrapped in a canvas tag 

var scrollEffect:Scroll = new Scroll();

var canvas:CustomCanvas = new CustomCanvas();
canvas.setStyle("hideEffect",scrollEffect);
canvas.setStyle("showEffect",scrollEffect);
mainStack.addChild(canvas);

Hope this helps

Original comment by adammile...@gmail.com on 9 Mar 2009 at 9:14