C#ÓëFlash½»»¥
µÚÒ»²½C#Ìí¼Ó×é¼þ
´ò¿ªVS2005-¹¤¾ß-Ñ¡Ôñ¹¤¾ßÏäÏî-COM×é¼þ-Ñ¡ÔñShockwave Flash Object-È·¶¨
Ìí¼ÓºÃ×é¼þÍù³¡¾°ÉÏÍÏ·Å£¬Èç¹ûÌáʾע²áÐèÇó×¢²á
c# ×¢²á¿Ø¼þ-ÔÚÔËÐÐÊäÈë-»Ø³µ£¨flash9f.ocxÕâ¸öÎļþÒÔϵͳÖÐʵ¼ÊÎļþΪ׼¡££©
regsvr32 c:\windows\system32\macromed\flash\flash9f.ocx
»òÕßregsvr32 c:\windows\system32\macromed\flash\flash10a.ocx
µÚ¶þ²½½«Flash×é¼þÍÏÈ볡¾°
½«Flash×é¼þÍÏÈ볡¾°£¬ÉèÖüÓÔصÄswf·¾¶¡£ÉèÖÃ×é¼þid¡£
×é¼þµÄMovieÊôÐÔ£ºÖ¸¶¨Òª²¥·ÅµÄswfµÄ·¾¶£¬
Èç¹ûswfÔÚ±¾µØÓ²ÅÌ£¬ÔòÐèҪд³É ´ÓÅÌ·û¿ªÊ¼µÄ¾ø¶Ô·¾¶
Èç¹ûswfÔÚijÍøÕ¾ÉÏ£¬ÔòÐèҪд³É ÍêÈ«µÄurlÍøÖ·
¸ü¶à¸Ã×é¼þÊôÐÔ/·½·¨
µÚÈý²½AS´úÂëƬ¶Î
¸Õ¿ªÊ¼ÓÃFSCommandÓëÍøÒ³VBSCRIPT×öÁËÒ»¸öͨѶ£¬ÒÔΪÕâÑù¾ÍÄÜÓëC#ͨѶÁË£¬½á¹û´íÎóÁË¡£
»¹µÃÓÃExternalInterface.addCallback£¬ExternalInterface.callµÄ·½·¨À´ÓëC#ͨѶ¡£
³ÌÐò´úÂë
import flash.external.*;
//ÏòC#·¢ËÍÊý¾Ý
ExternalInterface.call ("test", "str", Math.random ());
//½ÓÊÜC#·¢À´µÄÊý¾Ý
ExternalInterface.addCallback ("c2flash", null, c2flash);
function c2flash (s:String)
{
out_txt.text = s;
}
µÚËIJ½C#´úÂëƬ¶Î
³ÌÐò´úÂë
private void Form1_Load(object sender, EventArgs e)
{
flash.Movie = "E:/c2flash.swf";
flash.FlashCall += new AxShockwaveFlashObjects._IShockwaveFlashEvents_FlashCallEventHandler(flash_FlashCall);
}
void flash_FlashCall(object sender, AxShockwaveFlashObjects._IShockwaveFlashEvents_FlashCallEvent e)
{
string s = nodeXml(e.request.ToString())[0].ChildNodes[0].InnerText.ToString();
//½ÓÊÜFlash´«À´µÄÖµ
this.textBox1.Text = s;
throw new Exception("The method or operation is not implemented.");
}
private void button1_Click(object sender, EventArgs e)
{
//ÏòFlash·¢ËÍÊý¾Ý
callFunction("c2flash",this.textBox1.Text);
}
private void callFunction(string funName,string ar
Ïà¹ØÎĵµ£º
C#ÓëFlash½»»¥ £¨×ª×ÔСÀÚÔÚÏߣ©
C#ÓëFlash½»»¥
Ç°¶ÎÈÕ×Ó¹«Ë¾ÒªÇó×öÒ»¸öC#ÓëFlash½»»¥µÄ¶«Î÷£¬ÓÃÀ´C#Óë¶ÌÐÅèͨѶ½«Êý¾Ý´«µ½FlashÉÏÏÔʾÓë²Ù×÷µÄÓ¦Óá£
µÚÒ»²½C#Ìí¼Ó×é¼þ
´ò¿ªVS2005-¹¤¾ß-Ñ¡Ôñ¹¤¾ßÏäÏî-COM×é¼þ-Ñ¡ÔñShockwave Flash Object-È·¶¨
Ìí¼ÓºÃ×é¼þÍù³¡¾°ÉÏÍÏ·Å£¬Èç¹ûÌáʾע²áÐèÇó×¢²á
c# ×¢²á¿Ø¼þ-ÔÚÔËÐÐÊä ......
1 Ç°ÑÔ
Èç¹ûÄãÊìϤMicrosoft Foundation Classes£¨MFC£©µÄCString£¬Windows Template
Library£¨WTL£©µÄCString»òÕßStandard Template
Library£¨STL£©µÄ×Ö·û´®À࣬ÄÇôÄã¶ÔString.Format·½·¨¿Ï¶¨ºÜÊìϤ¡£ÔÚC#ÖÐÒ²¾³£Ê¹ÓÃÕâ¸ö·½·¨À´¸ñʽ»¯×Ö·û´®£¬±ÈÈçÏÂÃæÕâÑù£º
int x = 16;
decimal y = 3.57m ......
½ñÌì²âÊÔÁËflash cs5£¬ÀÏÒ¯»úÒÀ¾É¿ÉÒÔÔËÐС£
»ù±¾µçÄÔÅäÖãº
AMD ÉÁÁú2200+
&n ......
ʹÍøÒ³ËùÓÐÔªËرä»ÒµÄ´úÂ룬°üÀ¨FLASH£¬Ö»Ö§³ÖIE£º
µÚÒ»ÖÖ·½·¨£º°ÑÏÂÃæµÄ´úÂë¼ÓÈëÍøÒ³µÄ<head> Óë</head>Ö®¼ä£º
<style type="text/css">
*{filter:Gray;}
</style>
µÚ¶þÖÖ·½·¨£º°ÑÏÂÃæµÄ´úÂë¼ÓÈëÍøÕ¾µÄCSSÎļþÖУº
*{filter:Gray;}
ÉÏÃæµÄ´úÂë¿ÉÒÔʹ³ýÁËFLASHÖ®ÍâµÄÍøÒ³ËùÓÐÔªËرä»Ò£ ......