# AS Structuring problem / eratic behaviour

**URL:** <https://forum.kirupa.com/t/as-structuring-problem-eratic-behaviour/207269>\
**Category:** flash\
**Created:** [November 16, 2006, 2:39am UTC](https://forum.kirupa.com/t/as-structuring-problem-eratic-behaviour/207269 "2006-11-16T02:39:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lowey](https://avatars.discourse-cdn.com/v4/letter/l/e36b37/32.png) [@lowey](https://forum.kirupa.com/u/lowey)\
**Post date:** [November 16, 2006, 2:39am UTC](https://forum.kirupa.com/t/as-structuring-problem-eratic-behaviour/207269/1 "2006-11-16T02:39:49Z")

</div>

Hello all,

I’m quite new to action scripting so would appreciate some help.

The problem with the movie I have created is that the longer it runs the more erratic its behaviour. It seems to play out ok for a couple of cycles.

I feel that the problem is due to the way that i have structured the action script within the movie - in a sequence over 4 frames on a single layer.

The idea was to attach a movie in frame 1, use some tweening/easing and after a set time period move to the frame 2, detach the first movie, attach a second movie and use some more tweening/easing. And so on.

There is also a movie playing continuously as a backgroung.

I have tried moving the the 4 frames onto seperate layers and moving thru the code using frame labels - but this doesnt seem to work.

please attached fla

I also realise there is probably duplication of code that could be removed.

Anyone got any advice on this as it would be greatly appreciated.

Thanks.
