# General Query on AS3 Component Behavior

**URL:** <https://forum.kirupa.com/t/general-query-on-as3-component-behavior/319957>\
**Category:** flash\
**Created:** [March 9, 2011, 9:21pm UTC](https://forum.kirupa.com/t/general-query-on-as3-component-behavior/319957 "2011-03-09T21:21:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kalasnjikov](https://avatars.discourse-cdn.com/v4/letter/k/d78d45/32.png) [@kalasnjikov](https://forum.kirupa.com/u/kalasnjikov)\
**Post date:** [March 9, 2011, 9:21pm UTC](https://forum.kirupa.com/t/general-query-on-as3-component-behavior/319957/1 "2011-03-09T21:21:42Z")

</div>

Hello,

I have a general question about AS3. I recently purchased a piece of code - an image scroller - as a component. I like the component, and it works well - except for one issue.

When I first addChild the component to the display list of a Sprite, it works well, and the images begin with image 1. However, when I removeChild the component, and then later addChild it again, the images display at a seemingly random point along the image sequence. The component has a settings file and an images array which are xml files, and I have three separate pairs, one for each instance.

My question is this: is their a way to force components to re-evaulate (“re-set”) each time they load? I’d like to component to move to first image everytime.,

Any insights would be greatly appreciated. I do have the component’s source code, but I’m not going to post it here. I am willing to share it with someone who thinks they can help me, but I’d like to hear from the community what best practices are regarding disclosures - I don’t want to piss off the developer by throwing his code all over the place.:trout:

Thanks!
