hey, i'm working on a flash project right now, and I've run into a problem.
I need to import an external swf file through actionscript. which i can do using the following code
Code:
play_btn.onPress = function () {
_root.createEmptyMovieClip("movie_container", 1);
loadMovie("movieclip.swf", "movie_container");
movie_container._x = 150 ;
movie_container._y = 20 ;
}
but now i need to apply a mask using an image (which i can do) but because i've loaded the external swf using a "createEmptyMovieClip" i now need to create a mask and apply it to the newly added movie clip. and this is where i am running into problems, my current code for applying mask is this...
movieclip.setMask (maskMovieClip)
or furthermore i found this code from a tutorial on kirupa
Code:
onClipEvent (load) {
//this means, do something the moment this movie clip loads
_root.normalpic.setmask(_root.camera.hole);
//I want to see normalpic through the "hole".
}
I just can't seem to get the clip to apply to the newly imported swf movie
I'm new to flash and actionscripting so any help advice on where to look or code snippets , it would be very appreciated.
here are the 2 tutorials I have been working off of.
kirupa.com - Scriptable Masks
kirupa.com - Loading Techniques: Flash 5 & Flash MX