# Is putting all your code inside a loaders onComplete handler bad practice?

**URL:** <https://forum.kirupa.com/t/is-putting-all-your-code-inside-a-loaders-oncomplete-handler-bad-practice/315544>\
**Category:** flash\
**Created:** [October 28, 2010, 1:27pm UTC](https://forum.kirupa.com/t/is-putting-all-your-code-inside-a-loaders-oncomplete-handler-bad-practice/315544 "2010-10-28T13:27:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bonassus](https://avatars.discourse-cdn.com/v4/letter/b/ea5d25/32.png) [@bonassus](https://forum.kirupa.com/u/bonassus)\
**Post date:** [October 28, 2010, 1:27pm UTC](https://forum.kirupa.com/t/is-putting-all-your-code-inside-a-loaders-oncomplete-handler-bad-practice/315544/1 "2010-10-28T13:27:29Z")

</div>

This is a general question about programing, which I am new to. I am building a website with actionscript 3.0.  
the way i have it set up is that most of my code including other functions is nested inside the loader’s on complete function. I understand that nesting functions is a bad idea. But when I take code parts out of the loaders onComplete handler the code stops working. I must have set it up wrong.  
Is putting all your code inside a loaders onComplete handler bad practice?  
What code is generally put inside a loaders onComplete handler?  
Thanks,
