11
May
2006

Example code updated for beta 3

NOTE: This code is not being maintained, and has not been tested against recent versions of Flex. Use at your own risk!

All code below is public domain. No attribution is required, and there are no other licensing restrictions.

Hi folks. I’ve made updates to the CompletionInput, Drawer, and Explode effects for beta 3.

CompletionInput: A fairly flexible auto-complete widget that also has a “mustPick” mode so that it can serve as a substitute for combo boxes.

  • Fixed issues related to depth management
  • Updated for beta 3

Drawer: A subclass of Panel that hides on the side of the screen until your mouse moves toward the edge. Drawers can be pinned open or ripped off the edge to become floating panels.

  • Changed hiding heuristics so the drawer slides out of view when your mouse leaves the browser window.
  • Made sure that floating panels are repositioned to fit within the screen if the parent container changes size.
  • Updated for beta 3.

Explode: An effect that takes a bitmap copy of the target object and zooms it larger as it fades away. Comprehensive explanation of the code can be found here.

  • Updated for beta 3.

NOTE: Requires Flash Player 8.5 beta 3.
[Demo – Autocomplete input]
[Source code – Autocomplete input]

[Demo – Sliding drawers]
[Source code – Sliding drawers]

[Demo – Explode effect]
[Source code – Explode effect]

