I still can't set bubbles = true, though... bleh.... ----- Original Message ----- From: "Renaun Erickson" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Thursday, November 10, 2005 7:39 PM Subject: [flexcoders] Re: Dynamic Events (Flex2 Custom Events?)
To add arbitrary properties ... Getting tired ;) Renaun --- In [email protected], "Renaun Erickson" <[EMAIL PROTECTED]> wrote: > > FLEX 2: > To added Arbitary properties to the Event object what you can do is > create your custom Event class that extends the flash.events.Event like: > > package org.nevis.cairngorm.samples.store.view.checkout { > import flash.events.Event; > > public class ShippingCostChangeEvent extends Event { > public var cost : Number; > } > } > > Then in the MXML you access it like: > > <mx:Metadata> > [Event( name = "shippingCostChange", type = > "org.nevis.cairngorm.samples.store.view.checkout.ShippingCostChangeEvent" > )] > </mx:Metadata> > > <mx:Button label="Continue" click="dispatchEvent( { type : > "shippingCostChange", cost : cost} );" /> > > You could also instantiate your custom class first and pass that > through the dispatchEvent. > > Not sure if this is what you were asking about. > > Renaun > > --- In [email protected], "Mark Wales" <[EMAIL PROTECTED]> wrote: > > > > > > Has anyone used them? I've been a bit confused by several things: > > > > DynamicEvent is a subclass (according to the documentation) of > > flash.events.Event but is actually found in mx.events. > > > > In addition, the documentation describes how you can add arbitrary > > properties at runtime. However, experimenting with it, it does not > > appear this works. > > > > Is this simply a function of it being an alpha, am I doing something > > wrong, or is something else amiss?? > > > > -Mark > > > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

