actionscript-3apache-flexflex4away3d

Away3D in a Flex Panel component?


I have a large legacy app which uses Papervision to display spherical panoramas within a Flex Panel component. The functionality is that the panel appears initially @ 320 x 240 px on a 1024 x 768 stage and then is scaled "fullscreen" to fill the stage if the user doubleclicks on it.

Performance is very poor at "fullscreen" and Papervision is no longer being developed so I am looking for alternatives. In my initial explorations of Away3d, performance at that size is good but I haven't yet tried integrating it in the larger project.

Question: Upon further reading, my understanding now is that Away3d is not in the Display list and so will not integrate with Flex components but rather be displayed behind them (A Flex Panel is not a window with its own stage, etc.). So I am concluding that Away3d won't work as a drop-in replacement for Papervision. Do I have this correct? Is there an alternative solution which wouldn't require massive changes to the legacy project overall?


Solution

  • You can make it work but with some massive changes. The required steps for content that never resizes and never moves are:

    1. Mask all areas representing the place where the content should be from the top displayobject to the bottom one so that the stage can show through (stage must be transparent) and the Away3D content will show through as if it belonged to the top displayobject.

    For content that moves and resizes:

    1. same as before
    2. moves the Stage3D instance
    3. resize the Stage3D instance.