Nicky Chung

n VS2005, i need to embed a SWF flash movie in a fullscreen Direct3D 9.0 based game. I have successfully added my swf(which was painful) and played the movie without problem. But, when I tried to switch the display from SWF flash move to Direct3D device. It failed! The followings illustrate the general flow of my problem:

1. load and display the SWF

2. user press space to start game (SWF get focused and read space bar), set SWF invisible by AxShockWaveFlash1.visible = false

3. start game, render Direct3D

4. game ended, stop rendering Direct3D

5. show the SWF movie again, set SWF visible by AxShockWaveFlash1.visible = true, focus SWF

Problem raised from Step 4 to Step 5. This problem do not exist when I am not using the full screen ability in Direct3D. When I set "visible" to true, SWF may not be able to be visible on the screen. It can be appeared successfully sometimes but it is not guaranteed. The most intresting thing is that SWF status shows that SWF is currently visible and when I press space bar, step 2 will proceed. It means that SWF is currently on top of the screen and get focused but it just can't be displayed correctly.

I have checked that Direct3D related processes have all been stopped before I set SWF visible. And, I also found that if i didn't draw by Direct3D (but direct3d device is created), SWF can be shown correclty. I am afraid if there is something related to screen buffer in Direct3D which cause this subtle problem. I am no Direct3D expert. Could somone please offer me some help



Re: Game Technologies: Graphics Flash Movie in fullscreen Direct3D game

qrli

The same as DirectDraw, D3D's full-screen mode is exclusive full-screen mode. That means all other rendering is not guaranteed to be visible. In fact they're invisible normally because they don't have access to display device. You should enter non-full-screen mode for SWF.




Re: Game Technologies: Graphics Flash Movie in fullscreen Direct3D game

Nicky Chung

Is it possible to use DirectPlay/MediaPlayer to play a movie in fullscreen while D3D full screen is running



Re: Game Technologies: Graphics Flash Movie in fullscreen Direct3D game

qrli

MediaPlayer will try to create an exclusive full-screen DirectDraw surface, which will fail if your D3D is working exclusively.
However, DirectDraw overlays can appear above full-screen D3D surface. MediaPlayer tries to use an overlay in windowed mode, but I doubt it will do that in full-screen mode.




Re: Game Technologies: Graphics Flash Movie in fullscreen Direct3D game

Nicky Chung

Thank you very much for your reply. I am now using DirectAudieoVideo for displaying my animation. I have to stop "beginscene - endscene" loop before showing the video. But, it works perfectly if i only want to show a movie with no logical decision.



Re: Game Technologies: Graphics Flash Movie in fullscreen Direct3D game

Bill Reiss

You may also want to look at this product which may do what you need:

http://www.f-in-box.com

It includes the ability to render a flash movie to a DirectX texture, I've used it for other things and not this specific functionality but you can download a demo version and try it out.