PDA

View Full Version : Problem with loading remote image to local swf


Alvin
01-20-2006, 02:43 PM
Hi,

I have the following code to load an image file(jpg) from remote server to a local swf. But it just says "Error opening URL".

var swf:MovieClip = _root.createEmptyMovieClip("swf", _root.getNextHighestDepth());
var loader:MovieClipLoader = new MovieClipLoader();
var obj:Object = {};
obj.onLoadInit = function(target_mc:MovieClip) {
trace("onLoadinit");
};
loader.addListener(obj);
loader.loadClip("http://192.168.1.2/image/image02.jpg", swf);
trace(System.security.sandboxType);

I think it's a security issue. But the result of trace(System.security.sandboxType) is localTrusted.
According to the Flash Player 8 Security document, "SWF files assigned to the local-trusted sandbox can interact with any other SWF files, and load data from anywhere (remote or local).".
I have tried this image URL in the browser and it's OK.

Now I am confused. Do you guys have any suggestions?
Any help will be appreciated.:)

Alvin
01-20-2006, 02:49 PM
Sorry I clicked submit twice...Because the first time I submit this post, it required me to log in again...:(

Alvin
01-20-2006, 04:45 PM
It seems that my firewall blocked Flash Player to access Internet.:o :o :o Everything is OK now. I have spent whole day on this problem. Oh My God!!!
Anyway, by this foolish mistake I have read through the Macromedia Flash 8 security document. Seems not too bad, hah?:cool: