Jump to content
Sign in to follow this  
sharamiz

Masquer un clip par un autre ?

Recommended Posts

Bonjour,

Voici mon petit problème. Pour résumer, j'aimerais créer un "trou" dans un clip à partir d'un autre clip.

Voici mon code

MovieClip.prototype.traceRectangle=function(xPos,yPos,width,height,fillColor,lineColor,alpha){

this.beginFill(fillColor,alpha); /* debut du remplissage */
this.lineStyle(1,lineColor,alpha); /* début du contour */
this.moveTo(xPos,yPos);
this.lineTo(xPos+width,yPos);
this.lineTo(xPos+width,yPos+height);
this.lineTo(xPos,yPos+height);
this.lineTo(xPos,yPos); /* fin du contour */
this.endFill(); /* fin du remplissage */

}

var clip1 = createEmptyMovieClip("clip_1", 1);
var clip2 = createEmptyMovieClip("clip_2", 2);

clip_1.traceRectangle(10,10,200,200,0xff9933,0xff0000,100);
clip_2.traceRectangle(20,20,100,100,0x00aa00,0xff0000,100);

Merci pour votre aide ... ;-)

Cordialement

SharamiZ

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...