There are two different methods available for displaying Flash content in 3D using Scaleform 4.0 and higher.
The first option is to use the traditional method of rendering Flash into a texture and then applying that render texture as a map onto a 3D surface in the scene. Before 3.2, this was the only way developers could visualize Flash in 3D.
Render to Texture method has an advantage over 3Di. Since the Flash content is texture-mapped onto a 3D object, it takes full advantage of the capabilities of the 3D engine and blends seamlessly with the rest of the 3D world. This allows for correct Z (depth) sorting, blending/transparency, and clipping (regardless of the intention to clip the UI).
On the other hand, there are several disadvantages related to performance and memory, since additional memory is required for the render texture. Also, note that any Flash interactivity must be handled by the game (by manually inverse-mapping the mouse coordinates and passing them to Scaleform). Finally, as this approach is texture based, the Flash content will be displayed flat; therefore individual movie clips cannot be offset or rotated from each other. As an example of this approach, refer to the ‘SWF to Texture’ demo which can be found in the Scaleform SDK Browser.
The second option, is to use 3Di, either from ActionScript or the Direct Access API (C++). 3Di has many advantages over using a render texture approach. Firstly, no additional memory is required. Also, individual movie clips can have their own nested transforms – each can be uniquely offset or rotated thus the overall movie does not look flat. Finally, all the input and interactivity is automatically handled by Scaleform, The application simply passes input events to Scaleform as usual.
However, 3Di does have some limitations. Notably, since it is handled by the default Scaleform renderer and treated as a UI, no depth sorting or back-face culling is performed. Therefore as UI objects rotate behind other objects, they may not be drawn in the right order. Also, it may be tricky to seamlessly inter-mix UI elements with other 3D game objects, since the UI objects should match the same camera, lighting, post-processing and other graphical effects in use. Also, many UI elements are transparent and require a specific drawing order for blending, which should be taken into consideration.