We help IT Professionals succeed at work.

loadSound (...) - does killing the movieClip kill the download ?

Donelson
Donelson asked
on
Medium Priority
178 Views
Last Modified: 2010-04-03
If I have a SWF loaded on the stage, and the visitor clicks somewhere else and I want that movie to go away, do I just kill the movieClip like -

   delete theMovieClip;

and will that stop the download of images and sounds and child processes which were being loaded/run by the movieClip ?

Or do I have to delete each child object separately ?

Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2008
Commented:
Yes,
deleting a movieClip also removes all child processes automatically...

But you can delete the movieClip using "delete MovieClipInstanceName>"

only if that movieClip is created at runtime using createEmptyMovieClip or attachMovieClip...


if your movieClip is not created at runtime and you still want to delete that movieClip..... you can also do this, using a tricky code....

----------
MovieClipInstanceName.loadMovie("xx"); //
----------

here I have loaded a dummy source in the movieClip, xx is actually not available physically, but it will delete the all contents of the MovieClipInstanceName.

Rgds
Aneesh

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Very good!

Yes, the movie is created (loaded) at runtime via MovieClipLoader, so just deleting is okay.

It's good to know the Hack as well. I assume that hack also stops any child processes/loads/etc ?

CERTIFIED EXPERT
Top Expert 2008

Commented:
yes, hack all stops any child processes/loads/
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.