Unknowner
03-20-2006, 06:27 AM
hi all,
I have for like 10 mc's in my scene (there will come more, about 270 finally)
now i have this code ( darzak helped me to make it :P, on this same forum ):
onClipEvent (enterFrame)
{
var bHit = this.hitTest(_root.area);
if (bHit && picture_mc1 == undefined)
{
xwidth = this._width;
yheight = this._height;
this.createEmptyMovieClip("picture_mc1",this.getNextHighestDepth());
preload_resize("tiles/r01/001.jpg", picture_mc1, xwidth, yheight);
());
} else if (!bHit && picture_mc1 != undefined){
this.picture_mc1.removeMovieClip();
}
}
now i have to add this whole script to EACH mc, i was thinking of make a function of it and put this in the main layer and then in each moveclip type in something like:
getimg("tiels/r01/001.jpg", "picture_mc1")
but dunno how to create this fuunction??
does someone have a clue?
ur help will be really really appreciated :D
I have for like 10 mc's in my scene (there will come more, about 270 finally)
now i have this code ( darzak helped me to make it :P, on this same forum ):
onClipEvent (enterFrame)
{
var bHit = this.hitTest(_root.area);
if (bHit && picture_mc1 == undefined)
{
xwidth = this._width;
yheight = this._height;
this.createEmptyMovieClip("picture_mc1",this.getNextHighestDepth());
preload_resize("tiles/r01/001.jpg", picture_mc1, xwidth, yheight);
());
} else if (!bHit && picture_mc1 != undefined){
this.picture_mc1.removeMovieClip();
}
}
now i have to add this whole script to EACH mc, i was thinking of make a function of it and put this in the main layer and then in each moveclip type in something like:
getimg("tiels/r01/001.jpg", "picture_mc1")
but dunno how to create this fuunction??
does someone have a clue?
ur help will be really really appreciated :D