VS2005入れてVisual C#でFlash呼び出し その2
arkwさんの助言により動きましたので、ソース載せます。
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using AxShockwaveFlashObjects; namespace WindowsApplication1 { public partial class Form1 : Form { AxShockwaveFlash flash = null; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { this.flash = new AxShockwaveFlash(); ((ISupportInitialize)(this.flash)).BeginInit(); this.Controls.Add(this.flash); ((ISupportInitialize)(this.flash)).EndInit(); this.flash.SetBounds(0, 0, 500, 300); this.SetBounds(0, 0, 500, 300); this.flash.LoadMovie(0, "http://www.classmethod.jp/images/jp/top/top.swf"); this.flash.Play(); } } }
確かに、Flash Player 8.5(すなわち、Flex2でコンパイルしたswf)は動きませんでした。
β版以降で動くことを期待したいですね。
次はもうちょっとやってみます。