Chris, going from Flash timeline to Flex is a bit of a mental shift. If I were you I would investigate what we call "states" which is represented by the <mx:state> tag in MXML. There is a .states array on each UIComponent if you're coding in AS. Anyway, to some degree, if you used the timeline as a state machine in Flash (as opposed to an animation frame engine) then you can create a "state" for each of your old timeline states. Then when you detect that the doc has expired you switch to the "expired" state that you've designed which might addChild some text over the document or whatever. -Alex
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Boosalis Sent: Monday, April 02, 2007 10:58 AM To: [email protected] Subject: Re: [flexcomponents] Simple Expiration Component Hi, Ralf: I presume I could and will research it. But, I'm stuck as far as how to code it. AS2 and Flash was more friendly, but pure Flex is a bit tough for me. Any code hints would be helpful, as I am really trying to learn no on in my area to ask. Thx. --- Ralf Bokelberg <[EMAIL PROTECTED] <mailto:ralf.bokelberg%40gmail.com> > wrote: > Hi Chris > > couldn't you use the Alert component for this? > Other possibilities are a ViewStack with > two views "expired" and "app", or states with > two different states "expired" and app. > > Cheers > Ralf. > > On 4/2/07, Chris Boosalis <[EMAIL PROTECTED] <mailto:boosalic%40yahoo.com> > > wrote: > > > > Basically, i want to make an expiration > component that > > I can reuse. I just would like to have something > to > > expire my drafts when I send them out. Nothing at > all > > fancy or even secure. > > > > Now, I'm having smashing success making simple > > components in Flex for login and email panels (the > > livedocs and other blogs have clear examples of > > those). But because I'm used to AS 2.0 and a > timeline, > > I'm having trouble with what I know is a baby > project > > (beneath everyone here). > > > > In Flash, I used to use simple code from LA Flash > with > > the timeline: > > > > theDate = new Date(); > > if (theDate.getFullYear() >= 2007) { > > if (theDate.getMonth() >= 1) { > > if (theDate.getDate() > 4) { > > gotoAndPlay("expired"); > > } > > } > > } > > > > But I am lost in Flex and AS3. I'm not sure what > > packages to import, whether the vars should be > public > > or private (or even how to state them, really), or > > what should be placed in between the mxml tags. I > > figure I will need a base state and an expired > state > > for my component, but getting there has been > really > > uphill. > > > > Any help would not only be helpful, but also quite > educational/merciful. > > > > > > > > -- > Ralf Bokelberg <[EMAIL PROTECTED] <mailto:ralf.bokelberg%40gmail.com> > > Flex & Flash Consultant based in Cologne/Germany > Phone +49 (0) 221 530 15 35 >
