Hi I am creating a website in flash and I'm encountering an annoying problem and major setback in the development of my project. My website's swf files will display images on my local machine. They will also load images that are coming from the website itself (ex: local directory). But it won't display 3rd party images loaded from other sites like Yahoo!, Google, ect., while published and FTPed. Flash will display the images from Google, and other sites on my local maching though.
I have a custom 'ProfileIcon' class(extends MovieClip) that loadeds a users profile icon. The problem seems to be in the 'handleDisplay' function inside the 'load' method.
private var _source:String; // (read only --> GETTER)
public function ProfileIcon(imageSource:String) {
_source = imageSource;
addEventListener("added", onAdded);
}
private function onAdded(e:Event):void {
removeEventListener("added", onAdded);
load(source);
}
public function load(src:String):void {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener("complete", handleImage);
function handleImage(e:Event):void { //Nested within load method
loader.removeEventListener("complete", handleImage);
var image:MovieClip = new MovieClip();
var bitmap:Bitmap = (e.target.content);
bitmap.width = 60;
bitmap.height = 60;
bitmap.smoothing = true;
image.addChild(bitmap);
image.filters = [new DropShadowFilter('' Some drop shadow filter contructor parameters '')
addChild(image);
dispatchEvent(new Event(Event.COMPLETE));
}
}
**Also everything works fine if I just "addChild(loader)" and cut 'image' and 'bitmap' but I can't apply 'smoothing' to the loaded image and I want to. Please help me with this annoying code.**
I have a custom 'ProfileIcon' class(extends MovieClip) that loadeds a users profile icon. The problem seems to be in the 'handleDisplay' function inside the 'load' method.
private var _source:String; // (read only --> GETTER)
public function ProfileIcon(imageSource:String) {
_source = imageSource;
addEventListener("added", onAdded);
}
private function onAdded(e:Event):void {
removeEventListener("added", onAdded);
load(source);
}
public function load(src:String):void {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener("complete", handleImage);
function handleImage(e:Event):void { //Nested within load method
loader.removeEventListener("complete", handleImage);
var image:MovieClip = new MovieClip();
var bitmap:Bitmap = (e.target.content);
bitmap.width = 60;
bitmap.height = 60;
bitmap.smoothing = true;
image.addChild(bitmap);
image.filters = [new DropShadowFilter('' Some drop shadow filter contructor parameters '')
addChild(image);
dispatchEvent(new Event(Event.COMPLETE));
}
}
**Also everything works fine if I just "addChild(loader)" and cut 'image' and 'bitmap' but I can't apply 'smoothing' to the loaded image and I want to. Please help me with this annoying code.**