-
file reference download problem
this is the code from the adobe help document:
Code:
The following code downloads a file named index.xml from the same directory as the SWF document:
var request:URLRequest = new URLRequest("index.xml");
var fileRef:FileReference = new FileReference();
fileRef.download(request);
http://www.adobe.com/livedocs/flash/...=00000320.html
But it says it the help as well that:
This method supports downloading of any file type, with either HTTP or HTTPS.
And if i try the above example I get an error:
Error #2039: Invalid remote URL protocol. The remote URL protocol must be HTTP or HTTPS.
-
What url did you pass to new URLRequest?
-
i think he's probably using the example as show... "index.html", and is probably testing locally, so the protocol might be coming back as file:// instead of http://
try using an absolute url: http://board.flashkit.com/board/showthread.php?t=809421
alternatively, keep the url relative ("index.html") and upload the swf
-
yeah, i am trying to use relative urls but just testing locally.
fileRef.download("image.jpg");
so it will work with relative urls when online?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|