How to embed a flash (.swf) file into asp.net?

后端 未结 5 1509
自闭症患者
自闭症患者 2020-12-14 12:38

How to display a flash (.swf) file into asp.net ?

5条回答
  •  不思量自难忘°
    2020-12-14 13:29

    I would consider using FlashEmbed, a JavaScript tool that you can use to embed Flash objects to you website.

    It is simple to use and has many advantages:

    • it's very simple: just use flashembed("flash10", "/swf/flash10.swf") for example, if you don't need anything special you don't have to study much.
    • there a lots of demos on the site how to configure the tool
    • jQuery support: flashembed is designed for for scripters in mind with polished programming API together with a support for jQuery selectors.
    • JSON configuration: when supplying configuration for Flash objects the values can be complex JavaScript objects with arrays, strings, functions and other objects.
    • Size: the plugin weights around 5 kb when minified.

    If you like you could write an ASP.NET server control, which renders the HTML you'll need on that page:

    1. Includes external script resource link using ScriptManager.RegisterScriptResource(...) (once per page)
    2. Render the flashebmed script using ScriptManager.RegisterClientScript(...) (for ever y flash you want to embed on a page)
    3. Write some useful properties like src, name etc.

    Then, use the control in your pages this way for example:

    
    

提交回复
热议问题