ÔÚWPF¹¤³ÌÖвåÈëFlash¶ÔÏó
ÈçºÎÔÚ WPF ÖÐǶÈë Flash (ActiveX)
±³¾°
×î½üÒ»¸ö Partner Ï£Íû½«ÒÔÇ°µÄ Flash ǶÈëµ½Ò»¸öÈ«Ð嵀 WPF Ó¦ÓÃÖУ¬½« WPF ÔÚ .NET 3.0 Ï·ḻµÄÓû§ÌåÑéºÍ Flash ¶¯»Ïà½áºÏ£¬¸üºÃµØ·þÎñÓÚÆäÓû§¡£
ǶÈë Flash Ï൱ÓÚǶÈëÒ»¸ö ActiveX ¿Ø¼þ£¬ÔÚǶÈë¹ý³ÌÖÐÒ²ÓÐһЩ±È½Ï Tricky µÄµØ·½ÐèҪעÒ⣬ÏÂÃæ¾ÍÔÚ WPF Application ÖÐǶÈë Flash ¿Ø¼þµÄ²½Öè½øÐмòҪ˵Ã÷£¬²¢½«Óöµ½µÄһЩÐèҪעÒâµÄÎÊÌâ½øÐÐÌáʾ¡£
¿ª·¢»·¾³
Visual Studio 2008 Beta1 (Code name: Orcas), Windows Vista, Flash Player 9,
·½·¨
1. ½¨Á¢ WPF Application¡£
Ê×ÏÈ£¬½¨Á¢Ò»¸öÃûΪ FlashinWPF µÄ WPF Application
2. ÉèÖÃ Window ÊôÐÔ¡£
ÔÚ XAML ÖÐÐÞ¸Ä Window µÄÊôÐÔ£¬¼ÓÈë Loaded ʼþ£¬ÉèÖÃĬÈÏ Grid µÄ x:Name ±êʾΪ "FlashGrid" ¸ü¸Äºó´úÂëÈçÏ£º
<Window x:Class="FlashinWPF.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Flash in WPF" Loaded="WindowLoaded" Height="500" Width="600">
<Grid x:Name="FlashGrid">
</Grid>
</Window>
3. ½¨Á¢ Windows Forms Control Library
WPF Application ×÷Ϊһ¸öÕ¹ÏÖ²ãµÄÏîÄ¿£¬²»ÄÜ×ÔÉí²åÈë COM Component£¬ËùÒÔÐèÒª½èÖú Windows Form ÒýÈë ActiveX ¿Ø¼þ¡£
4. ²åÈë Shockwave Flash Object
ÔÚ Toolbox Öеã»÷ÓÒ¼ü£¬Ñ¡Ôñ"Choose Items..." Ìí¼Ó COM Components
Tricky Point: ÔÚ COM ComponentÖл¹ÓÐÒ»¸ö Macromedia Flash Factory Object ͬÑùÁ´½Óµ½C:\Windows\System32\Macromed\Flash\Flash9c.ocx ÖУ¬µ«ÔÚÕâÀﲻҪѡÔñÕâ¸ö Component, ·ñÔò»á³öÏÖ“Failed to import the ActiveX control” ¿ÉÒÔÀûÓà regsvr32.exe Flash9c.ocx ÔÚÃüÁîÐÐÖÐ×¢²á Flash9c.ocx ¿Ø¼þ¡£»á³öÏÖÈçÏÂ×¢²á³É¹¦Ìáʾ£º
5. ´´½¨ Flash Object
Ìí¼ÓÒ»¸ö Shockwave Flash Object ºó»á×Ô¶¯ÔÚ Flash Control µÄÏîÄ¿ÖÐÔö¼ÓÒ»¸öÃûΪAxShockwaveFlashObjects µÄ¶ÔÏó¡£
ÔÚ UserControl1.Designer.cs ÖлáĬÈÏÌí¼Ó axShockwaveFlash1 ¶ÔÏó¡£
private AxShockwaveFlashObjects.AxShockwaveFlash axShockwaveFlash1;
6. ±àÒë Flash Control
7. ÔÚ FlashinWPF ÖÐÔö¼Ó Reference
Ïà¹ØÎĵµ£º
µÚÒ»²½
1¡¢Ð½¨flashÎĵµ
2¡¢Îļþ--µ¼Èë--µ¼Èëµ½¿â£¬µ¼Èë5ÕÅͼƬ
3¡¢ÔÚͼ²ãÒ»µÚ1Ö¡£¬´Ó¿âÀïÀÈëÒ»ÕÅͼƬµ½Îę̀£¬µ÷Õûµ½Êʵ±´óС£¬ÓÒ¼üת»»ÎªÔª¼þ---Ôª¼þÀàÐÍѡӰƬ¼ô¼£¬Ãû³ÆΪpic1£»
ÔÚͼ²ãÒ»µÚ30Ö¡²åÈë¿Õ°×¹Ø¼üÖ¡£¬´Ó¿âÀïÀÈëµÚ¶þÕÅͼƬµ½Îę̀£¬µ÷Õûµ½Êʵ±´óС£¬ÓÒ¼üת»»ÎªÔª¼þ---Ôª¼þÀàÐÍѡӰƬ¼ô¼£¬Ãû³ÆΪpic2£»
......
ͨ³££¬Ê¹ÓÃFlashÀ´µ÷ÓÃ.NET×é¼þÐèÓÃÔ¶³Ìµ÷Óã¬Êµ¼ÊÉÏÎÒÃÇÒ²¿ÉÒÔͨ¹ýSOCKETÖ±½ÓͨÐÅ¡£
¾ßÌå²ÉÓÃFlashµÄAMF3»òAFM0¸ñʽ£¬²ÉÓÃÁ÷ÐеÄFluorineFx·þÎñÆ÷×é¼þ£¬¾ßÌå´úÂëÈçÏ£º
ÒÀÕÕ´ËÓ÷¨¿ÉÒÔ¿ª·¢ÍøÒ³ÓÎÏ·»òÆäËüFlashÓ¦ÓõÄ.NET SOCKET·þÎñÆ÷¡£
using System;
using System.Collections.Generic;
using System.Collections.S ......
ÔÚnios2ƽ̨Ï£¬ÔÚNiosII Command shellʹÓÃnios2-flash-programmerÃüÁîÉÕдflashʱÈÝÒ׳öÏÖ“no cfi table found”µÄ´íÎ󣬿ÉÄÜÒÔϼ¸ÖÖÔÒòÔì³ÉµÄ£º
1.µØÖ·¸ã´í£¬Ö¸¶¨µÄµØÖ·²»ÊÇflashµÄÆðʼµØÖ·£»
2.²ÎÊýÉèÖôíÎó£¬ÔÚSOPC BuilderÖмì²éCFI FlashµÄÉèÖòÎÊý£¬ÈçtimingÑ¡ÏÈÝÒשµôÉèÖá£
3.Éè¼ÆÓÐÎÊÌ⣬Fl ......
ת×Ô http://www.enet.com.cn/eschool/video/flashcs4lts/
µÚÒ»ÕÂ FlashCS4»ù´¡
01 FlashCS4¼ò½é
02 Ñ¡Ôñ¹¤¾ß¡¢²¿·ÖÑ¡Ôñ¹¤¾ß
03 ±äÐι¤¾ß
04 Ì×Ë÷¹¤¾ß
05 ¸Ö±Ê¹¤¾ß
06 ÏßÌõ¹¤¾ß
07 ͼÐι¤¾ß
08 ͼÐι¤¾ß(2)
09 Ǧ±Ê¹¤¾ß
10 ÏñƤ¹¤¾ß
11 ²Á³ýËùÑ¡Ìî³äÉ«
12 ¶¯»ÔÀí
13 ¹Ø¼üÖ¡¡¢ÆÕͨ֡ºÍ¿Õ°×¹ ......
°²×°ÍêFlash²¥·ÅÆ÷¿Ø¼þºó£¬ÎÒÃÇÒ²ÖªµÀÁË£¬¿Ø¼þ°²×°µÄλÖ㬱¾ÀýΪC:\Windows\System32\Macromed\Flash¡£
µ«ÊÇÔÚVS2005¿ª·¢¹ý³ÌÖУ¬ÈçºÎ½«Æä±äΪÏñButton¿Ø¼þÒ»Ñù£¬¿ÉÒÔËæʱÍϷŵ½´°ÌåÉè¼ÆÆ÷ÖÐÄØ£¿Çë¿´ÏÂÃæµÄ²Ù×÷¡£
1.ÒªÌí¼ÓÉè¼Æ¹ý³ÌÖеÄÊÓͼ£¬ÒªÏÈ´òµ½´°ÌåÉè¼ÆÊÓͼ¡£
½øÈëVS2005£¬´ò¿ªÎÒÃÇ֮ǰ½¨µÄSeekdream½â ......