hansolo Posted November 15, 2010 Share Posted November 15, 2010 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); }} Link to comment Share on other sites More sharing options...
PlaviZG Posted November 30, 2010 Share Posted November 30, 2010 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 Link to comment Share on other sites More sharing options...
brart Posted January 7, 2011 Share Posted January 7, 2011 A little bit late, but maybe for some one else with the same issue.You used the ._alpha property. This is no longer supported in as3.0, use .alpha without the _ sign instead. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.