# Beginner needs help with alpha fade on loaded images

**URL:** <https://forum.kirupa.com/t/beginner-needs-help-with-alpha-fade-on-loaded-images/296700>\
**Category:** flash\
**Created:** [September 18, 2009, 2:03pm UTC](https://forum.kirupa.com/t/beginner-needs-help-with-alpha-fade-on-loaded-images/296700 "2009-09-18T14:03:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![m3300118z](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@m3300118z](https://forum.kirupa.com/u/m3300118z)\
**Post date:** [September 18, 2009, 2:03pm UTC](https://forum.kirupa.com/t/beginner-needs-help-with-alpha-fade-on-loaded-images/296700/1 "2009-09-18T14:03:02Z")

</div>

It has been years since I have used flash so I am probably a beginner again. I have just got CS3 but most of what I remember I think is action script 1.

I have a website that I want to make the images load from external into swf file. I want to then control the alpha with the rollover. I got so far but… alpha works only if jpg is inside. when I have it outside it just flashes on and off on load. I know this is basic but a push in the right direction is going to help me grately… Please see code below.

I need to make the my\_mc to load from outside then fade in. After which I have the rollover fade in/out code below…

Button.prototype.fadeIn = MovieClip.prototype.fadeIn = function () {  
this.onEnterFrame = function () {  
if (this.\_alpha\<100) {  
this.\_alpha += 10; }  
else {  
delete this.onEnterFrame;  
}  
};  
};

Button.prototype.fadeOut = MovieClip.prototype.fadeOut = function () {  
this.onEnterFrame = function () {  
if (this.\_alpha\>0) {  
this.\_alpha -= 10; }  
else {  
delete this.onEnterFrame;  
}  
};  
};  
my\_mc.onRollOver = fadeIn;  
my\_mc.onRollOut = fadeOut;

If you can help me thankyou!
