# Fade in script only works sometimes

**URL:** <https://forum.kirupa.com/t/fade-in-script-only-works-sometimes/272289>\
**Category:** flash\
**Created:** [October 3, 2008, 3:33pm UTC](https://forum.kirupa.com/t/fade-in-script-only-works-sometimes/272289 "2008-10-03T15:33:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skarab](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Skarab](https://forum.kirupa.com/u/Skarab)\
**Post date:** [October 3, 2008, 3:33pm UTC](https://forum.kirupa.com/t/fade-in-script-only-works-sometimes/272289/1 "2008-10-03T15:33:18Z")

</div>

I’ve got a pretty simple script to fade in elements of a floor plan. All elements start with alpha set to 0, then as each one reaches an alpha of 100, the next element fades in.

I tested it at home last night and it was fine. Tried it this morning in its own file and it worked fine. But when I copy and paste all frames into a mc in a larger file, nothin. I can’t even get the elements to be invisible with alpha set to 0.

Here’s the script, it’s pretty simple:

```auto
onLoad = function () {
    flrPlanBasetint_mc._alpha = 0;
    flrPlanWalls_mc._alpha = 0;
    flrPlanFurniture_mc._alpha = 0;
    flrPlanLabels_mc._alpha = 0;
    retToGalleryBtn_mc._alpha = 0;
};
onEnterFrame = function () {
    retToGalleryBtn_mc._alpha = retToGalleryBtn_mc._alpha+3;
    flrPlanBasetint_mc._alpha = flrPlanBasetint_mc._alpha+3;
    if (flrPlanBasetint_mc._alpha>=100) {
        flrPlanWalls_mc._alpha = flrPlanWalls_mc._alpha+3;
    }
    if (flrPlanWalls_mc._alpha>=100) {
        flrPlanFurniture_mc._alpha = flrPlanFurniture_mc._alpha+3;
    }
    if (flrPlanFurniture_mc._alpha>=100) {
        flrPlanLabels_mc._alpha = flrPlanLabels_mc._alpha+3;
    }
};

```
