I have a page called FlashFrame.aspx where I have the html wrapper on the flash JS code.
The flash file will load fine when I place it in the same folder that this page FlashFrame.aspx is on but the files are in sub-directories in a different folder called App_data.
Normally with relative paths we use something like "../folder/subfolder/file.swf" for hyperlinks or whatever.
If I put the files as sub-folders in the path where my FlashFrame.aspx page is it works too.
Its the little dot dots ".." that don't seem to be consumed right.
I tried putting a copy of my aspx file in the App_Data folder and redirecting to it but got a for 'Forbidden' error - guess theres a reason for that - the other thing is to put all the swf files in/under the path where the folder of the FlashFrame.aspx is but I know thats not the real answer. I have used UrlEncode but I that doesn't seem to help.
Im having trouble supplying the URL parameter to the '<param name="movie" value="'+url+'" from var url= blah for reasons I explain below:
I have as aspx page where I declare a public variable
Public FF_SWF_URL As String
And later I use it to construct the path where the file lives the file info is obtained from session variables from a data tables on click event
Dim FF_SWF_Case As String = Me.Page.Session("SWF_Case").ToString
Dim FF_SWF_Firm As String = Me.Page.Session("SWF_Firm").ToString
Dim FF_SWF_DocFileName As String = Me.Page.Session("SWF_DocFileName").ToString()
dataFilePath = Me.Page.Server.MapPath("..\App_Data\loadedfiles\") + FF_SWF_Case + "\" + FF_SWF_Firm + "\"
If the file exists I tried using the URL encode after having an issue
Dim fileExists As Boolean = System.IO.File.Exists(dataFilePath + FF_SWF_DocFileName)
If fileExists Then
FF_SWF_URL = dataFilePath + FF_SWF_DocFileName
FF_SWF_URL = Me.Server.UrlEncode(dataFilePath + FF_SWF_DocFileName)
Utils.MiscUtils.RegisterJScriptAlert(Me, "FILE_NOT_FOUND", "File cannot be found to download")
Using an alert I can prove the text gets to the .aspx page but without any encoding all the \ slash characters drop out!
var url= '<%=FF_SWF_URL%>'
alert("ASPX says : " + '<%=FF_SWF_URL%>')