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!
// 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






174 Responses to “ActionScript 3.0 Tween and Fade Control Part II”
Trackbacks/Pingbacks
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….
Quick Shave…
[...]check beneath, are some totally unrelated sites to ours, on the other hand, they may be most trustworthy sources that we use[...]…
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….
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….
Read was interesting, stay in touch……
[...]please visit the sites we follow, including this one, as it represents our picks from the web[...]……
Read was interesting, stay in touch……
[...]please visit the sites we follow, including this one, as it represents our picks from the web[...]……
Dreary Day…
It was a dreary day here today, so I just took to messing around on the internet and found…
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?…
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….
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….
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….
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….
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….
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….
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….
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….
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….
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….
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!…
ab346368@gmail.com…
{Beautiful and Distinctive Oak Furniture hand made from solid Oak Wood….
Visitor recommendations…
[...]one of our visitors recently recommended the following website[...]……
…Recent Blogroll Additions…
[...]The full look of your web site is magnificent, let well as the content material!http://www.comerciofast.com.br [...]…
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!…
Yahoo results…
While searching Yahoo I found this page in the results and I didn’t think it fit…