Preload and Alpha graphic

Hi all,

I’ve been trying to solve this problem for a week yet trying at this moment. I followed the tutorial to create percentage preloader with load bar by shane waldeck and Alpha graphic fade with Inertia by dan4885 and both work fine individually. But when I put Alpha graphic Fade right after preload, alpha graphic fade stops fading as it’s supposed to.

First and second frame is exactly same as explained in percentage preloader with load bar. Third frame, I put the first frame of Alpha graphic fade. Scripts go as follows;

Frame 1: (Preloader)

bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent1002.5;
this.loadText.text = Math.round(getPercent*100)+" %";
if(bytes_loaded == bytes_total){
this.gotoAndPlay(3);
}

Frame 2:

this.gotoAndPlay(1);

Frame 3: (Alpha Graphic Fade)

_root.createEmptyMovieClip(“movie_clip”, 1000);
movie_clip.onLoad = function() {
mosx = 0;
mosy = 0;
};
movie_clip.onEnterFrame = function() {
difx = mosx-_root._xmouse;
dify = mosy-_root._ymouse;
mosx -= difx/8;
mosy -= dify/8;
_root.graphic1._alpha = (mosx/4)-(mosy/4);
_root.graphic2._alpha = 100-(mosx/4)-(mosy/4);
_root.graphic3._alpha = (mosy/4)-100+(mosx/4);
_root.graphic4._alpha = (mosy/4)-(mosx/4);
};

It looks like preloader works fine but alpha graphic fade does’nt fade at all.
Does any of you have an idea?

Thank you, :slight_smile:

well i aint no actionscript wizard so i aint really sure are all ur frame set up right like blank keyframe after the loader etc

Novatake,

You are suggesting adding blank keyframe between those scripts? When I do that, alpha image starts blinking fast. What is wrong with my setting?

Could you post your .fla?

I solved the problem.

changing gotoAndPlay(3); to gotoAndStop(3); in frame 1 fixed the problem but I still don’t know why gotoAndPlay() doesnt work since the MC in frame 3 is actually playing video. Anybody can tell why?

:crazy: Wow, this is like a month late and stuff, but for some reason I did a search on my name (I do that every now and then to catch threads directed to me that I may have missed) and I found this.

If your frame 3 doesn’t contain a stop() action on the frame then gotoAndPlay(3) will cause your movie to loop, if your movie is looping, then the alpha fade with inertia is not able to function properly because it uses an onEnterFrame and if that frame is not constantly being hit, then it throws it off.

Does that help any?

Thanks lost,

I solved that problem a while ago and deleted the file. I dont remember how I did that anymore. But thank you for explaining it in detail. I think someone out there strugling like me also thanked you for this.

No problem KazchiX, glad I could help even though its a month late :stuck_out_tongue: