How to run a flash file(.swf) on an ASP.NET page?

Asked

Viewed 243 times

1

I have an ASP.NET Webforms application and want to know how to run a flash file(.swf), on a div of an ASP.NET page.

2 answers

0

  • Luis, welcome to Stackoverflow! Thank you for wanting to help! However, your answer boils down to a set of links that are currently valid but there is no guarantee that they will continue to be valid in the future. Stackoverflow should be viewed as a repository of knowledge and not just a website question and answer. In answering we must think not only of those who asked, but also of those who in the future will be able to benefit from our answer.

0


It worked as follows:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
        id="painelv3" width="100%" height="100%"
        codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
        <param name="movie" value="meuArquivoFlash.swf" />
        <param name="quality" value="high" />
        <param name="bgcolor" value="#ffffff" />
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="FlashVars" value="<% =flashvar %>" />
        <embed src="<% =sUrl %>" quality="high" bgcolor="#ffffff"
            width="800" height="800" name="meuArquivoFlash" align="middle"
            play="true"
            loop="false"
            quality="high"
            allowScriptAccess="sameDomain"
            type="application/x-shockwave-flash"
            pluginspage="http://www.adobe.com/go/getflashplayer">
        </embed>
    </object>

In the code-Behind of the aspx page I declared the flashvar variables (parameters passed to the swf file) and Surl (file path).

    public string sUrl = "";
    public string flashvar = "";

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            sUrl = "meuArquivoFlash.swf";
            flashvar = "cdUsuario=1&cdDestino=2";
        }
    }

Browser other questions tagged

You are not signed in. Login or sign up in order to post.