Re: [Flashcoders] Easing a selection
Or indeed use a timer and increase the delay after every time it ends calls the function; until it passes a condition that stops it. Zeh Fernando wrote: There's maybe some elegant way to do that with normal Timers, or maybe to wrap around a function to make TweenLite use it, but if you're in a hurry, Tweener does that with the (slightly) cryptic addCaller() method: http://hosted.zeh.com.br/tweener/docs/en-us/methods/Tweener_addCaller.html Zeh On Thu, Nov 6, 2008 at 7:14 PM, Eric E. Dolecki [EMAIL PROTECTED] wrote: I am after tweening events more than the actual position of a selector. ie. class.increment(); short pause class.increment(); slightly longer pause class.increment(); even longer pause... until stop So I would be providing a UI of selected items via visual easing. I think I have this nailed down... just wanted to get some other ideas on how best to approach it. On Thu, Nov 6, 2008 at 4:38 PM, sebastian [EMAIL PROTECTED] wrote: Erm, I am not sure I understand; so let me paraphrase: You want to scroll one area based on the position of a mouse in another, right? If so, just measure the bounds [x/y difference] from some center range and apply a Tween to the area you want to scroll. BTW: I would generally always recommend against using timers to apply movements; I've seen far too much code written that uses timers incorrectly and it's a real pain in the *** Stick to simple tween calls; like: TweenLite. With kind, Sebastian. Eric E. Dolecki wrote: I was thinking about this the other day... easing of a selection of items in a list. Now, one could move a selector with a mouse, and then kind of throw it and then check the onUpdate of it's single ease (use speed as the determination for how far it should travel) to check if it's within the bounds of an item, and highlight that item, deselecting the previous item. That approach works and is probably the easiest. But what if you wanted to use an index of items use an easing approach (or something that looked like it) where the items themselves had a selector clip within them... so you wouldn't be moving a selector item under them all, but affecting them in order with easing. What might be a good approach for something like that? Perhaps a timer with a reverse damping interval? What might that look like as a good approach. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- http://ericd.net Interactive design and development ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Easing a selection
Just an idea - you could use TweenLite with an onUpdate to do something like: var frequency:Number = 0.05; //number between 0 and 1 indicating how often your function should get called over the course of time var myObject:Object = {progress:0}; var nextTrigger:Number = frequency; TweenLite.to(myObject, 5, {progress:1, ease:Strong.easeIn, onUpdate:checkProgress}); function checkProgress():void { if (myObject.progress = nextTrigger) { myFunction(); nextTrigger = myObject.progress + frequency; } } Then you can swap out the easing equation with whichever one you want. Or build a custom ease with something like http://blog.greensock.com/customease/. And in the example, the tween lasts 5 seconds, but obviously change that to whatever you need. Warning: The updates are based on the frame rate, so this method does not guarantee that the function will get called at precise increments, nor does it guarantee that the function will be called a certain number of times, but since your stuff doesn't render inbetween frames anyway, I believe it should generally produce the results you're after (easing the time between function calls). If not, ignore this post - it was just an idea I had off the top of my head :) Jack -Original Message- From: Eric E. Dolecki [mailto:[EMAIL PROTECTED] Sent: Thursday, November 06, 2008 5:13 PM To: Flash Coders List Subject: Re: [Flashcoders] Easing a selection I use TweenLite daily, but I am not tweening the properties on a DisplayObject, I am easing the call of methods over time. I believe that a timer, setting the delay after each call, and based on a number of times to call might serve me well. On Thu, Nov 6, 2008 at 5:44 PM, sebastian [EMAIL PROTECTED] wrote: Oh do you mean easing? So as it approaches its destination it moves slower and slower? If so, there are many packages that already do this for you, so no need to reinvent the wheel. All you need to do is call it. One such package is TweenLite: http://blog.greensock.com/tweenliteas3/ Just set the easing equation to what ever curve you require, there is even a little flash app. that lets you pick parameters to copy-paste. Peace, Seb. Eric E. Dolecki wrote: I am after tweening events more than the actual position of a selector. ie. class.increment(); short pause class.increment(); slightly longer pause class.increment(); even longer pause... until stop So I would be providing a UI of selected items via visual easing. I think I have this nailed down... just wanted to get some other ideas on how best to approach it. On Thu, Nov 6, 2008 at 4:38 PM, sebastian [EMAIL PROTECTED] wrote: Erm, I am not sure I understand; so let me paraphrase: You want to scroll one area based on the position of a mouse in another, right? If so, just measure the bounds [x/y difference] from some center range and apply a Tween to the area you want to scroll. BTW: I would generally always recommend against using timers to apply movements; I've seen far too much code written that uses timers incorrectly and it's a real pain in the *** Stick to simple tween calls; like: TweenLite. With kind, Sebastian. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Easing a selection
Erm, I am not sure I understand; so let me paraphrase: You want to scroll one area based on the position of a mouse in another, right? If so, just measure the bounds [x/y difference] from some center range and apply a Tween to the area you want to scroll. BTW: I would generally always recommend against using timers to apply movements; I've seen far too much code written that uses timers incorrectly and it's a real pain in the *** Stick to simple tween calls; like: TweenLite. With kind, Sebastian. Eric E. Dolecki wrote: I was thinking about this the other day... easing of a selection of items in a list. Now, one could move a selector with a mouse, and then kind of throw it and then check the onUpdate of it's single ease (use speed as the determination for how far it should travel) to check if it's within the bounds of an item, and highlight that item, deselecting the previous item. That approach works and is probably the easiest. But what if you wanted to use an index of items use an easing approach (or something that looked like it) where the items themselves had a selector clip within them... so you wouldn't be moving a selector item under them all, but affecting them in order with easing. What might be a good approach for something like that? Perhaps a timer with a reverse damping interval? What might that look like as a good approach. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Easing a selection
I am after tweening events more than the actual position of a selector. ie. class.increment(); short pause class.increment(); slightly longer pause class.increment(); even longer pause... until stop So I would be providing a UI of selected items via visual easing. I think I have this nailed down... just wanted to get some other ideas on how best to approach it. On Thu, Nov 6, 2008 at 4:38 PM, sebastian [EMAIL PROTECTED] wrote: Erm, I am not sure I understand; so let me paraphrase: You want to scroll one area based on the position of a mouse in another, right? If so, just measure the bounds [x/y difference] from some center range and apply a Tween to the area you want to scroll. BTW: I would generally always recommend against using timers to apply movements; I've seen far too much code written that uses timers incorrectly and it's a real pain in the *** Stick to simple tween calls; like: TweenLite. With kind, Sebastian. Eric E. Dolecki wrote: I was thinking about this the other day... easing of a selection of items in a list. Now, one could move a selector with a mouse, and then kind of throw it and then check the onUpdate of it's single ease (use speed as the determination for how far it should travel) to check if it's within the bounds of an item, and highlight that item, deselecting the previous item. That approach works and is probably the easiest. But what if you wanted to use an index of items use an easing approach (or something that looked like it) where the items themselves had a selector clip within them... so you wouldn't be moving a selector item under them all, but affecting them in order with easing. What might be a good approach for something like that? Perhaps a timer with a reverse damping interval? What might that look like as a good approach. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- http://ericd.net Interactive design and development ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Easing a selection
Oh do you mean easing? So as it approaches its destination it moves slower and slower? If so, there are many packages that already do this for you, so no need to reinvent the wheel. All you need to do is call it. One such package is TweenLite: http://blog.greensock.com/tweenliteas3/ Just set the easing equation to what ever curve you require, there is even a little flash app. that lets you pick parameters to copy-paste. Peace, Seb. Eric E. Dolecki wrote: I am after tweening events more than the actual position of a selector. ie. class.increment(); short pause class.increment(); slightly longer pause class.increment(); even longer pause... until stop So I would be providing a UI of selected items via visual easing. I think I have this nailed down... just wanted to get some other ideas on how best to approach it. On Thu, Nov 6, 2008 at 4:38 PM, sebastian [EMAIL PROTECTED] wrote: Erm, I am not sure I understand; so let me paraphrase: You want to scroll one area based on the position of a mouse in another, right? If so, just measure the bounds [x/y difference] from some center range and apply a Tween to the area you want to scroll. BTW: I would generally always recommend against using timers to apply movements; I've seen far too much code written that uses timers incorrectly and it's a real pain in the *** Stick to simple tween calls; like: TweenLite. With kind, Sebastian. Eric E. Dolecki wrote: I was thinking about this the other day... easing of a selection of items in a list. Now, one could move a selector with a mouse, and then kind of throw it and then check the onUpdate of it's single ease (use speed as the determination for how far it should travel) to check if it's within the bounds of an item, and highlight that item, deselecting the previous item. That approach works and is probably the easiest. But what if you wanted to use an index of items use an easing approach (or something that looked like it) where the items themselves had a selector clip within them... so you wouldn't be moving a selector item under them all, but affecting them in order with easing. What might be a good approach for something like that? Perhaps a timer with a reverse damping interval? What might that look like as a good approach. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Easing a selection
I do not understand a word.What are selectors ? You just want to have pauses with different lengths between function calls? Like another one said: use tweenlite (e.g) and use delay or tween groups. Eric E. Dolecki schrieb: I am after tweening events more than the actual position of a selector. ie. class.increment(); short pause class.increment(); slightly longer pause class.increment(); even longer pause... until stop So I would be providing a UI of selected items via visual easing. I think I have this nailed down... just wanted to get some other ideas on how best to approach it. On Thu, Nov 6, 2008 at 4:38 PM, sebastian [EMAIL PROTECTED] wrote: Erm, I am not sure I understand; so let me paraphrase: You want to scroll one area based on the position of a mouse in another, right? If so, just measure the bounds [x/y difference] from some center range and apply a Tween to the area you want to scroll. BTW: I would generally always recommend against using timers to apply movements; I've seen far too much code written that uses timers incorrectly and it's a real pain in the *** Stick to simple tween calls; like: TweenLite. With kind, Sebastian. Eric E. Dolecki wrote: I was thinking about this the other day... easing of a selection of items in a list. Now, one could move a selector with a mouse, and then kind of throw it and then check the onUpdate of it's single ease (use speed as the determination for how far it should travel) to check if it's within the bounds of an item, and highlight that item, deselecting the previous item. That approach works and is probably the easiest. But what if you wanted to use an index of items use an easing approach (or something that looked like it) where the items themselves had a selector clip within them... so you wouldn't be moving a selector item under them all, but affecting them in order with easing. What might be a good approach for something like that? Perhaps a timer with a reverse damping interval? What might that look like as a good approach. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Easing a selection
I use TweenLite daily, but I am not tweening the properties on a DisplayObject, I am easing the call of methods over time. I believe that a timer, setting the delay after each call, and based on a number of times to call might serve me well. On Thu, Nov 6, 2008 at 5:44 PM, sebastian [EMAIL PROTECTED] wrote: Oh do you mean easing? So as it approaches its destination it moves slower and slower? If so, there are many packages that already do this for you, so no need to reinvent the wheel. All you need to do is call it. One such package is TweenLite: http://blog.greensock.com/tweenliteas3/ Just set the easing equation to what ever curve you require, there is even a little flash app. that lets you pick parameters to copy-paste. Peace, Seb. Eric E. Dolecki wrote: I am after tweening events more than the actual position of a selector. ie. class.increment(); short pause class.increment(); slightly longer pause class.increment(); even longer pause... until stop So I would be providing a UI of selected items via visual easing. I think I have this nailed down... just wanted to get some other ideas on how best to approach it. On Thu, Nov 6, 2008 at 4:38 PM, sebastian [EMAIL PROTECTED] wrote: Erm, I am not sure I understand; so let me paraphrase: You want to scroll one area based on the position of a mouse in another, right? If so, just measure the bounds [x/y difference] from some center range and apply a Tween to the area you want to scroll. BTW: I would generally always recommend against using timers to apply movements; I've seen far too much code written that uses timers incorrectly and it's a real pain in the *** Stick to simple tween calls; like: TweenLite. With kind, Sebastian. Eric E. Dolecki wrote: I was thinking about this the other day... easing of a selection of items in a list. Now, one could move a selector with a mouse, and then kind of throw it and then check the onUpdate of it's single ease (use speed as the determination for how far it should travel) to check if it's within the bounds of an item, and highlight that item, deselecting the previous item. That approach works and is probably the easiest. But what if you wanted to use an index of items use an easing approach (or something that looked like it) where the items themselves had a selector clip within them... so you wouldn't be moving a selector item under them all, but affecting them in order with easing. What might be a good approach for something like that? Perhaps a timer with a reverse damping interval? What might that look like as a good approach. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- http://ericd.net Interactive design and development ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Easing a selection
There's maybe some elegant way to do that with normal Timers, or maybe to wrap around a function to make TweenLite use it, but if you're in a hurry, Tweener does that with the (slightly) cryptic addCaller() method: http://hosted.zeh.com.br/tweener/docs/en-us/methods/Tweener_addCaller.html Zeh On Thu, Nov 6, 2008 at 7:14 PM, Eric E. Dolecki [EMAIL PROTECTED] wrote: I am after tweening events more than the actual position of a selector. ie. class.increment(); short pause class.increment(); slightly longer pause class.increment(); even longer pause... until stop So I would be providing a UI of selected items via visual easing. I think I have this nailed down... just wanted to get some other ideas on how best to approach it. On Thu, Nov 6, 2008 at 4:38 PM, sebastian [EMAIL PROTECTED] wrote: Erm, I am not sure I understand; so let me paraphrase: You want to scroll one area based on the position of a mouse in another, right? If so, just measure the bounds [x/y difference] from some center range and apply a Tween to the area you want to scroll. BTW: I would generally always recommend against using timers to apply movements; I've seen far too much code written that uses timers incorrectly and it's a real pain in the *** Stick to simple tween calls; like: TweenLite. With kind, Sebastian. Eric E. Dolecki wrote: I was thinking about this the other day... easing of a selection of items in a list. Now, one could move a selector with a mouse, and then kind of throw it and then check the onUpdate of it's single ease (use speed as the determination for how far it should travel) to check if it's within the bounds of an item, and highlight that item, deselecting the previous item. That approach works and is probably the easiest. But what if you wanted to use an index of items use an easing approach (or something that looked like it) where the items themselves had a selector clip within them... so you wouldn't be moving a selector item under them all, but affecting them in order with easing. What might be a good approach for something like that? Perhaps a timer with a reverse damping interval? What might that look like as a good approach. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- http://ericd.net Interactive design and development ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders