# Controlling the loader component with action script

**URL:** <https://forum.kirupa.com/t/controlling-the-loader-component-with-action-script/43030>\
**Category:** flash\
**Created:** [February 18, 2004, 2:22am UTC](https://forum.kirupa.com/t/controlling-the-loader-component-with-action-script/43030 "2004-02-18T02:22:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![3d\_Nirvana](https://avatars.discourse-cdn.com/v4/letter/3/a88e4f/32.png) [@3d\_Nirvana](https://forum.kirupa.com/u/3d_Nirvana)\
**Post date:** [February 18, 2004, 2:22am UTC](https://forum.kirupa.com/t/controlling-the-loader-component-with-action-script/43030/1 "2004-02-18T02:22:55Z")

</div>

I am having troubles on doing some action script in Flash Mx 2004.

I am building a website; on the first frame it has the preloader component and a loader. The movie that the content path is set to, currently loads fine for the homepage. when I click on a button, I want it to change the contentPath of the loader, and then redo the preloader (so it loads the new movie).  
I also want it to unload the existing movie.

What action script would I use to accomplish this, mine is not working.

Thanx in advance,  
3dnirvana

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 20, 2004, 7:03am UTC](https://forum.kirupa.com/t/controlling-the-loader-component-with-action-script/43030/2 "2004-02-20T07:03:04Z")

</div>

Great! This is just what I needed! Thank you very much!
