What I am currently doing: ( works, just doesn't seem like the right thing to do )
var nScrollIntervalMS :Number = 70; some_mc.onPress = function(}{ clearInterval( foobar ); delete foobar; someFunction(); var nTime = 0; // Repeat if held down this.onEnterFrame = function(){ nTime++; // Click and Hold detected if( nTime > 20 ){ foobar = setInterval( stationUp, nScrollIntervalMS ); this.onEnterFrame = null; } }; }; some_mc.onRelease = function(}{ this.onEnterFrame = null; clearInterval( foobar ); delete foobar; } On 4/25/06, Lee McColl-Sylvester <[EMAIL PROTECTED]> wrote: > > I have one that sets a date onPress and a date onRelease, then compares > the date's getTime() to see how long it was pressed. Works for me, > though if you want to set a time during the press, an interval is > required. > > Lee > > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of eric > dolecki > Sent: 25 April 2006 13:55 > To: Flashcoders mailing list > Subject: [Flashcoders] press & hold > > wondered if anyone had an elegant press & hold function before I wrote > one > using enterFrame/interval stuff. > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com