Copy link to clipboard
Copied
how do i stop the swf file from appearing on other pages .. heres a pic of the code.
Copy link to clipboard
Copied
remove your loader from the display list:
myLoader.parent.removeChild(myLoader);
(and, if it's not longer needed, null it: myLoader=null; )
Copy link to clipboard
Copied
do i write this directly after the code or do i write it on all other pages of the site?
Copy link to clipboard
Copied
tried it and i got this error
Copy link to clipboard
Copied
you put that code where/when you want to remove the loaded swf. it makes no sense to add it where you did because myLoader hasn't even been added to the display list yet.
that flash error is telling you that myLoader.parent is null because myLoader has not been added to any display object.
Copy link to clipboard
Copied
what display object do i add it to?
Copy link to clipboard
Copied
you're already adding it to the timeline that contains your code in your onComplete function:
addChild(myLoader); // <- this adds myLoader to your timeline.
Copy link to clipboard
Copied
wait it worked!! its just giving me error messages though..is that because the maintimeline doesnt understand the
myLoader.parent.removeChild(myLoader);
initailly because i havent loaded it yet?
Copy link to clipboard
Copied
nothing will work after trying to remove myLoader before it's been added.
Copy link to clipboard
Copied
now im getting these error meesages
Copy link to clipboard
Copied
remove line 28.
Copy link to clipboard
Copied
got the same messages
Copy link to clipboard
Copied
delete line 32 and change line 32 to call removesSWF instead of removeSWF