panel
02-26-2008, 03:12 PM
Hi
I have issue with loading images
This works
var loader:Loader = new Loader();
loader.load(new URLRequest("http://l.yimg.com/www.flickr.com/images/tour/hp_1.jpg"));
loader.contentLoaderInfo.addEventListener(Event.IN IT, onInit);
function onInit(evt:Event):void
{
addChild(loader)
}
Here is sample
http://oceanic.wsisiz.edu.pl/~hamela/Igor/NoBitmap.html
This Do Not Work
If I try to make any changes to image like this
var loader:Loader = new Loader();
loader.load(new URLRequest("http://l.yimg.com/www.flickr.com/images/tour/hp_1.jpg"));
loader.contentLoaderInfo.addEventListener(Event.IN IT, onInit);
function onInit(evt:Event):void
{
var bitmap:Bitmap = (evt.target.content);
if (bitmap != null)
{
bitmap.smoothing = true;
}
addChild(bitmap);
}
error appears in debug version of FlashPlayer and image never appears ;/
SecurityError: Error #2122: Security sandbox violation: LoaderInfo.content: http://oceanic.wsisiz.edu.pl/~hamela/Igor/Bitmap.swf cannot access http://l.yimg.com/www.flickr.com/images/tour/hp_1.jpg. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded.
at flash.display::LoaderInfo/get content()
at Bitmap_fla::MainTimeline/onInit()
Here is sample
http://oceanic.wsisiz.edu.pl/~hamela/Igor/Bitmap.html
:confused:
I have issue with loading images
This works
var loader:Loader = new Loader();
loader.load(new URLRequest("http://l.yimg.com/www.flickr.com/images/tour/hp_1.jpg"));
loader.contentLoaderInfo.addEventListener(Event.IN IT, onInit);
function onInit(evt:Event):void
{
addChild(loader)
}
Here is sample
http://oceanic.wsisiz.edu.pl/~hamela/Igor/NoBitmap.html
This Do Not Work
If I try to make any changes to image like this
var loader:Loader = new Loader();
loader.load(new URLRequest("http://l.yimg.com/www.flickr.com/images/tour/hp_1.jpg"));
loader.contentLoaderInfo.addEventListener(Event.IN IT, onInit);
function onInit(evt:Event):void
{
var bitmap:Bitmap = (evt.target.content);
if (bitmap != null)
{
bitmap.smoothing = true;
}
addChild(bitmap);
}
error appears in debug version of FlashPlayer and image never appears ;/
SecurityError: Error #2122: Security sandbox violation: LoaderInfo.content: http://oceanic.wsisiz.edu.pl/~hamela/Igor/Bitmap.swf cannot access http://l.yimg.com/www.flickr.com/images/tour/hp_1.jpg. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded.
at flash.display::LoaderInfo/get content()
at Bitmap_fla::MainTimeline/onInit()
Here is sample
http://oceanic.wsisiz.edu.pl/~hamela/Igor/Bitmap.html
:confused: