Jump to content

how do i use a for loop to make the movie clips invislible in the array .


hansolo
 Share

Recommended Posts

I have instant named btn on stage. I have a movie clip named glove and movieclip named box. I am trying to make the moviclips transparent. how do i use a for loop to make the movie clips invislible in the array . var targets = new Array(glove,box); for (var i:Number = 0; i<targets.length; i++) { trace(targets); // this returns as _level.glove , _level0.box btn.onPress = function(){ this.targets._alpha =0;// comes up as undefined // this is were im going wrong trace(targets); }}

Edited by hansolo
Link to comment
Share on other sites

  • 3 weeks later...

try with:this.targets.visibiliti=false;if u want to make something invisible on the stage useinstanceName.visibiliti=true/false;hope i helpedp.s. this is AS3

Edited by PlaviZG
Link to comment
Share on other sites

  • 1 month later...

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
 Share

×
×
  • Create New...