-
1. Re: setMask() using loadMovie()
kglad Jun 17, 2014 7:19 AM (in response to Ron Colmen)that will work, but it doesn't make much sense and probably does not do what you want. ie, you're masking an empty movieclip. so, you would expect to see clip1 'disappear' when it's set as a mask and nothing revealed because clip0 is an empty movieclip.
what is it that you want to do?
-
2. Re: setMask() using loadMovie()
Ron Colmen Jun 17, 2014 9:09 AM (in response to kglad)Yes, you're correct 'clip0' is empty in my sample code. I'm using the empty movieclip with attachMovie() to tile a background.
This is what I want to be able to do. This works if I manually add the "clip1" movieclip instead of using loadMovie()
But I want to use loadMovie to import external swfs
loadMovie("http://www.example.com/swfFile.swf", _root.mc1_mc.mc2_mc); //this external swf's instance name is clip1
abc_btn.onRelease=function(){
NuX = NuY = 0;
for(j=0;j<296;j++){
if(NuX>=650){
NuX=0;
NuY=NuY+50;
}
_root.mc1_mc.mc2_mc.createEmptyMovieClip("clip0", _root.mc1_mc.mc2_mc.getNextHighestDepth());
_root.mc1_mc.mc2_mc.clip0.attachMovie(attX[this.pvar], "tileB"+j, _root.mc1_mc.mc2_mc.clip0.getNextHighestDepth(), {_x:NuX, _y:NuY});
//trace(_root.mc1_mc.mc2_mc.clip0["tileB"+j]) //undefined when loadMovie() is used.
NuX=NuX+50;
if(j==296){
_root.mc1_mc.mc2_mc.clip0.setMask( _root.mc1_mc.mc2_mc.clip1);
}
}
-
3. Re: setMask() using loadMovie()
kglad Jun 17, 2014 9:45 AM (in response to Ron Colmen)you can't use attachMovie applied to a load target or child of a load target.
-
4. Re: setMask() using loadMovie()
Ron Colmen Jun 17, 2014 10:15 AM (in response to kglad)Thanks Kglad.
Instead of using attachMovie() to the load target will it work if I apply the attachMovie() within the loadMovie() swf? so once it's loaded the tile effect could be achieved?
-
5. Re: setMask() using loadMovie()
kglad Jun 17, 2014 12:30 PM (in response to Ron Colmen)you can use attachMovie in the loaded swf. i'm not sure what you'll try and do after that.
-
6. Re: setMask() using loadMovie()
Ron Colmen Jun 17, 2014 7:40 PM (in response to kglad)Thanks Kglad.
-
7. Re: setMask() using loadMovie()
kglad Jun 18, 2014 6:44 AM (in response to Ron Colmen)you're welcome.



