actionscript 3 - How to Flash CS5 AS3 Random Elastic? -
i made photo gallery, every photo start come in with:
new tween(uiloader,"rotationx",elastic.easeout,90,0,4,true);
and it's cool if photos come in same way, it's little bit tiered @ it. want ask here code make random fade, blinds, iris, fly, dissolve, squeeze, wipe, zoom, rotationx, elastic.easeout???? here code:
function completehandler(event:event):void { uiloader.x = (back.width - uiloader.content.width) >> 1; uiloader.y = (back.height - uiloader.content.height) >> 1; new tween(uiloader,"rotationx",elastic.easeout,90,0,4,true); }
something ?
var properties:array = ['rotationx', 'rotationy', 'rotationz', 'rotation']; var eases:array = [elastic.easein, elastic.easeinout, elastic.easeout, bounce.easein, back.easeout]; function completehandler(event:event):void { uiloader.x = (back.width - uiloader.content.width) >> 1; uiloader.y = (back.height - uiloader.content.height) >> 1; new tween(mc, getrandom(properties), getrandom(eases), 90, 0, 4, true); } function getrandom(array:array):* { return array[math.floor(math.random() * array.length)]; }
edit :
i had @ doc (i usualy use greensock's tweens). should to: http://help.adobe.com/en_us/flashplatform/reference/actionscript/3/fl/transitions/tween.html
i edited code.
Comments
Post a Comment