これまでに誰かがこれに遭遇したことがありますか?私は crossdomain.xml を設定しており、ローカル再生をネットワークのみに設定しようとしましたが、まだ運がありません。
私がやろうとしているのは、ユーザーに画像をアップロードしてもらい、その値を PHP を介して渡すことで、ディレクトリが作成されます。その後、パスが返され、画像をサムネイルとして読み込もうとすると、セキュリティエラーが発生します。
//frOne is my fileReference variable.
function oneSelected(e:Event)
{
trace("\nName: " + e.target.name);
trace("\nSize: " + e.target.size);
frOne.upload(uploadURL);
getImage(frOne.name);
}
function getImage(imgName:String)
{
phpVars.imagename = imgName;
phpReq.data = phpVars;
phpLoader.addEventListener(Event.COMPLETE, phpImage);
phpLoader.dataFormat = URLLoaderDataFormat.TEXT;
phpLoader.load(phpReq);
phpReq2.method = URLRequestMethod.POST;
trace('send the info');
}
function phpImage(e:Event)
{
testString = phpLoader2.data;
var decoded:String = decodeURI(testString);
testString = decoded;
var imgLoader:Loader = new Loader();
imgLoader.load(new URLRequest(testString.slice(0,testString.length) + frOne.name));
addChild(imgLoader);
}
私が得ているエラー
http://url/bwljagvsbgv6enjhdghlcnl5ymniz3p6y29t/images/Winter.jpg
*** Security Sandbox Violation ***
Connection to
http://url/bwljagvsbgv6enjhdghlcnl5ymniz3p6y29t/images/Winter.jpg
halted - not permitted from file:///Z|/mydirectory/myswf.swf
SecurityError: Error #2147: Forbidden protocol in URL
http://url/bwljagvsbgv6enjhdghlcnl5ymniz3p6y29t/images/Winter.jpg.
at flash.display::Loader/flash.display:Loader::_load()
at flash.display::Loader/load()
at BCBGen_fla::MainTimeline/loadImage()
at BCBGen_fla::MainTimeline/fnImageTimer()
at flash.utils::Timer/flash.utils:Timer::_timerDispatch()
at flash.utils::Timer/flash.utils:Timer::tick()