Tweening _width and _height independently 2004-03-20 - By Mike Britton
Back How would I tween the _width and _height of MovieClip 'canvas_mc' independently given the scenario below? I don't always want my scaling to be uniform for each dimension.
import mx.effects.* import mx.transitions.easing.*
listenerObject = new Object(); listenerObject.click = function(eventObject) { _root.tw = new Tween(_root, _root.canvas_mc._width, eventObject.target.label, 700); _root.tw.easingEquation = Bounce.easeOut; } btn0.addEventListener("click", listenerObject); btn1.addEventListener("click", listenerObject); btn2.addEventListener("click", listenerObject);
this.onTweenUpdate = function(value) { for (var i=0; i<80; i++) { this.canvas_mc._width = value; this.canvas_mc._height = value; } }
Regards,
Mike Britton
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Supported by Fig Leaf Software =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Be sure to check the archives and the wiki: http://chattyfig.figleaf.com/ =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:107540 =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe send a blank e-mail to: Normal Mode: flashcoders-unsubscribe@(protected) Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|