If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

simple removeChild not working - 1120 error [AS3]

Hi there, this is my first post so be gentle...

I'm working on a simple presentation website in flash that imports swf-banners onto the main page. This works, but I need a backgroundcolor and a border so the banners aren't seethrough. So I create another graphic element that puts itself underneath. All this works, but when I try to write a button to remove the "child" it only removes the imported swf (loader) but it can't remove the box underneath - even if I remove the loader-child completely.

test your movie. When the application outputs the traces , are either of the values null , or do you get an alert saying something about a null object reference ?

I think your problem is you are declaring "Kant" , inside of your btnClick() function. The reason its able to remove your loader, is because you are declaring and instantiating it at the top , outside of your method , so the variable becomes available to anything in that scope. Try to declare Kant underneath loader. See if it works.