Copy link to clipboard
Copied
hi all
very basic question:
if I load a swf using a loader, and that loaded swf covers my original load button, can I create a new button in the loaded swf that will be able to unload it? in other words, can a swf unload itself?
thanks!
Copy link to clipboard
Copied
sure, add the button and have it:
myLoadedSwf.parent.removeChild(myLoadedSwf);
HTH
-Ted
Copy link to clipboard
Copied
thanks for the quick help
cheers
Copy link to clipboard
Copied
looks like I need a bit more info...when I follow zeroskillz tip:
myLoader.parent.removeChild(myLoader);
I get an "access of undefined property 'myLoader'" when I publish the (child) swf
and that swf doesn't work then, once loaded....
any ideas?
thanks again
Copy link to clipboard
Copied
....well, here's how I just got it to work--but it's not elegant:
this.parent.parent.removeChildAt(this.parent.parent.numChildren-1);
that's ugly! and I imagine, not very flexible... any suggestions?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now