next up previous contents
Next: Opening pdf files Up: Tutorials Previous: Reusing the web browser   Contents

Playing avi, rm, mov, wmv, etc movies

By embedding the popular movie players in the main window, SWFKit can play almost all popular movie types. Just like reusing the web browser, embedding a movie player requires that you first use the "createControl" method to create the movie player, then call the methods and properties of the movie player to play movies. All methods, properties, and events of the ActiveX controls can be accessed in FFish script.

To embed the Windows Media Player 9+

var ax = createControl("WMPlayer.OCX", 0, 0, 200, 200);
ax.activex.url = "c:\\my.wmv";
ax.activex.controls.play();

To embed the Windows Media Player 6.4

var ax = createControl("MediaPlayer.MediaPlayer", 0, 0, 200, 200);
ax.activex.open("c:\\my.wmv");
ax.activex.play();

The reference of the Windows media player can be found at here

To embed the Real Player

var ax = createControl("rmocx.RealPlayer G2 Control", 0, 0, 200, 200);
ax.activex.src = "c:\\my.rm";
ax.activex.DoPlay();

The reference of the Real Player can be found at here

To embed the QuickTime Player

var ax = createControl("QuickTime.QuickTime", 0, 0, 200, 200);
ax.activex.setUrl("c:\\my.mov");
ax.activex.play();

The reference of the QuickTime can be found at here

If you want to use these ActiveX controls directly in action script in Flash 8, you would have to wrap them in action script classes.


next up previous contents
Next: Opening pdf files Up: Tutorials Previous: Reusing the web browser   Contents
Copyright ©2000-2010 Shanghai TopCMM Software Technologies. All Rights Reserved.