56 Responses to “Example code updated for beta 3”

  1. kuwamoto.org » Blog Archive » New Flex component - Sliding Drawer v 0.5

    […] [The sliding drawer component has been updated for the beta 3 version of the player. You can find the code here.] […]

  2. kuwamoto.org » Blog Archive » How to make a Flex effect: Explode v 0.5

    […] [The explode effect has been updated for the beta 3 version of the player. You can find the code here. –Sho, May 11, 2006] […]

  3. kuwamoto.org » Blog Archive » Flex auto complete text input control v0.6

    […] [The auto complete text input control has been updated for the beta 3 version of the player. You can find the code here. –Sho, May 11, 2006] […]

  4. Russ

    the sliding drawers component is sweet!
    how do I get the left and right drawers to float 20 px from the top of the stage.
    I changed the rectangle y prop to 20 in the _onMouseMove function, but that didn’t do any thing.
    I then tried changing the point y prop to 20 in the getPosition function, and that broke the drawer, it was the orig size, and stayed open.
    my programatic brain has been dislodged by AS3…

  5. Russ

    Oh I think I got it, you have to set the y prop in the mxml file, and then the point y prop in the getPosition function for left and right, and add 20 to the parentPoint.y in the onMove function…still dislodged.

  6. nz

    This didn’t happen in Flex Beta 2

    But i get this error message everytime I use the tab button to focus to the next field if the drawer component is in the app.

    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at mx.core::Container/getChildIndex()
    at mx.containers::Panel/getChildIndex()
    at mx.managers::FocusManager/::sortByDepth()
    at Array/http://adobe.com/AS3/2006/builtin::sort()
    at mx.managers::FocusManager/::sortFocusableObjects()
    at mx.managers::FocusManager/::setFocusToNextObject()
    at mx.managers::FocusManager/::keyFocusChangeHandler()

    code:

    cheers

  7. nz

    hmm code wasn’t submitted

    basically if you have TextInput controls on the main app and try to tab to them, that error occurs (when i comment out the Drawer, it was fine)

    cheers

  8. Sho

    Thanks, nz. I’ll take a look this weekend to see if I can figure out what’s going on.

  9. Josh

    I’m having a hard time targeting any content inside the drawer. I’ve got a custom MXML component placed inside the drawer, but when I try targeting that (myDrawer.searchResults), I get the following error: “Error #1069: Property searchResults not found on sho.ui.Drawer and there is no default value.”

    I’m a newbie at this, but what am I doing wrong?

  10. Josh

    Nevermind – I figured it out. Chalk it up to my n00b Flex skills.

  11. Tobias

    I love the explode effect, but am having trouble getting it to behave inside a effect.

    works if e1 is defined as:

    but not if e1 is defined as:

    Any ideas?

  12. Tobias

    Whoops. Apparently, I can’t post MXML inside a comment.

    The problem is that if I nest an Explode effect inside an mx:Sequence effect, the Explode effect is never invoked.

  13. Tom Chivertont

    Completion demo is foobar:
    Error: Error #2134: Cannot create SharedObject.
    at sho.ui::CompletionInput/::generateSortedCandidates()
    at MethodInfo-1536()
    at mx.core::UIComponent/::callLaterDispatcher2()
    at mx.core::UIComponent/::callLaterDispatcher()

  14. Pica Pica

    This has gotta be something simple I’m overlooking but…
    For the drawerDemo I get errors like:
    “Could not resolve to a component implementation”
    and for the ExplodeDemo:
    “Type was not found or was not a compile-time constant:Explode”
    I’ve tried to fool with project properties/path thinking the main mxml is just not finding the other as files, to no avail.

    Any ideas what I’m missing here? Looks like others have had no problem.

  15. sho

    Are you using the beta 3 player?

    As to Tom’s problem.. I’m curious to track down the issue. Are other people running into the same issue as Tom?

  16. Pica Pica

    Yes to beta 3. Trying to see if something in my properties is screwing me up.

  17. Pica Pica

    I’m just not finding the namespace and/or subdirectories.
    I imported projects such that they look like the following:

    http://www.picaza.net/flexerr.gif

  18. Pica Pica

    OK, got explode to work via changing package references from sho.x to src.show.x

    Will try same for the drawers.

  19. Merritt

    Can someone help provide an example of how to use the dataProvider function to populate the string values for the autocomplete component? I’d like to populate it with names from a cf query.

    Many thanks!

    Merritt

  20. milan

    hi, I’m just curious if you plan to upgrade your examples to production version? thanks, Milan

  21. Mateo

    Hello,

    I remember these drawers from back in beta 2. Great work! Do you have any idea how to upgrade the source for the released version? thanks in advance!

    Mateo

  22. JD

    Hello,
    I love the sliding drawers! Is there a way to set the “tacked” option on initialization?

    In other words when the program starts I want one of the drawers to be floating there (it will be the main menu) and then when a user clicks on a button the sliding drawer will then move to the side of the screen and become “hidden” until the user hovers on that side of the screen.

    Any help would be appreciated. Mail: peaccedog at gmail dot com

  23. Nate

    I didn’t see this commented yet, so pardon me if this is redundant.

    In CompletionInput 0.7, when setting the dataProvider after the control is initialized, I had to add the following to the setter for the dataProvider:
    sortedCandidatesDirty = true;

    Before when I would type into the control I would get nothing, now it appears to be working.

  24. Nate

    PS. Thanks for the great component!

  25. Dusty Jewett :: Drawer Demo

    […] So I’ve updated some code for the DrawerDemo found here: http://kuwamoto.org/2006/05/11/example-code-updated-for-beta-3/ […]

  26. Phillip Kerman

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mx.containers::Panel/mx.containers:Panel::layoutChrome()
    at mx.core::Container/mx.core:Container::updateDisplayList()
    at mx.containers::Panel/mx.containers:Panel::updateDisplayList()
    at mx.core::UIComponent/validateDisplayList()
    at mx.core::Container/validateDisplayList()
    at mx.managers::LayoutManager/::validateDisplayList()
    at mx.managers::LayoutManager/::doPhasedInstantiation()
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/::callLaterDispatcher2()
    at mx.core::UIComponent/::callLaterDispatcher()

  27. Mark

    Trying to get sliding drawers to run in flex 2.0.1 None of the examples work and when I downlaod the code and try and run I get errors.

    Could not resolve to a component implementation.

  28. Mark

    We did get the drawer working. Are any updates being made to the drawer or auto complete components??

  29. Kalyan

    Hi,
    The sliding drawer is a slick component!. I was trying to instantiate the slider through the click of a button, but havent quite figured a way out yet. Could you please throw some light on this. Thnx!.

  30. Kalyan

    there u go…just got the slider working with a click event!.nm for the earlier post. awesome component!. thx sho.

  31. Sonny

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mx.containers::Panel/mx.containers:Panel::layoutChrome()
    at mx.core::Container/mx.core:Container::updateDisplayList()
    at mx.containers::Panel/mx.containers:Panel::updateDisplayList()
    at mx.core::UIComponent/validateDisplayList()
    at mx.core::Container/validateDisplayList()
    at mx.managers::LayoutManager/::validateDisplayList()
    at mx.managers::LayoutManager/::doPhasedInstantiation()
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/::callLaterDispatcher2()
    at mx.core::UIComponent/::callLaterDispatcher()

    hi,igot that error,did anyone know why this happend?

  32. Venkata Guru

    Hi,
    Iam using the ” CompletionInput ” . The component is not working with DataProvider. Can you please help me, how to use that with a DataProvider.

    Regards,
    Guru

  33. Rafael Ochoa

    Hello, great components. I need to know How may I call the drawer without mouse movement?? with a click on a buttom for example?? thanks

  34. WS-Blog » Quick tip: Avoid issues using Adobes AutoComplete Input component using Flex 3

    […] There are several Flex components for handling auto completion out there, for example components called CompletionInput, Autocomplete TextInput or Adobes AutoComplete Input. For a current Flex 3 based project I decided to use Adobes component and had the following issue: […]

  35. Amanda

    Thank you SO much for a great auto complete component! I couldn’t get any of the others out there to work for me but yours did the trick. One thing, I did have to import the ContextMenuItem class for it to work properly.

    Thanks again – cheers!
    Amanda

  36. Nitin

    Hi,

    I have seen your AutoComplete Input sample. Its really a very good sample.
    I have fetched the data from webservice as an array and bind it to the CompletionInput dataprovider but the items of the array does not get populated in the Textbox.

    Can you pls help me regarding the same.

    Thanks,
    Nitin

  37. Flex AutoComplete Component: a new take on an old standard… « Hillel Coren

    […] a couple of other AutoComplete components out there (most notably the ones from the Flex Team and kuwamoto.org), neither of them had the features we were looking for. I struggled for a while trying to extend […]

  38. prashant shelke

    Nice component.

    Can you please provide any help on autoComplete combo instead of TextInput. I am trying to use this nice feature with editable comboBox.

    Great work!

    Thanks.

  39. Composant Flex - AutoCompletion sur un champ Texte (AutoComplete TextInput) - Adobe Flex Tutorial - Tutoriaux Flex Builder, MXML, ActionScript, AS3

    […] CompleteInput sur kuwamoto.org […]

  40. littleMuscle

    I read that to use a dataprovider with the CompletionInput control one can add sortedCandidatesDirty = true; to the setter for the dataProvider (response 23 – Nate). Can anyone help me do this.

  41. sushant

    Hi,

    Can Any body help me about using completion function

    Thanks,

    Sushant

  42. Umer Khan

    Hey,

    I need your help, its urgent
    I am using it on datagrid, as editItemRender , but the problem is if I click on list even on scroll bar list disappear, seems datagrid is not taking whole component as item render bcoz ListBox is just virtual appear , can you please help me.
    Also selecting any item from item through mouse doesn’t impact.

  43. Advanced Combobox. » free icons download

    […] its still in beta it works very well for me plus you can easily modify src to fit your needs, http://kuwamoto.org/2006/05/11/example-code-updated-for-beta-3/ ||| This is so close I can smell it. I have been tweeking the AutoComplete custom control suggested […]

  44. tremendous time

    Hi there! I’m at work surfing around your blog from my new iphone!
    Just wanted to say I love reading through your blog and
    look forward to all your posts! Keep up the superb work!

    Feel free to surf to my web-site; tremendous time

  45. gold bullion

    For sure, you must do your research effectively and examine notes
    as to be able to come up with the most effective deal to sell gold coins.

  46. Atlantic Yacht and Ship

    hello!,I love your writing very a lot! proportion we be in contact more about your post on AOL?
    I require an expert in this house to resolve my
    problem. Maybe that’s you! Looking forward to look
    you.

  47. Reputation management Folsom

    Prwtty component too content. I jst stumbled upon your
    bloog and iin accession capital to claim that I get actually enjoyed account your
    weblog posts. Any way I wijll be subscribing on your feewds
    and eve I success you get right of entry to consistenntly quickly.

  48. scirraconstruct2r208businesslicense.blogspot.com

    I am now going to uninstall the game and a tiny
    piece of me will die with it. You monsters.

  49. general contractor license florida

    Brege was initially fined for not having a building allow and working
    without a license in the City of Lockport.

  50. www.facebook.com

    Target your website content for a customers’ interests.
    Are you currently investing in internet search engine rankings
    rather than getting the desired results. There are many elements you have to consider
    when looking to optimize your web site for search engine optimization agency (http://www.facebook.com) engines including keyword density, keyword prominence and
    inbound links. People search in many ways; hence, there are
    many ways to drive searches.

Leave a Reply