# Variables

**URL:** <https://forum.kirupa.com/t/variables/11397>\
**Category:** Uncategorized\
**Created:** [January 16, 2003, 4:53pm UTC](https://forum.kirupa.com/t/variables/11397 "2003-01-16T16:53:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fishtank](https://avatars.discourse-cdn.com/v4/letter/f/b3f665/32.png) [@fishtank](https://forum.kirupa.com/u/fishtank)\
**Post date:** [January 16, 2003, 4:53pm UTC](https://forum.kirupa.com/t/variables/11397/1 "2003-01-16T16:53:19Z")

</div>

a very important question: for a login i need to compare two variables.

one of the variables (passw) is loaded dynamically.  
the other one (pw) is set by a form the user hast to fill.

i wrote the following code on a button in the frame where the user hast to type his password (passw is already loaded from a textfile):

on (release) {  
if (pw == passw) {  
gotoAndStop(4);  
} else {  
gotoAndStop(3);  
}  
}

in frame 3 i wrote: “wrong password”, code is stop ()  
in frame 4: “welcome user”, code is stop()

i tried half an hour to fix that but i always get “wrong password”

plz help me

EDIT: one more question: is a movie loaded with loadMovie(…) able to work with variables set in the main movie (in which i loaded it) ?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 16, 2003, 4:59pm UTC](https://forum.kirupa.com/t/variables/11397/2 "2003-01-16T16:59:21Z")

</div>

Could I see the FLa or an examplpe.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 16, 2003, 5:13pm UTC](https://forum.kirupa.com/t/variables/11397/3 "2003-01-16T17:13:49Z")

</div>

A: yes, loaded movies can reference variables in the main movie, but you have to use \_level0.variable name. \_level0 references the main movie.

heres an example of what you were explainng before

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 16, 2003, 6:08pm UTC](https://forum.kirupa.com/t/variables/11397/4 "2003-01-16T18:08:32Z")

</div>

thats it, exactly. thanks man. this forum rocks. fast help, friendly guys (and girls of course 😏 )
