MovieClips and Fading

Sorry if this is an asanine question. I’m trying to get a Movieclip with an Image in it to fade in over time. I’ve been able to get text and regular images to do it over time, but i’m guessing the MovieClip works differently.

Also realize, i just got into flash (ironically, because i’m working on a C++ game and want to use flash for the website about the game). So i’m pretty much taking time off from other languages and such to learn this. Bottom line, i’m quite new.

New enough to have worked 1/2 of my flash movie with the little timeline up in top using keyframes and such. From seeing some other samples and tutorials, i get the impression that everything is done with actionscript in just one keyframe. Have to rework some of that…

But that’s getting on a tangent. Basically what i would like to know if how do i fade that dynamic image into the scene (found a few tutorials, they’re done very poorly) as well as the best method to learn about animations and such in actionscript (ie, moving text from left to right and stopping it).

Thank you for any help.

There’s a great tutorial on motion with actionscript on this site. Just do a search for “movement with actionscript”. Your c++ knowledge should make it look easy.

If you want to fade a dynamic image (that is, an image loaded at runtime) you need to give your actionscript instructions to the movieclip that you used to load the image. Eg, if you load your image into an mc called “picHolder”, you need to say something like:
//set the mc to 0 alpha when it first loads
picHolder.onLoad = function(){
this._alpha = 0;
//increase the alpha value incrementally until it reaches 100
picHolder.onEnterFrame = function(){
if(this._alpha < 100){
this._alpha += 1;
You might need to add the path to the mc (_root).

Thanks for the tip. I’m about to try it right now. Hopefully i can get it to work.

One of the reasons i’m having some trouble learning actionscript and such is the lack of an overall code viewer. I tried looking (albeit haphazardly) for some sort of total script viewer. I guess that’s just previous experience making it difficult right now; oh well i’ll get over it.

Unfortunately the other one is just how i’m “learning” it JUST for the website and JUST what i need to know. So it’s very botchy and such. Hopefully i’ll have time later on to learn Flash like it’s meant to be learned; unfortunately not right now.

Anyways, thank you very much. Just recently stumbled upon the site and with a quick overview didn’t find any tutorials. Guess i should start focusing more. Thanks.