Please HELP Me With This! Error 1046!
I cannot figure out what my problem is. When I check for errors its is not telling me any. But when I run it, it is saying: 1046: This was not found or was not a compile-time constant: home2.
import flash.events.MouseEvent;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.Event;
var loadvar:Loader = new Loader();
var home1 = loadvar;
home1.load(new URLRequest("img/home1.jpg"));
home1.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
var home2 = loadvar;
home2.load(new URLRequest("img/home2.jpg"));
home2.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
function onComplete(e:Event):void
{
var img:Bitmap = Bitmap(e.target.content);
img.width = 100;
img.height = 100;
};
thumb1.addChild(home1);
thumb2.addChild(home2);
But it is working when I take our everything that has to do with home2.
