Hello there…
ok how to select certain mc for loadMovie purposing…I mean when i click “m.mc1” it’ll focus this selected mc then i can press the button for loading picture on mc1…it will not load the picture on “mc2” until I select the “m.mc2” then the picture can load on it…
so how to go about it…I’ve been read flash help regarding Selection.setFocus(MovieClip);
but don’t have any idea how to implement it with the my MC…
any help would be great…
here’s the code I’m using
stop();
var selected;
var mc = _root.holder.attachMovie("mymc","mymc2",100);
//trace(mc);
mc._x = 70;
mc._y = 10;
mc.onPress = onClick;
function onClick(){
//trace(_root.mc.mc1);
selected = this;
if( selected == mc.mc1){
trace("u press mc1");
loadPic(mc.mc1);
}else if(selected == mc.mc2){
trace("u press mc2");
loadPic(mc.mc2);
}
//pass to loadpic function
delete this.onEnterFrame;
}
//btn event
function loadPic(holdmc){
for(var i=0;i<2;i++){
this["btn"+i].ivar = i;
this["btn"+i].onRelease = function(){
holdmc.loadMovie("pic"+this.ivar+".jpg");
}
}
}
tq