No problem

So in Flash, for any small or big modification, the action script has to be re-written from the ground?
not necessarily, but it depends on what the context is. In this case, since the close button was becoming a part of the dragging, I had to separate it, so that the close button was clickable when pressing it, instead of dragging. I have a lot of experience in Flash and have developed a brain to think of other ways around certain problems, and hopefully you will as well if you keep practicing