# Can't access my loaded variable

**URL:** <https://forum.kirupa.com/t/cant-access-my-loaded-variable/262888>\
**Category:** flash\
**Created:** [June 10, 2008, 8:14pm UTC](https://forum.kirupa.com/t/cant-access-my-loaded-variable/262888 "2008-06-10T20:14:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dpots](https://avatars.discourse-cdn.com/v4/letter/d/9fc29f/32.png) [@Dpots](https://forum.kirupa.com/u/Dpots)\
**Post date:** [June 10, 2008, 8:14pm UTC](https://forum.kirupa.com/t/cant-access-my-loaded-variable/262888/1 "2008-06-10T20:14:31Z")

</div>

I have been fighting with a form setup and finally think I have it just about figured out.

I have a base flash file named light3 which contains a movieclip called “Form”. Inside form is the username and login fields. When the user clicks submit, a movie called accessMsg comes up ( attachMovie(“accessMsg”, “accessMsg”, 1)  
and runs while the ok or bad response comes back from a coldfusion page. In that accessMsg movie is where the result is read and determined if it is ok or bad:

```auto
if(_root.CFresponse1 == "ok")
{
_root.form.Address = Address
        _parent.gotoAndStop(3);

        this.removeMovieClip();
}
else if(_root.CFresponse1 == "bad")
{       
        _root.form.attachMovie("invalidMsg","invalidMsg",2 );
        _root.form.invalidMsg._x = -5;
        _root.form.invalidMsg._y = 60;
        this.removeMovieClip();
}

```

This works.

However when the orginal light3.swf is loaded into a main movie timeline, it doesn’t work anymore.

What do I need to change on the if(\_root.CFresponse1 == “ok”) code? I have tried (parent.CFresponse1) but that didn’t work either. The variable coming back from flash should be loading into the “form” movieclip where the submit button resides, correct?? How do I call a variable in the form movieclip from the accessMsg clip?
