Autosuggest in flash

View: New views
3 Messages — Rating Filter:   Alert me  

Autosuggest in flash

by A M-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Whilst building my flash form i noticed that i was unable to use autosuggest as it can only be used with an HTML form. Does anyone know a way round this or how to implement autosuggest in flash?

Thanks

Ad

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: http://www.houseoffusion.com/groups/CF-Flash/message.cfm/messageid:259
Subscription: http://www.houseoffusion.com/groups/CF-Flash/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.30

Re: Autosuggest in flash

by Tyron Foston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

For that you would have to set up make a seperate movie clip in flash that would loop through all the results from the database (assuming that your suggested items are coming from one). Say for example your using the LoadVars (AS2) object and your input search text box name is search

search_txt.onChanged = function(){

    var mylv:LoadVars = new LoadVars()
   
    mylv.onLoad = function(){
            //Loop through the results. For example, the result looks like
            //table, tablet, tabbed, tabletop

            var  mylist:String = new String(this)
           
            //Convert the comma delimited list to an array to loop through
            var myArray:Array = mylist.split(",")

            //Finally loop through the array, create a new movieclip to load the results
          //into. Make it the same movieclip so that it kills the old on

       _root.createEmptyMovieClip('autoSuggest_mc',2)
            for(i=0;i<myArray.length;i++){
                //Attach a movieclip with a text box with in
               autoSuggest_mc.attachMovieClip('myBox','myBox_mc'+i, i)
               autoSuggest_mc['myBox'+i].textBox_txt.text = myArray[i]    
           }//end loop

    }//end onLoop

    //Access the server pages to get suggested items
      mylv.load('myserverPage.cfm?term='+search_txt.text)

}//end onChanged

That would access the server page, get the results and then loop through, create a new movieclip to dump the results into. I hope this helps

A M <adammurad@...> wrote: Whilst building my flash form i noticed that i was unable to use autosuggest as it can only be used with an HTML form. Does anyone know a way round this or how to implement autosuggest in flash?

Thanks

Ad



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: http://www.houseoffusion.com/groups/CF-Flash/message.cfm/messageid:260
Subscription: http://www.houseoffusion.com/groups/CF-Flash/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.30

Re: Autosuggest in flash

by A M-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks i will be trying that later tonight! however whilst browsing around for alternatives i stumbled upon Adobe Spry AutoSuggest, I was wandering if their is anyway to incorporate this into cfinput in a flash form? Or is it that flash rejects divs and any form of html?

Thanks

Ad


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: http://www.houseoffusion.com/groups/CF-Flash/message.cfm/messageid:261
Subscription: http://www.houseoffusion.com/groups/CF-Flash/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.30