-
Heaven is made of 1's and 0's
Changing Alpha on Rollout
I have a a movie clip running on mouseover, but I would like to use Actionscropt to fade the alpha to zero upon rollout. I believe this would be done using setProperty, but I'm not quite sure how to create the easing effect or 'tweening' effect. Can anyone please lend any assistance?
Thanks!~
-
theres pretty much one way to do it, but a bunch of ways to implement it. when i write the code i usually throw ALL of the code in the first frame of the timeline.......anyways it would look something like this:
Code:
movieclip.onRollOut = function()
{
this.onEnterFrame = function()
{
this._alpha -= 10;
//the 10 = however much you want
//it to decrease every frame
if (this._alpha <= 0)
this.onEnterFrame = null;
}
}
basically its not that complicated to figure out, that IF statement is just in there for efficiency reasons so that once the object is gone is doesnt keep descreasing the alpha which is already at zero. that should work for you. [keep in mind i dont have flash infront of me so i may very well have typed out the "onRollOut" function name wrong or something simple like that........just try it out]
remember this is for implementation in the first frame of a timeline...if you want to put it in the obj there are some minimal changes required.
-
Flashkit Veteran
eyenovation what have you been doing for your last 2000 posts???
-
Heaven is made of 1's and 0's
Originally Posted by joejoe2288
eyenovation what have you been doing for your last 2000 posts???
Because I have 2000 posts, I'm supposed to be an actionscript expert or something? I could have 20,000 and if I didn't know something I'd be humble enough to ask.
-
Flashkit Veteran
Sorry if it seemed like i was hindering you, that truely wasn't my intention. I was simply wondering how you had 2000 posts, I would think that is a common enough question you would have viewed it in a different post. Obviously i was mistaken and I apologize and in no way was I questioning your intelligence.
-
Heaven is made of 1's and 0's
No offense taken by any means. I did try the search function but it's difficult to search when you're not sure what 'term' to search for. As always many thanks to the community for helping me.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|