<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">It's a bit confusing to me. Is the issue that you want to be able to make a tween object "restart" when start() is called, but somehow OverlapMonitor is killing the tween when you do that?&nbsp;<div><br></div><div>Actually this could potentially also be a weirdness in LInearGo, since restarting an active tween doesn't necessarily need to call stop() and remove it from the engine, then add it back to the engine. Maybe that's what's causing it...<div><div><div><div><br></div><div><br><div>On Apr 5, 2008, at 4:32 AM, Robert Sköld wrote:<br class="Apple-interchange-newline"><blockquote type="cite">Thanks, altough i did figure out a much better way to "lock" those &nbsp;<br>tweens. Instead of messing with the manager parts (which works great &nbsp;<br>for it's own purpose btw) I've just overidden the stop method, and &nbsp;<br>just let it return false unless it's complete (or the variable locked &nbsp;<br>is false).<br><br>example:<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>override public function stop() : Boolean {<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>return ( _locked &amp;&amp; !_complete ) ? false : super.stop();<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>}<br><br>I totally stared myself blind at first at the overlapmonitor, but i &nbsp;<br>must say it works great!<br><br>So thanks for Go! :)<br><br>/bob<br><br>On Apr 5, 2008, at 03:49, Moses Gunesch wrote:<br><blockquote type="cite">I dunno that's a tough one... personally I wouldn't guess that &nbsp;<br></blockquote><blockquote type="cite">anything is a common issue yet, I haven't seen many people dabbling &nbsp;<br></blockquote><blockquote type="cite">in manager mechanics so far. I'm excited to see what you come up &nbsp;<br></blockquote><blockquote type="cite">with though and once I get this writing thing out of the way I'll &nbsp;<br></blockquote><blockquote type="cite">help you debug if need be.<br></blockquote><blockquote type="cite">- m<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Apr 3, 2008, at 5:29 AM, Robert Sköld wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Hey all!<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">First of all, i've manage to "fix" the tweens i had issues with<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">earlier by using the OverlapMonitor instead of the self-made hack i<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">did. It works great, but...<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I'm trying to add a "locking" feature to the tweens, so that if they<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">have locked="true" as an attribute (it's an xml-based parser) it's &nbsp;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">not<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">supposed to be "overridden" by the OverlapMonitor and other newer<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">tweens.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">And it's working somewhat ok, besides when the tween that overlaps &nbsp;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">"locked" tween is the same as the "locked" tween.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">For example: if the same tween is ran twice by clicking the same<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">button. Then the tween "restarts" but from the same position, but &nbsp;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">with<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">the same duration. But not if i have another tween started from<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">another button which overlaps with the running "locked" tween.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">One problem seems to be that if the tween is the same as an already<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">running tween it is stopped/removed even before it's "managed", so<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">there's no way to stop it from being overridden.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I'm sure this must be a common issue, so any suggestions on how to<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">solve this?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Some code (the IManageable part) from my Animate class (the rest is<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">more or less the tutorial, but with some color transformation stuff):<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>public function getActiveTargets() : Array {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>return [ target ];<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>public function getActiveProperties() : Array {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>return _properties;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>public function isHandling( properties : Array , handler :<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">IManageable ) : Boolean {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>return properties.every( hasProperty );<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>private function hasProperty( property : Property , index : int ,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">arr : Array ) : Boolean {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>for each( var prop : Property in _properties ) // Property is a<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">local class with name,start,change and end properties.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>if( prop.name == property.name )<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>return true;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>return false;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>public function releaseHandling( ...params ) : void {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>var handler : Animate = params[0] as Animate; // added the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">parameter in OverlapMonitor.reserve();<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>if( _locked ) {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>// Since the handler didn't start yet, we need to remove it<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">instead of stopping it.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>trace( "Handler removed: " + GoEngine.removeItem( handler ) ,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">"id:" + handler.id );<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>} else {<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>trace( "Target stop: " + stop() , "for" , this.id );<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>}<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Any help would be much appreciated!<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">/ bob<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">GoList mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:GoList@goasap.org">GoList@goasap.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://goasap.org/mailman/listinfo/golist_goasap.org">http://goasap.org/mailman/listinfo/golist_goasap.org</a><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">GoList mailing list<br></blockquote><blockquote type="cite"><a href="mailto:GoList@goasap.org">GoList@goasap.org</a><br></blockquote><blockquote type="cite"><a href="http://goasap.org/mailman/listinfo/golist_goasap.org">http://goasap.org/mailman/listinfo/golist_goasap.org</a><br></blockquote><br><br>_______________________________________________<br>GoList mailing list<br><a href="mailto:GoList@goasap.org">GoList@goasap.org</a><br><a href="http://goasap.org/mailman/listinfo/golist_goasap.org">http://goasap.org/mailman/listinfo/golist_goasap.org</a><br></blockquote></div><br></div></div></div></div></div></body></html>