# Help Please, Need to Fix a Code for a Search Feature

**URL:** https://forum.kirupa.com/t/help-please-need-to-fix-a-code-for-a-search-feature/16902
**Category:** flash
**Created:** [March 29, 2003, 9:29pm UTC](https://forum.kirupa.com/t/help-please-need-to-fix-a-code-for-a-search-feature/16902 "2003-03-29T21:29:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![daghost](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@daghost](https://forum.kirupa.com/u/daghost)
#### Post date: [March 29, 2003, 9:29pm UTC](https://forum.kirupa.com/t/help-please-need-to-fix-a-code-for-a-search-feature/16902/1 "2003-03-29T21:29:05Z")

</div>

Hi

What I need is something like a search feature that works like a shortcut to a specifict scene and frame. When I type a number in the input field and the number is related to a specific scene and frame in the code of the button I should be taken to that specific frame in that specific scene.

This is not a database based search.

## The wrong code I have is the following (it is the code of the button that triggers the search):

## on (release) { if (searchinput=123456) { gotoAndPlay(“Scene 2”, 1); } else { gotoAndPlay(“Scene 3”, 1); } }

\*“searchinput” is the instance name of the input text box

What I’m trying to state with this code is:

On release of the mouse button  
if the value entered in the input text box is equal to 123456  
go to and play scene 2 frame 1,  
else (other value or no value)  
go to and play scene 3 frame 1

I think the error is the line that says: if (searchinput=123456) { because I don’t know exactly how to state the relation between the value entered in the input text field and the number 123456.

I’m including a file called TestSearchForm.fla, it have what I have done and it may help you figure what I mean.

If you can help me please reply, I really need someone to help me, thanks for your time, bye.

daghost

:hair:

---

<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: [March 29, 2003, 9:38pm UTC](https://forum.kirupa.com/t/help-please-need-to-fix-a-code-for-a-search-feature/16902/2 "2003-03-29T21:38:09Z")

</div>

if(searchinput == 12345)

you have to have two == not one.

---

<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: [March 29, 2003, 9:41pm UTC](https://forum.kirupa.com/t/help-please-need-to-fix-a-code-for-a-search-feature/16902/3 "2003-03-29T21:41:27Z")

</div>

I looked at your file. change this:

```auto

	if ("number="+123456) {

```

to

```auto

	if (number==123456) {

```

and that worked for me.

---

<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: [March 29, 2003, 9:53pm UTC](https://forum.kirupa.com/t/help-please-need-to-fix-a-code-for-a-search-feature/16902/4 "2003-03-29T21:53:03Z")

</div>

Hi.

IT WORKED! thanks a lot Jubba.

daghost

:hair:
