Nicky Chung

In 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: DirectX 101 Flash Movie in Full Screen Direct3D

Alexey Barkovoy

This sould like a AxShockWaveFlash problem. When going to fullscreen exclusive mode Direct3D applications causes other D3D / DirectDraw clients to lost their device and seems AxShockWaveFlash is not able to restore it back.

Try to not only set Visible to false, but also stop flash playback before (3). Maybe you have to go to extreem by reloading flash file/animation after (4).





Re: Game Technologies: DirectX 101 Flash Movie in Full Screen Direct3D

Nicky Chung

Thank you very much for your reply. I have tried to stop flash playback and unload/reload flash animation after (4). The results are the same. By searching MSDN forum, I have found that D3D fullscreen will fully control the display device. I am afraid there exist no solution if i insist to use D3D fullscreen.



Re: Game Technologies: DirectX 101 Flash Movie in Full Screen Direct3D

JeremyAtGosub

You might try simulating full screen mode. By that, I mean use windowed mode with a window which has no borders, no text, no minimize/maximize/control boxes, and is maximized over the whole screen. I have done this, it works pretty well and allows you to display dialogs on top of the Direct3D window.

-Jeremy




Re: Game Technologies: DirectX 101 Flash Movie in Full Screen Direct3D

Nicky Chung

Yes, I think this is the only method for me to embed swf in d3d environment. But, do you have any performance issues raised using this "simulated" full screen mode It seems that my d3d application run faster in real full screen mode.