# Code placement anamoly

**URL:** <https://forum.kirupa.com/t/code-placement-anamoly/203415>\
**Category:** Uncategorized\
**Created:** [October 10, 2006, 9:32pm UTC](https://forum.kirupa.com/t/code-placement-anamoly/203415 "2006-10-10T21:32:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fatPluto](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/fatpluto/32/2874_2.png) [@fatPluto](https://forum.kirupa.com/u/fatPluto)\
**Post date:** [October 10, 2006, 9:32pm UTC](https://forum.kirupa.com/t/code-placement-anamoly/203415/1 "2006-10-10T21:32:16Z")

</div>

I have a movie clip on the main timeline called “map,” w/ tons of nested clips. On an actions layer on the Main Timeline I have the following:

map.nestedClip.onRollOver = function() {  
this.\_alpha = 50;  
};

the rollover event fires, but the alpha reduction does not. I replaced the alpha = 50, with a trace statement, and was successful, plus I get the hand when I roll over the movie clip, so I know that the event is registering. However, when I place the same code directly on the instance, it works fine. I thought the only difference between placing code on the timeline and directly on an instance was a matter of convention, and that timeline code is generally a better practice. Does anyone have an idea? thank you.
