using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Ex03_2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                this.axShockwaveFlash1.Movie = this.openFileDialog1.FileName;  //浏览FLASH文件								
            }
        }


        private void button2_Click_1(object sender, EventArgs e)
        {
            if (this.openFileDialog1.FileName.Length > 0)
            {
                this.axShockwaveFlash1.Play();		//播放动画		
            }
            else
            {
                MessageBox.Show("请选择FLASH文件！", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            if (this.openFileDialog1.FileName.Length > 0)
            {
                this.axShockwaveFlash1.Stop();    //停止播放动画
            }
            else
            {
                MessageBox.Show("请选择FLASH文件！", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

        }

        private void button4_Click(object sender, EventArgs e)
        {
            if (this.openFileDialog1.FileName.Length > 0)
            {
                this.axShockwaveFlash1.Rewind();    //播放第一帧动画
            }
            else
            {
                MessageBox.Show("请选择FLASH文件！", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

        }

        private void button5_Click(object sender, EventArgs e)
        {
            if (this.openFileDialog1.FileName.Length > 0)
            {
                this.axShockwaveFlash1.Back();     //播放上一帧动画
            }
            else
            {
                MessageBox.Show("请选择FLASH文件！", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }		

        }

        private void button6_Click(object sender, EventArgs e)
        {
            if (this.openFileDialog1.FileName.Length > 0)
            {
                this.axShockwaveFlash1.Forward();		//播放下一帧动画		
            }
            else
            {
                MessageBox.Show("请选择FLASH文件！", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }				

        }
    }
}
