# Using input text to move to a frame

**URL:** <https://forum.kirupa.com/t/using-input-text-to-move-to-a-frame/65738>\
**Category:** flash\
**Created:** [September 29, 2004, 5:21am UTC](https://forum.kirupa.com/t/using-input-text-to-move-to-a-frame/65738 "2004-09-29T05:21:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![humbleches](https://avatars.discourse-cdn.com/v4/letter/h/6de8d8/32.png) [@humbleches](https://forum.kirupa.com/u/humbleches)\
**Post date:** [September 29, 2004, 5:21am UTC](https://forum.kirupa.com/t/using-input-text-to-move-to-a-frame/65738/1 "2004-09-29T05:21:20Z")

</div>

Hi I’m very new to all this (forum and flash overall) compared to most but I’ve being trying to make a movie that when text is entered in to an input field depending on it’s value (after a click on a button) the movie goes to a certain frame.

For example if the text entered is = 5 then it goes to frame 52  
if no then it goes to frame 2…

Here is the code I’m using which is on a button in frame 1… at the moment no matter what I type in it always goes to frame 52! I’ve named the variable for the input text inputAmount.

on (release) {  
if (inputAmount=5) {  
gotoAndPlay(52);  
} else {  
gotoAndPlay(2);  
}  
}

Any help would be very much appreciated! Sorry if this is a stupid quetion!

Thanks! :love:

---

<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:** [September 29, 2004, 8:02am UTC](https://forum.kirupa.com/t/using-input-text-to-move-to-a-frame/65738/2 "2004-09-29T08:02:01Z")

</div>

```auto

on (release) {
	if (iBox == 5) {
		gotoAndPlay(52);
	} else {
		gotoAndPlay(2);
	}
}

```

where iBox is the variable name of the input box…

---

<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:** [September 29, 2004, 8:31am UTC](https://forum.kirupa.com/t/using-input-text-to-move-to-a-frame/65738/3 "2004-09-29T08:31:27Z")

</div>

and try not to do that mistake again “if (inputAmount[color=red]=[/color]=5)”. = is for asignments

---

<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:** [September 29, 2004, 8:43pm UTC](https://forum.kirupa.com/t/using-input-text-to-move-to-a-frame/65738/4 "2004-09-29T20:43:34Z")

</div>

hi thanks for the help… however I still can’t get it to work… no what ever I do (i’m using the code above) it just always gooes to frame 2 even when I type five in the in put box… is this something to do with the box itself???

---

<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:** [September 30, 2004, 9:44am UTC](https://forum.kirupa.com/t/using-input-text-to-move-to-a-frame/65738/5 "2004-09-30T09:44:19Z")

</div>

i guess it has to do with the variable scope.  
your iBox should be on the same timeline as the button you put the actions to. Or reffer it properly with absolute or relative coresponding name.  
I mean if iBox is in \_root you can access the variable from any timeline as \_root.iBox

Hope it helps
