Search for AutoComplete to any word in the sentence

I use an autocomplete for my flash application. AutoComplete uses an external text file. When I type the first word of the sentence, it shows all phrases that begin with the word.

Is it possible to display all the sentence which have this word (and not only the beginning of the sentence)?

Example: I have two sentences: "I'm going to school" and "I'll look for him.

I would like to be able to type 'school' and it shows the first sentence.

Do you know how I can do?

For now, I have to type 'I'll s' to display the first sentence.

Here is my code: thank you!

urlLoader.load(new URLRequest("test.txt"));
            urlLoader.addEventListener(Event.COMPLETE, loadComplete);
            inputField.addEventListener(KeyboardEvent.KEY_UP, suggest);
 function loadComplete(e:Event):void
        {
            suggestions = e.target.data.split(",");
        }
         function suggest(e:KeyboardEvent):void
        {
            suggested = [];
            for (var i:int = 0; i < textfields.length; i++)
            {
                removeChild(textfields[i]);
            }
            textfields = [];
            for (var j:int = 0; j < suggestions.length; j++)
            {
                if (suggestions[j].indexOf(inputField.text.toLowerCase()) == 0)
                {
                    var term:TextField = new TextField();
                    term.width = 300;
                    term.height = 20;
                    term.x = 70;
                    term.y = (20 * suggested.length) + 314;
                    term.border = true;
                    term.borderColor = 0x353535;
                    term.background = true;
                    term.backgroundColor = 0xFF9900;
                    term.textColor = 0x4C311D;
                    term.defaultTextFormat = format;
                    term.addEventListener(MouseEvent.MOUSE_UP, useWord);
                    term.addEventListener(MouseEvent.MOUSE_OVER, hover);
                    term.addEventListener(MouseEvent.MOUSE_OUT, out);
                    term.addEventListener(MouseEvent.CLICK, tellMe);
                    addChild(term);
                    textfields.push(term);
                    suggested.push(suggestions[j]);
                    term.text = suggestions[j];
                }
            }
            if (inputField.length == 0)
            {
                suggested = [];
                for (var k:int = 0; k < textfields.length; k++)
                {
                    removeChild(textfields[k]);
                }
                textfields = [];
            }
            if(e.keyCode == Keyboard.DOWN && currentSelection < textfields.length-1)
            {
                currentSelection++;
                textfields[currentSelection].textColor = 0x4C311D;
            }
            if(e.keyCode == Keyboard.UP && currentSelection > 0)
            {
                currentSelection--;
                textfields[currentSelection].textColor = 0x4C311D;
            }
            if(e.keyCode == Keyboard.ENTER)
            {
                inputField.text = textfields[currentSelection].text;
                suggested = [];
                for (var l:int = 0; l < textfields.length; l++)
                {
                    removeChild(textfields[l]);
                }
                textfields = [];
                currentSelection = 0;
            }
        }
         function useWord(e:MouseEvent):void
        {
            inputField.text = e.target.text;
            suggested = [];
            for (var i:int = 0; i < textfields.length; i++)
            {
                removeChild(textfields[i]);
            }
            textfields = [];
        } 

Based on what, in my view, I see that you should need to change a line...

If (suggestions [j] .indexOf (inputField.text.toLowerCase ()) == 0)

should become...

If (suggestions [j] .indexOf (inputField.text.toLowerCase ())! = - 1).

Tags: Adobe Animate

