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: General Flash Movie in C# Direct3D game

menand

I also have a problem exactly like this. Were you able to solve this problem can you share it with me




Re: Game Technologies: General Flash Movie in C# Direct3D game

Nicky Chung

I am now using a "fake" full screen by setting window border to none. The result is exactly the same as a real full screen mode but the problem of displaying SWF disappear.

Also, since my purpose of using SWF is showing animation, I can use DirectAudioVideo full screen ability to display an AVI(exported by flash) instead. This solution requires you to stop "beginscene" and "endscene". I hope these information can help you to solve your problem.





Re: Game Technologies: General Flash Movie in C# Direct3D game

menand

I'm assuming that you referenced shockwave flash object and another question that I have is whether you used it in a Windows Control Library or Windows Application




Re: Game Technologies: General Flash Movie in C# Direct3D game

Nicky Chung

AxShockWaveFlash and I used it in a Windows Control Library



Re: Game Technologies: General Flash Movie in C# Direct3D game

menand

Thanks, the reason that I'm telling this is that I have a third party software that renders animation to directx easily (in c++) but it does not support flash and I need to add flash to my game. I'm still new to c# and I did not know that you can launch a control. I thought that I can only attach controls to windows application. Thanks a lot.




Re: Game Technologies: General Flash Movie in C# Direct3D game

The ZMan

In full screen mode DirectX owns the screen and windows (which is what your activeX control is) cannot draw to the screen.

If everything works well in a window then your best bet is to fake full screen mode by drawing a borderless windows, full screen and making it always on top. It will lok the same as full screen but you can still have windows controls.






Re: Game Technologies: General Flash Movie in C# Direct3D game

SDH2007

Exactly how do we remove the borders, etc. I can't seem to find that in documentation for the Game Window class.




Re: Game Technologies: General Flash Movie in C# Direct3D game

The ZMan

Game Window class Are you using XNA or Managed DirectX Where is the Game Window class coming from




Re: Game Technologies: General Flash Movie in C# Direct3D game

Nicky Chung

this.FormBorderStyle = FormBorderStyle.None;

"this" refers to your Form





Re: Game Technologies: General Flash Movie in C# Direct3D game

SDH2007

I'm using XNA. My class is derived from the Game Class, and the Game class has a reference to a Game Window class. As far as I can tell, there is no way to tell the Game Window to not render a border.