11
May
2006

Example code updated for beta 3

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]

35 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

Leave a Reply