[Tweener] LOST

Christian Pugliese pugliese at gmail.com
Sun Jul 11 03:59:29 PDT 2010


Hi...
well not sure how you set your x/y but you could do it in a while loop...

for initial position, you could set it on the stage, or accessing direct the
obj properties:
clipend2.alpha = 0;
txt1.x = 79;
txt1.y = -22.2;

for the animations there are more than a way, one of them is making an array
with all your clips, and calling the function wherever you want..

var clips:Array = [clipend1, clipend2, txt1, etc etc];

function animate( obj:DisplayObject, obj_time:Number, obj_delay:Number,
obj_x:Number, obj_y:Number):void
{
      Tweener.addTween( obj ,{time:obj_time, delay:obj_delay,
transition:"easeOutBounce", x:obj_x, y:obj_y});
}

then wherever in you move you want to animate something:
while( i > 0)
{
  var objDelay:Number = .5;
  var objTime:Number = 1;
  animate( clips[i], i*objTime, i*objDelay, X_POS, Y_POS )
  i++;
}

i dunno how you set you x/y so this only would word if you find a way to
pre-define these.

hope it helps.. cheers.


Christian Pugliese
Interactive Designer & Developer
chris at chrisid.com
www.chrisid.com
+44 07836 564 955




On 11 July 2010 04:25, Xiongmao <wodexiongmao at gmail.com> wrote:

> Hi Christian !
>
> Thank you so much for your reply :
>
> Here's an example of code I make when I code animation, this one was for a
> banner, mainly letters animation :
>
>
> import caurina.transitions.Tweener;
> import caurina.transitions.properties.CurveModifiers;
>
> var startanim:Function = function():void {
> //setting initial position
> Tweener.addTween(clipend2, {alpha:0, time:0, delay:0,
> transition:"easeInQuad"});
> Tweener.addTween(clipend1, {alpha:0, time:0, delay:0,
> transition:"easeInQuad"});
> Tweener.addTween(txt1,{time:0, delay:0, transition:"easeOutBounce",
> rotation:0, x:79, y:-22.2});
> Tweener.addTween(txt2,{time:0, delay:0, transition:"easeOutBounce",
> rotation:0, x:583.2, y:12});
> Tweener.addTween(txt3,{time:0, delay:0, transition:"easeOutBounce",
> rotation:0, x:603.0, y:39.1});
> Tweener.addTween(txt4,{time:0, delay:0, transition:"easeOutBounce",
> rotation:0, x:747.6, y:39.1});
> Tweener.addTween(txt5,{time:0, delay:0, transition:"easeOutBounce",
> rotation:0, x:859.2, y:39.1});
> Tweener.addTween(txt6,{time:0, delay:0, transition:"easeOutBounce",
> rotation:0, x:960, y:39.1});
> Tweener.addTween(txt7,{time:0, delay:0, transition:"easeOutBounce",
> rotation:-78.7154541015625, x:-33.6});
> trace (txt7.rotation);
>
> //start play
> Tweener.addTween(txt1,{time:2, delay:0, transition:"easeOutBounce", x:79,
> y:12});
> Tweener.addTween(txt2,{time:1, delay:2, transition:"easeOutBounce", x:328,
> y:12});
> Tweener.addTween(txt3,{time:1, delay:4, transition:"easeOutBounce", x:79,
> y:39.1});
> Tweener.addTween(txt4,{time:1, delay:5, transition:"easeOutBounce",
> x:227.6, y:39.1});
> Tweener.addTween(txt5,{time:1, delay:6, transition:"easeOutBounce",
> x:339.1, y:39.1});
> Tweener.addTween(txt6,{time:1, delay:7, transition:"easeOutBounce", x:440,
> y:39.1});
>
>
> Tweener.addTween(txt7, {rotation:0, x:79, time:0.8, delay:9,
> transition:"easeOutBounce"});
> trace (txt7.rotation);
> Tweener.addTween(txt1, {rotation:1, y:60, time:1, delay:8.9,
> transition:"easeOutBounce"});
> Tweener.addTween(txt2, {rotation:2, y:60, time:1, delay:8.9,
> transition:"easeOutBounce"});
> Tweener.addTween(txt3, {rotation:2, y:60, time:1, delay:8.9,
> transition:"easeOutBounce"});
> Tweener.addTween(txt4, {rotation:-2, y:-10, time:1, delay:8.9,
> transition:"easeOutBounce"});
> Tweener.addTween(txt5, {rotation:2, y:60, time:1, delay:8.9,
> transition:"easeOutBounce"});
> Tweener.addTween(txt6, {rotation:2, y:60, time:1, delay:8.9,
> transition:"easeOutBounce"});
> Tweener.addTween(clipend1, {alpha:100, time:3, delay:12,
> transition:"easeInQuad"});
> Tweener.addTween(clipend2, {alpha:100, time:5, delay:15,
> transition:"easeInQuad", onComplete:startanim});
>
> //Tweener.addTween(txt1, {rotation:370, time:1,
> transition:"easeinoutquad"});
> //Tweener.addTween(txt1, {scaleX:1.5, scaleY:0.5, time:0.33, delay:8,
> transition:"easeinoutquad"});
> //Tweener.addTween(txt1, {scaleX:0.5, scaleY:1.5, time:0.33, delay:8,
> transition:"easeinoutquad"});
> //Tweener.addTween(txt1, { scaleX:1.5, scaleY:1.5, time:0.34, delay:8,
> transition:"easeinoutquad"});
>
>
>
> };
> startanim();
> linksite.buttonMode = true;
> linksite.addEventListener(MouseEvent.CLICK, onClick);
>
> function onClick(evt:MouseEvent):void {
> var url:String = "http://www.wbsitelink.com";
> var request:URLRequest = new URLRequest(url);
>
> }
>
> stop();
>
>
> On 11 Jul 2010, at 6:04 AM, Christian Pugliese wrote:
>
> could you post a sample of your code?
>
>
>
>
> On 10 July 2010 16:12, Xiongmao <wodexiongmao at gmail.com> wrote:
>
>> Hi,
>>
>> I am using Tweener for moving a numbers of objects.
>> After making moving a few number of objects I am always facing to the same
>> problem:
>> I get a lots of code for each animated object and synchronizing them is
>> asking me to edit so many numbers in my code that I get lost and confused.
>>
>> What is the best way to code with tweener and make simple code to keep
>> animation editing easy ?
>>
>> Best regards,
>> Julien
>>
>>
>> _______________________________________________
>> Tweener mailing list
>> Tweener at lists.caurinauebi.com
>> http://lists.caurinauebi.com/listinfo.cgi/tweener-caurinauebi.com
>>
>
>
>
> --
> Christian Pugliese
> Interactive Designer & Developer
> chris at chrisid.com
> www.chrisid.com
> +44 07836 564 955
> _______________________________________________
> Tweener mailing list
> Tweener at lists.caurinauebi.com
> http://lists.caurinauebi.com/listinfo.cgi/tweener-caurinauebi.com
>
>
>
> _______________________________________________
> Tweener mailing list
> Tweener at lists.caurinauebi.com
> http://lists.caurinauebi.com/listinfo.cgi/tweener-caurinauebi.com
>
>


-- 
Christian Pugliese
Interactive Designer & Developer
chris at chrisid.com
www.chrisid.com
+44 07836 564 955
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/attachments/20100711/824943d0/attachment-0001.htm>


More information about the Tweener mailing list