3 Replies Latest reply on Mar 13, 2014 6:37 AM by kglad

    How do I build a search function for information kiosk?

    emperorizal

      Greetings,

       

      I'm working on an information kiosk and the client requested that I create a search inquiry in the interactive. I have some knowledge on simple search inquiry using the "input text", a phone book function, you type in a name and another input text field will display the name's information. My question is, how do I create a similar function but the result consists of both (information) text and (floor plan) images. It's an information kiosk for a small local mall in Malaysia, and I only know Adobe Flash for interactive development, nothing else. Can anyone help me with this? Do I have to use AS3 or AS2?

       

      Thank you.

        • 1. Re: How do I build a search function for information kiosk?
          kglad Adobe Community Professional & MVP

          you should use as3 and you must use as3 if you're using flash cc.

           

          create a list of key words/phrases that will be used to determine what will trigger a response.  you could use an object to associate those key words/phrases with text/images that should be displayed.

           

          for example:

           

          var keyObj:Object={};

           

          keyObj["large kitchen"]=["whatever text you want to display in response to that query","class_name_of_image_to_display"];

          etc

           

           

          to search:

           

          function searchF(s:String):void{

          if(keyObj[s]){

          display_tf.text=keyObj[s][0];

          var C:Class=getDefinitionByName(keyObj[s][1]) as Class;

          var image=new C();

          // if that's a display object, add to the display list.  if it's a bitmapdata object, create a bitmap to add to the display list

          } else {

          // give some feedback

          }

          1 person found this helpful
          • 2. Re: How do I build a search function for information kiosk?
            emperorizal Level 1

            Thank you, but i still need details.

            So, let's say a user wants to search "Restoran XYZ", he keyed in the text in the input text area and hit the search button, so that a short bodycopy of discription and an image of the floor plan to that restaurant will appear, that is what I want to achieve.

             

            I need more details.

            The AS3 codes you provided earlier, where do i put them? Does this scripts work with a search button? And If you don't mind, can you explain a little bit about the scripts? For example, where do I store the images, in the library or external file in the same folder with the main project file?

             

            I'm sorry for the inconvenience. Thank you again for your tutorial.

            • 3. Re: How do I build a search function for information kiosk?
              kglad Adobe Community Professional & MVP

              if you don't know any actionscript, you'll need to learn or hire someone.

               

              but using your example, you would have:

               

              var keyObj:Object={};

               

              keyObj["Restoran XYZ"]=["whatever text you want to display in response to that query","class_name_of_image_to_display"];

               

               

              the images would be in the library in this example with class names.  but if you want to load them, you can do that with a slight modification:

               

              var loader:Loader=new Loader();

              addChild(loader);

              var keyObj:Object={};

               

              keyObj["large kitchen"]=["whatever text you want to display in response to that query","path/image_name"];

              etc

               

               

              to search:

               

              function searchF(s:String):void{

              if(keyObj[s]){

              display_tf.text=keyObj[s][0];

              loader.load(new URLRequest(keyObj[s][1]));

              } else {

              // give some feedback

              }

              1 person found this helpful