使用C#及Visual Studio2003 制作Flash
一个叫NeoSwiff的编译器目前可将C#语言编译成swf文件,并可使用Flash播放器播放。
有独立版本和作为Visual Studio组件的版本可供选择。
http://www.globfx.com/products/neoswiff
代码样例:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace FlashApplication1
{
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1 = null;
private System.Windows.Forms.Button button2 = null;
// private System.Windows.Forms.PictureBox pictureBox1;
public Form1()
{
InitializeComponent();
//
// TODO: Add constructor logic here
//
}
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(50, 50);
this.button1.Text = "button1";
//
//b2
//
this.button2.Location = new System.Drawing.Point(70, 70);
//this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(168, 40);
this.button2.TabIndex = 0;
this.button2.Text = "button2";
//
// Form1
//
this.Controls.Add(this.button1);
this.Controls.Add(this.button2);
// this.Controls.Add(this.richTextBox1);
this.Text = "Form1";
this.ResumeLayout(false);
}
static void Main()
{
//
// TODO: Add application logic here
//
Application.Run( new Form1() );
}
}
}
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace FlashApplication1
{
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1 = null;
private System.Windows.Forms.Button button2 = null;
// private System.Windows.Forms.PictureBox pictureBox1;
public Form1()
{
InitializeComponent();
//
// TODO: Add constructor logic here
//
}
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(50, 50);
this.button1.Text = "button1";
//
//b2
//
this.button2.Location = new System.Drawing.Point(70, 70);
//this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(168, 40);
this.button2.TabIndex = 0;
this.button2.Text = "button2";
//
// Form1
//
this.Controls.Add(this.button1);
this.Controls.Add(this.button2);
// this.Controls.Add(this.richTextBox1);
this.Text = "Form1";
this.ResumeLayout(false);
}
static void Main()
{
//
// TODO: Add application logic here
//
Application.Run( new Form1() );
}
}
}