开发者

ASP.Net and Flash animation: How to set the path?

开发者 https://www.devze.com 2022-12-10 02:31 出处:网络
I want to have a flash animation on my site. When I insert a \"http:...\" ad开发者_如何学编程ress in the field \"Data\" and \"Value\" in the code, its completly okay

I want to have a flash animation on my site.

When I insert a "http:..." ad开发者_如何学编程ress in the field "Data" and "Value" in the code, its completly okay But when I insert a "~/PATHHERE/FILEHERE.swf" in this fields, it don't function.

Code:

        <object data="~/Images/Flash/banner.swf" type="application/x-shockwave-flash" width="936"
            height="142">
            <param name="movie" value="~/Images/Flash/banner.swf" />
        </object>


<object data='<%= ResolveUrl("~/Images/Flash/banner.swf") %>' type="application/x-shockwave-flash" width="936" height="142">
    <param name="movie" value='<%= ResolveUrl("~/Images/Flash/banner.swf") %>' />
</object>


I presume you want the ~ to refer to the application root. The problem is that the <object> tag doesn't know anything about the ~ trick; it is for asp.net server controls only. Try removing it - the '/' should refer to your app root (unless your are running in a virtual site on a dev computer). Or use a full url. Or a relative path (../images/whatever).

0

精彩评论

暂无评论...
验证码 换一张
取 消