Hi Danny,

Not sure about the snapshots; without seeing some code.  But, the
children are disappearing because you're creating references (not
copies) to the original display objects and then reparenting them with
addChild().  You might try this instead; to make a copy:

cloneBarChart = BarChart(this.barChartDispaly);

instead of :

cloneBarChart = this.barChartDisplay as BarChart;

-TH

--- In [email protected], "dannyvenier" <[EMAIL PROTECTED]>
wrote:
>
> Hi,
>
> Perhaps someone has tried to do this and has figured it out.
> Me...no. The objective is to take image snapshots from the display
> objects on individual tabs (children) of the tab navigator and use
> them for a tile list in another container...preferrably on another
> tab of the TabNavigator.
>
> The problem seems to be that only the visible tab can be snapped.
> Taking snapshots of the other non selected children produces what
> appears to be a very narrow slice of display...
>
> Stepping through the children, selectedIndex = i, setting that child
> to be visible, taking a snapshot, all programmatically without user
> interaction does not work. Again, one valid snapshot, and the rest
> are some machination of some image with positive size, but only a
> slice. I've done quite a bit with snapshots before so I'm confident
> in that part of the code (getting the snapshot of bitmapData, using
> it to form a Bitmap Object, wrapping in UIComponent, adding as child
> to container), and I'm picking up one successfully but no luck on
> picking them all up. I set breakpoints at the first point of the
> snapshot and the size tells me its not the full display object. I'm
> sticking the snapshots in a model and using to source the list. The
> copy in the model has only the single full image.
>
> I've even tried making a copy of the display objects themselves and
> presenting them in the tile list but for whatever reason, the instant
> I add the child to the tilelist container, it is no longer visible in
> the original tab.
>
> Its a barchart image I'm trying to capture so I try
> var cloneBarChart:BarChart = new BarChart();
> cloneBarChart = this.barChartDisplay as BarChart;
>
> but as I mentioned, the minute I add the cloneBarChart as a child to
> the tilelist container, the original barchart disappears from the
> original tab.
>
> I didn't include code cause its a bit spread out. I'm just wondering
> if I'm missing some characteristic of the tab navigator or a
> viewstack that makes hidden children inaccessible? It could be a
> creation sequence problem but setting the selected index and
> visibility should force creation, no?
>
> thanks,
> Danny
>


Reply via email to