Re: [Flashcoders] Panning and Sliding, using Tweens possible?
Yes, I have looked a bit at the Tween-classes, but I have some bad days in Flash at the moment. Looks like nothing want to work, and the IDE ain't helping either. Going nuts here. Things like when you press space the IDE give focus to the Output palette, or windows who disappear, weird responding document tabbar etc. Anyway I have worked on some old code which will do something like I want: function LORB( target ) { target._x = slideWidth - target._width; target._y = 0; unitX = ( slideWidth - target._width ) / totalFrames; unitY = ( slideHeight - target._height ) / totalFrames; target.onEnterFrame = function() { if ( currentFrame totalFrames ) { target._x = target._x - unitX; target._y = target._y + unitY; } else { delete target.onEnterFrame; } } } I am only clueless how you wrap something like into a equation for use with the Tween classes? Yours, Weyert de Boer I must admit I haven't looked at the Macromedia Tween classes, but surely this is very simple, just tween the _x and _y attribute of your clip. If not, look at any of the number of tween classes and managers out there (I recommend Fuse http://www.mosessupposes.com/Fuse or Zigo's Tween Manager http://laco.wz.cz/tween/ ), as they all have this functionality. Regards, Grant Cox Weyert de Boer wrote: I am curious if it's possible to use the Tween or TweenExtended class to make pan/slide animation. I mean something like you move a picture from the left bottom corner to the right top corner within the dimensions of the container movieclip. Yours, Weyert de Boer ___ 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
Re: [Flashcoders] Panning and Sliding, using Tweens possible?
MC Tween has a panTo command which does what you need (along with all the other standard tweens)... http://hosted.zeh.com.br/mctween/doc_panto.html On 6/27/06, Weyert de Boer [EMAIL PROTECTED] wrote: Yes, I have looked a bit at the Tween-classes, but I have some bad days in Flash at the moment. Looks like nothing want to work, and the IDE ain't helping either. Going nuts here. Things like when you press space the IDE give focus to the Output palette, or windows who disappear, weird responding document tabbar etc. Anyway I have worked on some old code which will do something like I want: function LORB( target ) { target._x = slideWidth - target._width; target._y = 0; unitX = ( slideWidth - target._width ) / totalFrames; unitY = ( slideHeight - target._height ) / totalFrames; target.onEnterFrame = function() { if ( currentFrame totalFrames ) { target._x = target._x - unitX; target._y = target._y + unitY; } else { delete target.onEnterFrame; } } } I am only clueless how you wrap something like into a equation for use with the Tween classes? Yours, Weyert de Boer I must admit I haven't looked at the Macromedia Tween classes, but surely this is very simple, just tween the _x and _y attribute of your clip. If not, look at any of the number of tween classes and managers out there (I recommend Fuse http://www.mosessupposes.com/Fuse or Zigo's Tween Manager http://laco.wz.cz/tween/ ), as they all have this functionality. Regards, Grant Cox Weyert de Boer wrote: I am curious if it's possible to use the Tween or TweenExtended class to make pan/slide animation. I mean something like you move a picture from the left bottom corner to the right top corner within the dimensions of the container movieclip. Yours, Weyert de Boer ___ 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 ___ 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
Re: [Flashcoders] Panning and Sliding, using Tweens possible?
Sorry - wrong one ;) One of the tween classes has a pan feature... will post if I find it. On 6/27/06, Mick G [EMAIL PROTECTED] wrote: MC Tween has a panTo command which does what you need (along with all the other standard tweens)... http://hosted.zeh.com.br/mctween/doc_panto.html On 6/27/06, Weyert de Boer [EMAIL PROTECTED] wrote: Yes, I have looked a bit at the Tween-classes, but I have some bad days in Flash at the moment. Looks like nothing want to work, and the IDE ain't helping either. Going nuts here. Things like when you press space the IDE give focus to the Output palette, or windows who disappear, weird responding document tabbar etc. Anyway I have worked on some old code which will do something like I want: function LORB( target ) { target._x = slideWidth - target._width; target._y = 0; unitX = ( slideWidth - target._width ) / totalFrames; unitY = ( slideHeight - target._height ) / totalFrames; target.onEnterFrame = function() { if ( currentFrame totalFrames ) { target._x = target._x - unitX; target._y = target._y + unitY; } else { delete target.onEnterFrame; } } } I am only clueless how you wrap something like into a equation for use with the Tween classes? Yours, Weyert de Boer I must admit I haven't looked at the Macromedia Tween classes, but surely this is very simple, just tween the _x and _y attribute of your clip. If not, look at any of the number of tween classes and managers out there (I recommend Fuse http://www.mosessupposes.com/Fuse or Zigo's Tween Manager http://laco.wz.cz/tween/ ), as they all have this functionality. Regards, Grant Cox Weyert de Boer wrote: I am curious if it's possible to use the Tween or TweenExtended class to make pan/slide animation. I mean something like you move a picture from the left bottom corner to the right top corner within the dimensions of the container movieclip. Yours, Weyert de Boer ___ 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 ___ 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
Re: [Flashcoders] Panning and Sliding, using Tweens possible?
I will try it out :) ___ 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
Re: [Flashcoders] Panning and Sliding, using Tweens possible?
Here's an old testclass of mine. It uses those custom easing equations from mx.transitions.easing.*; import mx.transitions.easing.*; import mx.utils.Delegate; class TweenTest { public static var fps:Number = 31; private var intervalID:Number; private var time:Number; private var obj:Object; private var prop:String; private var func:Function; private var begin:Number; private var finish:Number; private var duration:Number; private var useSeconds:Boolean; public function TweenTest() { _root.play_btn.onRelease = Delegate.create(this, startTween); _root.pauze_btn.onRelease = Delegate.create(this, pauzeTween); _root.stop_btn.onRelease = Delegate.create(this, stopTween); time = 0; obj = _root.mc; prop = _x; func = Strong.easeOut; begin = obj[prop]; finish = begin + 200; duration = Math.floor(2000/fps); useSeconds = true; } public function startTween() { clearInterval(intervalID); intervalID = setInterval(this, calc, Math.floor(1000/fps)); } public function stopTween() { clearInterval(intervalID); time = 0; obj[prop] = begin; } public function pauzeTween() { clearInterval(intervalID); // time is not reset } public function calc() { if (time duration) { obj[prop] = func.apply(null, [time++, begin, (finish-begin), duration]); } else stopTween(); } } 2006/6/27, Weyert de Boer [EMAIL PROTECTED]: I will try it out :) ___ 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
Re: [Flashcoders] Panning and Sliding, using Tweens possible?
definitely possible. i'm pretty new to actionscript so don't laugh, but this is what i've been using recently. mcButton.onRelease = function(){ new mx.transitions.Tween(mcTarget, _x, mx.transitions.easing.Strong.easeOut, 0, 600, 2, true); new mx.transitions.Tween(mcTarget, _y, mx.transitions.easing.Strong.easeOut, 600, 0, 2, true); } here are the parameters and what they mena: (mcTarget, _x, mx.transitions.easing.Strong.easeOut, 0, 600, 2, true) target, parameter, easing type, starting coordinate, ending coordinate, seconds or frames, true for use seconds and false for use frames On Jun 26, 2006, at 5:30 PM, Weyert de Boer wrote: I am curious if it's possible to use the Tween or TweenExtended class to make pan/slide animation. I mean something like you move a picture from the left bottom corner to the right top corner within the dimensions of the container movieclip. Yours, Weyert de Boer ___ 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] Panning and Sliding, using Tweens possible?
I am curious if it's possible to use the Tween or TweenExtended class to make pan/slide animation. I mean something like you move a picture from the left bottom corner to the right top corner within the dimensions of the container movieclip. Yours, Weyert de Boer ___ 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
Re: [Flashcoders] Panning and Sliding, using Tweens possible?
definitely possible. i'm pretty new to actionscript so don't laugh, but this is what i've been using recently. mcButton.onRelease = function(){ new mx.transitions.Tween(mcTarget, _x, mx.transitions.easing.Strong.easeOut, 0, 600, 2, true); new mx.transitions.Tween(mcTarget, _y, mx.transitions.easing.Strong.easeOut, 600, 0, 2, true); } (mcTarget, _x, mx.transitions.easing.Strong.easeOut, 0, 600, 2, true) target, parameter, easing type, starting coordinate, ending coordinate, seconds or frames, true for use seconds and false for use frames On Jun 26, 2006, at 5:30 PM, Weyert de Boer wrote: I am curious if it's possible to use the Tween or TweenExtended class to make pan/slide animation. I mean something like you move a picture from the left bottom corner to the right top corner within the dimensions of the container movieclip. Yours, Weyert de Boer ___ 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