C # play a flash file

Source: Internet
Author: User

I remember that when I first learned Delphi, the first program was a small software that played flash.

Today, I implemented this applet in C.

The principle of playing a Flash animation is to reference the DLL of flash and use it for playback.

Add this control to the toolbox:

1. Right-click the toolbox and select "choose items..." from the shortcut menu. In the displayed window, select the "COM components" tab,

Select Shockwave Flash Object, check it, and click "OK.

2. Drag a flash control from toolbox to form.

3. Add code.

 

Private void form1_load (Object sender, eventargs E)
...{
Axshockwaveflash1.movie = application. startuppath + "// music.swf ";
Axshockwaveflash1.play ();
}

Note: The complete path must be passed to the movie attribute of the flash control.

In addition, there is a property that I did not test.

Embedmovie: whether to embed data into program resources.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.