• Home
  • About
  • Contact Us
  • Gallery
  • Video
  • Archives
  • Site Map
Grab the RSS feed

FlashBannerOnline

FlashBannerOnline
  • Home
  • FlashBannerOnline
  • Free Downloads
  • General
  • Tutorials
    • Adobe AIR
    • CSS
    • Fireworks
    • Flash
      • ActionScript
    • FLEX
    • Javascript
      • JQuery
      • MooTools
    • PHP

Using Caurina Tweener Class AS3

  • ActionScript, Flash, Tutorials

    Posted on November 15th, 2009

    Written by Behrouz Pooladrag

    Related Posts

    • Tweener Class Tips!
    • Software SWF Encrypt for locking flash Do not use!

    Tags

    actionscript 3 caurina tweener rotate, addTween, animation with tweening using as3.0, as2 caurina oncomplete params, as2 caurina transitions tutorials, as3 caurina, as3 caurina effects, as3 caurina rotation, as3 caurina tween rotation, as3 caurina tweener tutorials rotate, as3 other uses for tweener, as3 string encryption tutorial, as3 tweener, as3 tweener arguments, as3 tweener experiment, as3.0 class, caurina, caurina as3, caurina as3 tutorial, caurina bezier as3, caurina color transition, caurina oncomplete parameter, caurina oncomplete pass variable, caurina parameter, caurina transition blux as3 example, caurina transition types, caurina transitions, caurina transitions examples, caurina transitions fade in, caurina tutorial, caurina tween as3, caurina tween class, caurina tween class as3.0, caurina tweener, caurina tweener as3 color, caurina tweener class, caurina tweener color, caurina tweener for flex, caurina tweener parameters, caurina tweener proper arguments, caurina tweener tutorial param, caurina.transitions.tweener, change color using caurina tween, circle tweener, color movieclip caurina, courina tween, Delay, delay in caurina tweener class, fade examples in flex action script, flash banner transition twin as3, flash rotation as3 tweener, flash site tutorial with transition and preloader as3, flash, tweener x, flex actionscript 3 tween fade images caurina, free caurina tutorial, how to fade in fade out in caurina in as3, oncomplete caurina parame, onCompleteParams, rotate using caurina, transition, transition as3 caurina bounce, tutorial to use caurina in flash as3, tween caurina, tween caurina as3, tween caurina transition, tween for flash banners, Tweener, tweener as3 x 10, tweener class, tweener oncompleteparams, tweener parameter caurina, tweener rotation, tweener rotation examples, tweener tutorial, use caurina effect in flex, _color
    Using Caurina Tweener Class AS3

    I enjoy to use in my flash projects the caurina tweener class, because it’s simple, elegant and flexible. You can use multiple properties in one transition without having problems, create complex animations with a few lines of code. If you’ll use the caurina tween you’ll have a better performance on the transitions relative to the built-in Adobe Flash transitions.

    I’ll explain to you how the Actionscript 3 Tweener works, illustrating that with examples.

    Visit the official page of the project if you want to know more.

    First of all download the latest version of the tweener. The download section (“Featured downloades”) is on the right side of the site.

    Important: The caurina folder must be in the same directory as your Flash project.

    This line of code will import the caurina tweener class:

    import caurina.transitions.Tweener;

    Lets see how the code for a basic transition look like:

    Tweener.addTween(circle, {x:390, time:1, transition:"linear"});

    where:

    • circle – is the DisplayObject
    • first parameter is the circle attribute
    • time – how long a transition will take in seconds
    • transition – the type of transition to use; to experiment with other transitions have a look at the Transition Cheet Sheets
    • for other parameters check out the documentation

    1. Simple Tween:
    Move the circle MovieClip instance from the initial position x = 10 to x = 390 in a linear transition.

    import caurina.transitions.Tweener;
    circle.x = 10;
    Tweener.addTween(circle, {x:390, time:1, transition:"linear"});

    2. Multiple MovieClip attributes:
    Move the circle MovieClip instance from the initial position x = 10 y = 75 and alpha = 0 to x = 350 y = 150 and alpha = 1 in a linear transition.

    import caurina.transitions.Tweener;
    circle.x = 10;
    circle.y = 75;
    circle.alpha = 0;
    Tweener.addTween(circle, {x:350, y:150, alpha:1, time:1, transition:"linear"});

    3. Two transitions:
    The first one will move the circle on the x axis,the second one will change the y axis, different transitions.

    import caurina.transitions.Tweener;
    circle.x = 10;
    circle.y = 75;
    Tweener.addTween(circle, {x:350, time:0.5, transition:"easeInQuart"});
    Tweener.addTween(circle, {y:150, time:1, transition:"easeOutBounce"});

    4. Delay parameter:
    After the first transition is finished there will be a 1 seconds delay ( how it’s calculated: second transition delay – first transition time ) for the next transition to start.

    import caurina.transitions.Tweener;
    circle.x = 10;
    circle.y = 75;
    Tweener.addTween(circle, {x:350, time:0.5, transition:"easeInQuart"});
    Tweener.addTween(circle, {y:150, time:1,transition:"easeOutBounce", delay:1.5});

    5. onComplete parameter:
    After the transition is finished you can do something else.

    import caurina.transitions.Tweener;
    tF.alpha = 0;
    circle.x = 10;
    rcle.y = 75;
    Tweener.addTween(circle, {x:350, time:0.5, transition:"easeInQuart", onComplete:func});

    function func() {
    tF.alpha = 1;
    }

    6. onCompleteParams parameter:
    If you want your onComplete function to have parameters you can do that using onCompleteParams.

    import caurina.transitions.Tweener;
    tF.alpha = 0;
    circle.x = 10;
    circle.y = 75;
    Tweener.addTween(circle, {x:350, time:0.5, transition:"easeInQuart", onComplete:func, onCompleteParams:["Using onCompleteParams"]});

    function func(t:String) {
    tF.txt.text = t;
    tF.alpha = 1;
    }

    7. Special Properties – Color:
    This special class helps you to apply easy color transformation to your objects.

    import caurina.transitions.Tweener;
    import caurina.transitions.properties.ColorShortcuts;
    ColorShortcuts.init();

    circle.x = 10;
    circle.y = 75;
    Tweener.addTween(circle, {x:200, _color:0xFF0000, time:1, transition:"easeOutElastic"});
    }

    Experiment with various parameters and you’ll create amazing animations with just a few lines of code. You can go deep by using the Special Properties, see the online documentation for more.

    Tutorial by Flashuser.

    This entry was posted on Sunday, November 15th, 2009 at 9:45 am and is filed under ActionScript, Flash, Tutorials. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

    You might also like

    Tweener Class Tips! I've been using Tweener for almost an year now, and I thought I'd share a few quick and useful tips. Delayed...
    Software SWF Encrypt for locking flash Do not use! Agency code and the lock on Flash ActionScript and especially relevant to the group of developers always flash...
    printf function for ActionScript3 Function for doing string variable substitutions in AS3. Inspired by python's print and strtime. This is...
    New Design & Features in FlashBannerOnline Hello New features and outline a new online flash banner and added some small error on your behalf to send us...
  • 1 Comment

    Take a look at some of the responses we've had to this article.

    1. Sergio
      Posted on November 22nd

      i’ve been using caurina transitions for over a year and it saves a lot of time…its ever more simple to use caurina than the built it flash transitions xD

  • Post a Comment

    Let us know what you thought.

  • Name:

    Email (required):

    Website:

    Message:

  • Ad Ad

  • FlashBannerOnline.Com

  • Subscribe

    Enter your email address:

    | More

  • Blogroll
    • Random Flash Banner!
  • Tag Cloud

    • actionscript addChild addEventListener Adobe AIR Air Animation AS2 AS3 as3 preloader Banner beginFill BitmapData blog.flashbanneronline.com Class CSS Date Class draw Flash flash.net.URLLoader flash banner free flash banner generator flash banner happy new year flashbanneronline FlashBannerOnline.com flash banner online free flash player function game getChildIndex Javascript lightbox Loading Mysql new year flash banner Object Optimization package PHP Sprite tot Tweener URLLoader URLRequest web XML
  • Recent Comment
    • Behrouz Pooladrag on Flash Optimization – Freezing And Unfreezing Objects
    • Valerie on Flash Optimization – Freezing And Unfreezing Objects
    • FlashLord on RSS Reader for FlashBannerOnline Blog!
    • Behrouz Pooladrag on Using ActionScript 3.0 with PHP Loading External Variables
    • LUN on Using ActionScript 3.0 with PHP Loading External Variables
  • RSS FlashBannerOnline
    • Happy New Year 2012 & Gift!
    • New Templates Oval Light Added to Flash Banner Online
    • FlashBannerOnline started in Arabic language
    • Happy New Year 2011
    • New Templates Christmas 2011 Added at Christmas!
    • New Templates angel animate Added to Flash Banner Online
    • Added Tow New Preloader (Pro Preloader , Rotate Preloader)
    • Happy New Year , by new Theme (Christmas 2010)
  • Add to Technorati Favorites

    Subscribe
  • Google
    Custom Search

Copyright © 2009 FlashBannerOnline - Powered by Wordpress.

FBO by