Hello all,

I'm having a big trouble with a viewstack.

I have this code

        <mx:ViewStack id="vstack" width="800" height="400">
                        
                        <mx:Canvas id="step1" label="donor information">
                                <mx:HBox>
                                        <mx:Canvas id="step1_1" width="390" />
                                        <mx:Canvas id="step1_2" width="375" />
                                </mx:HBox>
                        </mx:Canvas>
        
                        <mx:Canvas id="step2" label="call status">
                                <mx:HBox>
                                        <mx:Canvas id="step2_1" width="390" />
                                        <mx:Canvas id="step2_2" width="375" />
                                </mx:HBox>
                        </mx:Canvas>
        
                        <mx:Canvas id="step3" label="contribution information">
                                <mx:HBox>
                                        <mx:Canvas id="step3_1" width="390" />
                                        <mx:Canvas id="step3_2" width="375" />
                                </mx:HBox>
                        </mx:Canvas>
                        
                </mx:ViewStack>

and an init actionscript which i'm just trying to trace the elements
to see what happens and ends up getting null for some elements that i
need to work with.

private function init():void {
trace(step1); // return the object
trace(step1_1); // return the object
trace(step1_2); // return the object
trace(step2); // return the object
trace(step2_1); // return NULL
trace(step2_2);  // return NULL
trace(step3) // return the object
trace(step3_1); // return NULL
trace(step3_2); // return NULL
}

The problem is that i really need to work with the canvas on the
initialization. I can write dynamically on the canvas (step2 and
step3) but weirdly i can't get the objects inside them.

Any guru to help me out with that?! 

Raf


Reply via email to