当前位置:软件学习 > Flash >>

C#播放flas易做图即swf文件

1.工具箱上点鼠标右键,出现菜单,选择 "选择项.",在出现的窗口选择"COM组建"选项卡,
选择Shockwave Flash Object,打上勾,点"确定"按钮.
2.在工具箱中会出现shockwave Flash Object,拖到窗体上即可使用
 

01 using System;
02  using System.Collections.Generic;
03  using System.ComponentModel;
04  using System.Data;
05  using System.Drawing;
06  using System.Text;
07  using System.Windows.Forms;
08  using System.IO;
09  
10  namespace FlashDemo
11  {
12      public partial class Form1 : Form
13      {
14          public Form1()
15          {
16              InitializeComponent();
17          }
18  
19          private void Form1_Load(object sender, EventArgs e)
20          {
21              axShockwaveFlash1.Movie =Directory.GetCurrentDirectory()+ "/demo2.swf";//注意路径要使用完整路径
22          }
23  
24          private void button1_Click(object sender, EventArgs e)
25          {
26              axShockwaveFlash1.StopPlay();
27          }
28  
29          private void button2_Click(object sender, EventArgs e)
30          {
31              axShockwaveFlash1.Play();
32          }
33      }
34  }

 
作者:丛林听雨

补充:软件开发 , C# ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,