ActionScript 3.0 Tween and Fade Control Part II

Wed, Oct 28, 2009

ActionScript

ActionScript 3.0 Tween and Fade Control Part II

This movie requires Flash Player 9

No Timelines! With one single sentence we create a whole animation from ActionScript

Click Here for part II of this tutorial.
DOWNLOAD THE COMPLETE SOURCE FILE
Fade Control Final

CLICK HERE FOR A COMPLETE ACTIONSCRIPT 3.0 CARTOON SMART TUTORIAL

HERE IS THE SOURCE CODE!

//The ActionScript 3.0 Fade in and Fade Out
// solutions at say-web dot com
// FREE to USE, COPY and DISTRIBUTE

// Let’s import Tweening Libraries
// This enables Tweeing Capabilities
import fl.transitions.Tween;
import fl.transitions.easing.* // This will import all
//easing capabilities

// Variables to hold the tween
var inTween:Tween;
var outTween:Tween;

//Now we will set the compiler
//to wait the buttons to be clicked
in_btn.addEventListener(MouseEvent.CLICK, fadeIn);
out_btn.addEventListener(MouseEvent.CLICK, fadeOut);
// Note the instance names have to be identical
// to the names we gave on stage

//Functions
//if any event listener has a function that is not declared
// a error message shows, even if the button is not clicked

function fadeIn(event:MouseEvent):void{

inTween = new Tween (sun_mc,”alpha”,None.easeNone,0,1,3,true);
// sun_mc is the instance name we gave on stage
// alpha is a string HAS to be in between quotes
// The opacitiy starts at 0 increasing all the way to 3, steady
// during 3 seconds
// the true is to state we are using seconds and not milliseconds
}

function fadeOut(event:MouseEvent):void{

inTween = new Tween (sun_mc,”alpha”,None.easeNone,1,0,3,true);
}

// Don’t forget to subscribe
//thanks for watching

Related Articles:

, , , , , , , , , , , , , , , , , , ,

174 Responses to “ActionScript 3.0 Tween and Fade Control Part II”


Trackbacks/Pingbacks

  1. ab346368@gmail.com

    I’m simply in awe of this article. How you were able to make this topic engaging is beyond my imagination. I am glad I got to read this. Thank you….

  2. Quick Shave says:

    Quick Shave…

    [...]check beneath, are some totally unrelated sites to ours, on the other hand, they may be most trustworthy sources that we use[...]…

  3. ab346368@gmail.com

    This is great material you have written here. It isn’t often I find content this good. Thank you for making it so interesting and understandable….

  4. ab346368@gmail.com

    I am having a hard time fathoming how much research you had to do for this data, but I appreciate it and I agree. You make a lot of sense….

  5. Read was interesting, stay in touch……

    [...]please visit the sites we follow, including this one, as it represents our picks from the web[...]……

  6. Read was interesting, stay in touch……

    [...]please visit the sites we follow, including this one, as it represents our picks from the web[...]……

  7. Dreary Day…

    It was a dreary day here today, so I just took to messing around on the internet and found…

  8. Just having a look…

    excellent issues altogether, you simply won a logo new reader. What might you recommend in regards to your post that you simply made some days in the past? Any certain?…

  9. ab346368@gmail.com

    This article is intelligent. I can think of no better word to describe it. I stand in agreement with many points mentioned in this article. That’s likely because this writer seems to think like me….

  10. ab346368@gmail.com

    As I sit here after reading your article, I could only wish to be able to produce such a well-written document as you. I am no where near your caliber….

  11. ab346368@gmail.com

    It’s not uncommon for an article with this much information to become confusing, but your content is clear. I can relate to many of the points contained in this material….

  12. ab346368@gmail.com

    I agree with a lot of the info in this article. You have made this content interesting and clear so it’s understood where you stand….

  13. ab346368@gmail.com

    This content has a lot of great information that is apparently intended to make you think. There are excellent points made here and I agree on many. I like the way this content is written….

  14. ab346368@gmail.com

    You’ve got a really smart article here. It’s formatted well, easy to read and interesting. Your content makes perfect sense to me. Thanks for sharing….

  15. subwoofer says:

    ab346368@gmail.com

    Not many writers impress me with their informative articles, but you have done it. This is great work and very interesting content. Thanks for posting….

  16. ab346368@gmail.com

    Very interesting. I think you made valuable and valid points in this writing. I agree with you one hundred percent and am glad I had the opportunity to read this….

  17. ab346368@gmail.com

    I enjoy reading content with solid information. I like the way this article makes this information so interesting and sensible. I share these views along with the author. Thank you….

  18. ab346368@gmail.com

    Good job on this article! I really like how you presented your facts and how you made it interesting and easy to understand. Thank you….

  19. salsa lyrics says:

    ab346368@gmail.com

    The efforts you put into this article has paid off. I am enthralled by your writing and I will share this with others. Amazing work!…

  20. Oak Chests says:

    ab346368@gmail.com

    {Beautiful and Distinctive Oak Furniture hand made from solid Oak Wood….

  21. Travel says:

    Visitor recommendations…

    [...]one of our visitors recently recommended the following website[...]……

  22. …Recent Blogroll Additions…

    [...]The full look of your web site is magnificent, let well as the content material!http://www.comerciofast.com.br [...]…

  23. Magento Theme…

    When I originally commented I clicked the -Notify me when new comments are added- checkbox and now each time a comment is added I get four emails with the same comment. Is there any way you can remove me from that service? Thanks!…

  24. Yahoo results…

    While searching Yahoo I found this page in the results and I didn’t think it fit…

Leave a Reply

You must be logged in to post a comment.

My name is Avraham Saltoun, and I live in Jerusalem, Middle East. I am currently on my mid  40's and I am a computer programming technician. Here you will find over one hundred quality video tutorials on Actionscript, and yes, I give online support for aspiring programmers, and pros as well, sharing screen on skype and delivering source code by email, click the button for live flash actionscript support now!

 
oDesk Certified Action Script Programmer
oDesk Certified Adobe Flash CS3 Designer
oDesk Certified Adobe Photoshop 6.0 Designer
Skype Me™!

$7.49 .Com! Score Savings Cartoon Smart Tutorials


739
Unique Visitors
Previous 30 Days
Powered By Google Analytics