2009-03-27 4 views

답변

3
// Create the interop host control. 
var host = new WindowsFormsHost(); 

// Create the ActiveX control. 
var axShockwaveFlash = new AxShockwaveFlash(); 

// Assign the ActiveX control as the host control's child. 
host.Child = axShockwaveFlash; 

// Add the interop host control to the Grid 
// control's collection of child controls. 
this.MainGrid.Children.Add(host); 

axShockwaveFlash.Location = new System.Drawing.Point(0, 0); 
axShockwaveFlash.LoadMovie(0, @"C:\player.swf"); 
axShockwaveFlash.SetVariable("quality", "Low"); 
axShockwaveFlash.ScaleMode = 0; 
axShockwaveFlash.AllowScriptAccess = "always"; 

//axShockwaveFlash.FlashVars = @"file=C:\barsandtone.flv" + 
//&autostart=true&fullscreen=true&controlbar=none&repeat=" + 
//"always&stretching=fill"; 

axShockwaveFlash.CallFunction("<invoke name=\"loadFLV\" " + 
    "returntype=\"xml\"><arguments><string>barsandtone.flv</string>" + 
    "</arguments></invoke>"); 

axShockwaveFlash.Play(); 

참조 :

관련 문제