August 30th, 2007 by Kyle
Posted in: Flex

I had a customer who asked for help in modifying the Accordion component to change panes when a user moused over a pane header rather than when clicked upon. It turns out that this was a fairly straight forward modification.
In my extension to accordion upon child add, I merely add an eventlistenr to each child’s header, listening for mouseOver events and responding to them by dispatching a click event. Everything else just fall into place, since things are already wired to respond to the click event.

Here is my extension to accordion:

<?xml version="1.0"?>
<mx:Accordion xmlns:mx="http://www.adobe.com/2006/mxml"
childAdd="onChildAdd(event)">
   
    <mx:Script>
        <![CDATA[
            import mx.containers.accordionClasses.AccordionHeader;
            import mx.containers.Accordion;
       
            private function onChildAdd(e:Event):void{
                var a:Accordion = e.target as Accordion;
                var header:AccordionHeader=a.getHeaderAt(acc.numChildren-1) as AccordionHeader;
                header.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
            }
           
            private function onMouseOver(e:MouseEvent):void{
                (e.target as AccordionHeader).dispatchEvent(new MouseEvent(MouseEvent.CLICK));
            }

           
        ]]>
    </mx:Script>
</mx:Accordion>
 

Here is the simple app that demonstrates this functionality:

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*">

    <MyAccordion id="accordion1" height="450">

        <mx:Form id="shippingAddress" label="1. Shipping Address">

            <mx:FormItem id="sfirstNameItem" label="First Name">
                <mx:TextInput id="sfirstName"/>
            </mx:FormItem>

            <!– Additional contents goes here. –>

        </mx:Form>

        <mx:Form id="billingAddress" label="2. Billing Address">
            <!– Form contents goes here. –>
        </mx:Form>

        <mx:Form id="creditCardInfo" label="3. Credit Card Information">
            <!– Form contents goes here. –>
        </mx:Form>

        <mx:Form id="submitOrder"   label="4. Submit Order">
            <!– Form contents goes here. –>
        </mx:Form>

    </MyAccordion>
</mx:Application>
 


Here is a link to a Flex Builder 2.0.1 project
(compiled with SDK hotfix2) containing a sample demonstrating the solution described above.


1 Comment »

August 2nd, 2007 by Kyle
Posted in: Flex Data Services

Here is a post by the Flex Doc team on their blog that is very useful:

Real Time Messaging channels in LCDS ES

It should help customer’s with configuration questions regarding dataservices and rtmp/t channels when using firewalls and load balancing software.

HTH

-Kyle


No Comments »


Professional Medicines, Online Pharmacy buy clomid buy viagra buy cialis buy tramadol buy soma buy levitra buy propecia buy ultram buy acomplia buy phentermine buy xenical buy kamagra Online Pharmacy Products
cialis consultation delivery discount health man cialis cialis forum cialis side eefects low cost generic generic cialis pills effectiveness viagra levitra cialis cheapest generic viagra and cialis pills cat 6 cialis bargain levitra levitra cialis dysfunction erectile levitra viagra 2003 cyalis levitra market sales viagra clarinex stimula levitra aldara pay pal order diflucan viagra, cialis, levitra, diflucan, clomid buy generic soma dream levitra online order pharmaceutical zithromax price soma prescriber information soma aura soma color therapy essences soma carisoprodol 350mg soma restaurant scottsdale buy pfizer viagra viagra buying online story viagra viagra before and after viagra substituts modo de empleo viagra viagra suppositories side effects viagra testemonials viagra videos