Similar Questions

  • Having a problem with the update of the window. He said that windows could not search for new updates. It's the found error 80245003 code

    Having a problem with the update of the window. He said that windows could not search for new updates. It's the found error 80245003 code

    Take a look at this article as it addresses this error code. Mike - Engineer Support Microsoft Answers
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • I got aDossier on desktop disappeared and when I search for it. It happens on the network and I can't seem to him

    I got aDossier on desktop disappeared and when I search for it. It happens on the network and I can't help him

    Hello

    1. Since when are you facing the issue?

    2 what you mean exactly by happens on a network and I can't seem to him?

    3. do you get an error message?

    4. are you connected to a network?

    5 did you a recent software or changes to the material on the computer?

    I would say first of all, allowing you to run the FIXIT from the link give and check if it helps.

    Diagnose and repair Windows files and folders problems automatically

    http://support.Microsoft.com/mats/windows_file_and_folder_diag/en-us

    Hope this helps and provide us more information if you need more assistance.

  • Why search for Verizon continue to flock to the top?

    Whenever I do a search, he goes in search of Verizon. I have Google set as the default browser, but whenever I type something in the search bar I have to manually select the option of Google. If this isn't the case, it is by default in the search of Verizon. It is a pain. I just want your in what I am looking for and go. Help, please

    Is the problem with a single word searches? A single word searches work differently than the search for two words. When you enter a single word (for example, bananas or the mozilla.org), Firefox checks your provider if a server name is valid. Your service provider can intercept this survey and return its own page of search results. In this case, your best strategy is to exploit the specific search engine query option in the drop down menu to launch your search.

  • Searching for a contact through GUID on the REST API

    After talking to some of the developers at Vidyard, it was obvious that there is a way that eloqua could really help us!


    If taken Eloqua supported a way of searching for a contact based on the GUID of the cookie in the REST API, we could stop using the SOAP API in total. I wanted to just start a thread to see if anyone is looking for this feature? Any ideas would be appreciated!


    CC TJ fields-Oracle

    Hey Ian, is currently our roadmap.  No ETA at this time.

  • Click on search for result code doesn't display the line containing the search results

    I use the latest version of DreamweaverCC2014 on the latest version of Mac Mavericks. I use Dreamweavers find and replace to find code in an open html document. In the search results Panel results aren't clicking on me at the relevent code line in the document. It used to work well in the previous version of DW, I was using.

    In the DW help note it is said: ' display the results of a particular search in context: select window > results to display the search panel. " Double-click on a line in the search panel. If you are looking for the current file, the Document window displays the line containing that search result. ' http://helpx.adobe.com/Dreamweaver/using/Text.html#search_for_and_replace_text

    Double-click does not display the line containing the result of the search for me. It seems to work OK in my CSS files, but not in HTML longer (1010 lines).

    Any advice? Someone at - it the same problem? Thank you

    I have the same problem with all the HTML files that have external style sheets. for example .

    So it seems to be a bug around that. When you delete the above, double click functionality works.

  • Please help with the oracle text and select for each word in the sentence

    Hello

    I have a problem with a query which NEEDS to be done in SQL (not pl/sql in the stored procedure):

    Suppose that a phrase such as "Church of snowboarding."

    Can I divide this by using:
    Select regexp_substr ('church snowboard', ' [^] +', 1, level) word
    of the double
    connect regexp_substr ('church snowboard', ' [^] +', 1, level) is not NULL)

    now I have words 'showboard' and 'Church '.

    So far so good.

    Now I need for each of these words, to create a list of unique IDS collected using text oracle contains the query as follows: (pseudocode)
    for SPLIT.word in "snowboarding", "Church".
    SELECT SCORE (1) NIVEAU_RECHERCHE,
    NO_MATRC,
    NO_NOM_
    OF GR_OT_NOM_ASSJT
    WHERE CONTAINS (name, SPLIT.word, 1) > 0
    UNION
    SELECT SCORE (1) NIVEAU_RECHERCHE,
    NO_MATRC,
    NO_NOM_
    OF GR_OT_NOM_ASSJT
    WHERE CONTAINS (name, ' SYN('||)) SPLIT.word: ', GR_THESAURUS)', 1) > 0
    UNION
    SELECT 100 AS NIVEAU_RECHERCHE,
    NO_MATRC,
    NO_NOM_
    OF GR_OT_NOM_ASSJT
    WHERE NAME LIKE '% "| SPLIT.word | '%'

    so of course I have to untangle this UNION to remove duplicates

    Anyone here sees a way out of my situation? A way to make the loop in a select (use with and such) then
    Just add a select distinct NO_MATRC, NO_NOM_ from)

    I tried, but I'm out of ideas so I thought that some guru here might have the answer ;)

    Thanks in advance for any advice

    See you soon

    You might end up with something like the XML below, ideally as binding in the query.

    SELECT SCORE (1) NIVEAU_RECHERCHE,
    NO_MATRC,
    NO_NOM_
    OF GR_OT_NOM_ASSJT
    WHERE CONTAINS (name, e
    Church of snowboard

    transform ((JETONS, "{", "}", "AND"))
    transform ((JETONS, "{", "}", "OR"))
    turn ((JETONS, «SYN (",", GR_THESAURUS) ', 'AND'))
    turn ((JETONS, «SYN (",", GR_THESAURUS) ', 'GOLD'))
    transform ((JETONS, «?)) {","} "," AND"))/seq >
    transform ((JETONS, «?)) {","} "," GOLD"))/seq >



    (1) > 0

  • (MacBook Pro (15-inch, late 2011, 2.2 GHz Intel Core i7, computer laptop my MacPro started yesterday to enter contimuous dashes or hyphens in any available window (search engines, software, for example.))) MS word .docx) the only way to stop it is to rest

    MacBook Pro (15-inch, late 2011, 2.2 GHz Intel Core i7, 4 GB memory at 1333 MHz, DDR3).  10.11.3 OSX

    Yesterday, the machine started to insert continous dashes/hyphens into any available window (e.g. window search engine, for example open source software, MS Word, docx). Is the only way to stop this as soon as it starts to reboot, that usually stop at least temporarily.  As soon as he starts this, I tried to close all the applications open without effect.

    -Try to reset memory NVRAM/PRAM and SMC

    MacIntel: Reset of the controller (SMC) system management

    Subject of memory NVRAM and PRAM

    -Try to start safe mode

    OS x: what is Safe Boot, Safe Mode?

    -Start to recovery and repair the startup disk

    OS X: on OS X Recovery - Apple Support

    If inserting the characters in recovery, which indicates a hardware problem.

    have you spilled something on the Ko?

    If your battery is replaceable by the user take it out and look for a swollen battery

    -If it is repairable reinstall the OSX

    How to reinstall OS X on your Mac - Apple Support

    -If you do not have a backup using disk utility to restore the internal drive to an external drive, so that you can try to recover the data.

    Format the boot disk and then do a fresh install of Mac OS x

    This is the Office Mac Pro forum. I asked that your post be moved to the MacBook Pro laptop forum.

  • my dvd drive has stopped working. says windows cannot load the device driver, can be corrupted or missing code 39. When I search for updates, it says I have the most up to date. Help!

    drive is Matshita DVD-RAM UJ-850 s a SATA drive

    I use windows Vista

    Driver provider Microsoft

    Day 21/06/2006

    Version 6.0.6002.18005

    Hello

    Code 39 means that the driver is corrupted or missing.

    Please make all below even if you have done some before as it is often the set of operations which solves
    the question.

    Try this - Panel - Device Manager - CD/DVD - double-click on the device - driver tab - click
    Update the drivers (this will probably do nothing) - then RIGHT click the drive - UNINSTALL - REBOOT
    This will refresh the default driver stack. Even if the reader does not appear to continue below.

    Then, work your way through these - don't forget the drive might be bad, could be a loose cable or
    slight corrosion on the contacts (usually for a laptop) and other issues.

    Your CD or DVD drive is missing or is not recognized by Windows or other programs
    http://support.microsoft.com/kb/314060 - a Mr Fixit

    Try this fix manually if the Fixit 314060 does not work
    http://www.pchell.com/hardware/cd_drive_error_code_39.shtml

    Your CD or DVD drive is missing or is not recognized by Windows or other programs-
    a Mr Fixit
    http://support.Microsoft.com/kb/982116

    The CD drive or the DVD drive does not work as expected on a computer that you upgraded to Windows Vista
    http://support.Microsoft.com/kb/929461

    When you insert a CD or a DVD, Windows Vista may not recognize the disc
    http://support.Microsoft.com/kb/939052

    Your CD or DVD drive cannot read or write media - A Mr Fixit
    http://support.Microsoft.com/GP/cd_dvd_drive_problems

    CD/DVD drive does not appear in Windows Vista, or you receive this error during the installation of Windows Vista after booting from the DVD (AHCI)
    http://support.Microsoft.com/kb/952951
    Drive CD - R or CD - RW Drive is not recognized as a recordable device
    http://support.Microsoft.com/kb/316529/

    Hardware devices not detected or not working - A Mr Fixit
    http://support.Microsoft.com/GP/hardware_device_problems

    Another possibility is that the cables are loose. Remove ALL power, then make sure that the cables in both
    ends. Remove and replace, do not just tight. For laptops, you can often clean power and
    contacts data with a pencil eraser.

    --------------------------------------------------------------

    Also check with your system manufacturer to see if there are any updated drivers for your DVD. Or even if it
    are you can reinstall the 'old'. Many use Windows default drivers however some special aura
    ones. Also check the website of the manufacturer of the car.

    Look at the sites of the manufacturer for drivers - and the manufacturer of the device manually.
    http://pcsupport.about.com/od/driverssupport/HT/driverdlmfgr.htm

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • searching for remaining files of deleted to the Win7 registry software?

    I was looking for a particular in my registry file when I found several unknown files. When clicked, I found that they went to the programs that I had uninstalled long ago. Example: Norton 360. I'm a little anxious when it comes to cleanliness and sharpness. I want my free registry files unnecessary, but I don't want to use a registry cleaner I know, that they are not safe. I am familiar with my registry and very careful.,.

    I use no programs like Windows Movie Maker, and I really Visual Studio and Java, all the Svc that are lined up everywhere without any explanation as to what they are doing...  I don't use Windows Sidebar and Gadgets, do I really need taking place?

    I hope that there is someone else out there who understands. :)

    Unfortunately - uninstallers most are poorly maintained and leave behind pieces - probably more than the entries in the registry.

    You can uninstall Windows Movie Maker if you wish.  After all - it was installed with Windows Live Essentials or similar.

    What about Java - you or something that you have probably installed - if you mean Java Runtime Environment (JRE), the web plugin.  You can uninstall too - see what breaks, and install the latest version, if you want.

    Regarding the "Visual Studio."<-- no="" idea="" what="" you="" mean="" there.=""  you="" may="" have="" a="" microsoft="" visual="" c++="" redistributable="" installed="" that="" got="" there="" with="" some="" other="" installation="" and="" was="" kept="" updated="" after="" that="" by="" microsoft="">

    Regarding the sidebars and gadgets - as long as you have disabled, I would not do much more with them.  Although - you can uninstall them also, at their base.

    Going to Panel of--> all items in Control Panel--> programs and features to uninstall first - things that you don't think you need or do not want.  I would be careful here - many things settle because your video card and software device driver need them or some other component, its application in car, etc, that was installed required him to function and there is no NOTE of that, nor is it part of any warning that removing it will be that break.

    You can choose "Turn Windows features on or off ' on the left to remove might be more still of the flesh that is installed, you do not want...  Remove the default games individually, for example, expand the section multimedia features and remove Windows DVD Maker, if you don't use/want it, expand your printing and scanning, and remove Windows Fax and Scan, if you have no scanner/fax system, remove the Windows Gadget platform and perhaps the Tablet PC components if you do not use the Journal the math input panel or handwriting...

    At least then we remove things safely.

    Honestly - you saying, "I want my free registry of unnecessary files...". "gives me pause - because there is no files 'in' the registry.  ;-)  (Old joke... * SMILE *)

    If you (after making the foregoing) want to find some orphan registry entries and want to be very careful on those who you decide to delete - although I don't recommend registry cleaners - you could use CCleaner (FREE version) to find the orphaned entries, see their list, select what you want to delete, and export State pre cleaning (although I recommend a system image backup before you start) to do this...

    Note that the registry cleaning will probably do very little for space, nothing for the performance of the system and is a risk.  It's just for your own information, you would do this, the benefits being almost strictly mental.

    For the most part - it is better for most of the people that they don't mess with what is installed and worry no more space on their disk unless it starts to become very low (less than 15% for small disks of 80 GB to 160 GB or less and less than 20-40 GB for the disks in this size (, IMHO.)  A little cleaning in the wrong place can have disastrous consequences and any application or individual tells you that they can guide you 100% securely through a cleanup of this type without seeing themselves - is probably play on your need to clean top and hoping for a good result * the best *.

  • Is there an easy way to paste the contents (for example, from within Word) without the formatting?

    I know that you can always open Notepad and your content out there, copy and paste it from Notepad in HR, but it's not a very practical or efficient method. It would be nice if HR had some paste options (as in Word) If you had the choice to paste unformatted in topic text.

    One of the reasons why I ask this question is that I met a HR bug (which I am currently documenting) where when you had some content from another source (for example, Word) and you want to apply an existing style HR, HR (sometimes) will generate spurious 'local' formatting on top of the style you choose (in force) crushing the appearance of your text desired. It affects other things in your theme (in the HTML) file, but I need more time to figure it all out.

    Hello

    If you are able to install the software on your computer, you can try to use a little freeware utility called PureText.

    http://www.SteveMiller.NET/PureText/

    Although PureText exists, I highly recommend that you fill out a bug with Adobe report to advise that you don't like the existing behavior.

    See you soon... Rick

    Useful and practical links

    Wish to RoboHelp form/Bug report form

    Begin to learn RoboHelp HTML 7, 8 or 9 in the day!

    Adobe Certified RoboHelp HTML Training

    SorcerStone blog

    RoboHelp EBooks

  • I get the "web search for cutomized uTorrentcontrol V2" appear in the search bar whenever I start a new page. How can I get rid of this message.

    bold text It started to occur when I upgraded to Firefox Version 23.

    Use the reset to search and remove a user.js file as possible, to restore a possible diversion of the browser.

    More info?

    • And if necessary to uninstall this program from the control panel.
  • How to search for a location number anywhere in the string

    I am looking for a string to a number (integer or float) without knowing its index in the string and to extract it - whether in digital format or a string.  for example "52,63 number appears in this string." I want to extract/identify "52,63.

    The functions I've met seem to expect the index to be known or number to be at index 0.  How can I achieve this?

    Best regards.

    Kenoss


  • Ultamate Windows 7 64 bit update will not search for, download, install, or connect to the web.

    I ran fixit of Windows, troubleshooting, stopped the service update, reset the file cache, restarted the windows update service, ran reset it re-register components diagnosis of Windows Update, Windows Update, stand-alone Windows6 update. 1 - KB3102810 - x 64 and updated my windows update agent as well, and it always hangs just looking for updates. All downloads for repair came from Microsoft.com.

    It seems do not connect to the Microsoft update Web site.

    I'm running a PC with Windows 7 Ultimate 64 bit.

    does anyone have a proven fixit?

    Don't know what you describe.  However, it works for most people:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-update/Windows-7-update-solution/f39a65fa-9d10-42E7-9bc0-7f5096b36d0c

  • Searching for information on ink by using the EWS in Deskjets

    SAP (built-in web server) is a useful tool which is used in many ways related to the networking;  The SAP can provide information on Web Services and can also set Static IP and static DNS on the printer.

    But, if it is connected to the network via Ethernet or via a wireless connection with their Deskjet, it is also a great way to check the ink levels and number of pages.

    To access EWS of the printer.  Take the IP address of the printer and type it in a browser on the computer. The IP address can be found under settings wireless to the printer on display or on the Network Configuration report that can be printed.  I did my review on the 3510 Deskjet all in one printer for the purpose of this post. I hit just the wireless in the lower right button and that visualizes the settings of the IP address and SSID wireless.

    Once we've hit this address in the browser (in this case, I used Chrome), the integrated Web server opens to a screen that will show you some basic information on this page. It will be showing the ink levels estimated for the printer.  You can find that gauge ink also in the Tools tab, but it will give you more information than what is already displayed on the home screen.

    From the home page once you can click on the tab above titled "Tools". ""  This will load the product information page. This Page contains other useful information such as the current version of the printers firmware.   The firmware version is information that is sometimes required in the forum when we receive help to other members of the community.

    Product information page, go to the left column and click reports, then click on use the report.

    This report will be to use accumulated. It will give you a total number of pages, and then drop the use by:

    • Type of medium (paper or Photo paper plan)
    • Size of the media. (Letter, A4 and others)
    • At the bottom of this report, you can find information about how HABs and black cartridges have been used in the printer.

    So, for those who are connected by Ethernet or wireless to the printer; Here's another option to find information about the ink levels.  These steps and information listed are general guidelines.

    As always, I hope that the community find this is useful and informative.  Good impression!

Maybe you are looking for