Gotcha. When you declare var lastChange:String = "bild2child"; you are creating a new variable. Flash thinks you have 2 variables that are the same. instead just lastChange = "bild2child"; would work. lastChange is already defined as a string variable.

The second error wouldn't happen with the contains code. What is happening is that the loader isn't done loading when your code executes. So the loader isn't done and the bild1Loader isn't a child. You can use an event listener to figure out when something is fully loaded: bild1Loader.addEventListener(COMPLETE, completedFunction);