Changed: the scrollbar for the textfield was changed and a few bugs removed and some more features added. Check details below. For search word search enter names (kim, heather etc.) or language (german, russian etc.). The searchword does not have to be the full word, part of it in capital or small letters is fine too (germ, russi, heat etc).
The XmlSearchEngine Component is a Flash XML-based search engine designed for CDs or for designers who want to build a script independent database. The exact description of how to use the component is given in the instructions.
The XMLSearchableDatabase component has several search options, which can be used separately or combined.
Up to 4 subcategories can be selected by entering values for subsubitem1 to 4. In the xml file this is an attribute in the childnode with the nodevalue "subsubitem". Another subsearch can be made by using the checkbox. To activate, enter a checkbox value and values for 1. and 2. subsubitem. In the xml file use the attribute "subitem1" and give it a value.
The following node values and attributes other than the xml definition have to be used in the xml file for correctly parsing the file:
An example xml file is shown here:
<?xml version="1.0"?> <items> <subitem age="under 30"> <subsubitem subsubitem1="black"> <susan id="34" name="Susan" subitem1="french" subitem2="blue" myFrame="frame3" pic="images/susan.jpg"> <p> <b>Susan Black</b> <li>age: 21</li> <li>eye color: dark blue</li> <li>hair color: black</li> <li>height: 179 cm</li> <li>weight: 185 pounds</li> <li>foreign language: <i>french</i></li> <a href="susan.html" target="newfile"><u>Web site</u></a> </p> </susan> </subsubitem> <subsubitem subsubitem1="blond"> <monica id="12" name="Monica" subitem1="german" subitem2="blue" myUrl="monicas.html" pic="images/monica1.jpg"> <p> <b>Monica Schneider</b> <li>age: 21</li> <li>eye color: dark blue</li> <li>hair color: blond</li> <li>height: 179 cm</li> <li>weight: 185 pounds</li> <li>foreign language: <i>german</i></li> <a href="monicas.html" target="newfile"><u>Web site</u></a> </p> </monica> </subsubitem> </subitem> </items>Here is the url for one of the xml files used in the above example.
Using actionscript on the main timeline the subsubitem categorie can be changed according to which categorie was selected. The values for the var instancename.subSearch_1.checked is from 1 to 8 depending on which xml file is selected. If you select any of the susubitems radio buttons, delete "defaultValue" and leave the fields in the parameter description blank. Similarly you can do this for the checkbox. The exact syntax to change any parameters of the radiobuttons for the subsubitems and the checkbox is shown below. You have to, however, give the instance of the component on stage a name (instancename). Use the following actionscript.
this.onEnterFrame = function(){ if(instancename.subSearch_1.checked == 1){ ssItem1 = "enter value A"; ssItem2 = "enter value B"; ssItem3 = "enter value C"; ssItem4 = "enter value D"; ssItem5 = "enter value"; instancename.subSearch_2.radio1b.textField.text = ssItem1; instancename.subSearch_2.radio2b.textField.text = ssItem2; instancename.subSearch_2.radio3b.textField.text = ssItem3; instancename.subSearch_2.radio4b.textField.text = ssItem4; instancename.subSearch_2.checkingBox._visible = true; instancename.subSearch_2.checkingBox.textField.text = ssItem5; } else if(instancename.subSearch_1.checked == 2){ ssItem1 = "enter value E"; ssItem2 = "enter value F"; ssItem3 = "enter value G"; ssItem4 = "enter value H"; ssItem5 = "defaultValue"; instancename.subSearch_2.radio1b.textField.text = ssItem1; instancename.subSearch_2.radio2b.textField.text = ssItem2; instancename.subSearch_2.radio3b.textField.text = ssItem3; instancename.subSearch_2.radio4b.textField.text = ssItem4; instancename.subSearch_2.checkingBox._visible = false; } }
Download the Files here.