|
From: clbeech on 7 May 2008 11:42 sure does thanks. ok the problem here is that you need to remove the 'blank keyframe' in the mask layer on the main timeline - when you do the mask covers all the frames of the clip and it runs just fine. however there is an easier way to do this - I'm assuming your building a preloader. here is a way to do it entirely with a little code and no mask or animation - to run this code make a new doc and place it in the actions panel on the first keyframe - nothing else is needed. you can adjust the 'size' and 'spd' vars to change it as well as the 'color' of the sweep in the lineStyle code there. One could also incorporate this with a percentage value returned durring a load using the onLoadProgress handler of the MovieClipLoader class. stop(); this.createEmptyMovieClip('sweep', 0); sweep._x = Stage.width/2; sweep._y = Stage.height/2; sweep.lineStyle(2, oxoooooo); var xp = 0; var yp = 0; var dg = 0; var size=50; var spd=10; onEnterFrame = function() { while(dg<spd) { xp=size*Math.cos(dg*0.0175); yp=size*Math.sin(dg*0.0175); sweep.moveTo(0,0); sweep.lineTo(xp,yp); dg++; } (spd<360) ? spd+=20 : delete onEnterFrame; }
From: ID. Awe on 7 May 2008 13:03 Actually, it is not for a preloader. I just want to reveal certain objects using this sweep. It still does not work like I would want and, stupid me, couldn't figure it out. What is happening is that the mask in the animation is showing the object underneath where the animation mask is. Well duh on me. Going to work with your code to see if I can get it to work as a mask. That code was what I was looking for. Haven't had the chance recently to upgrade my math chops.
First
|
Prev
|
Pages: 1 2 Prev: problem of defining value to a textfield inMovieClip Next: linking to a non-flash page |