createScope = function(target,path){ var conListener:Object = new Object(); conListener.onLoadInit = function(target_mc:MovieClip) { target_mc._x = -target_mc._width/2 target_mc._y = -target_mc._height/2 } var conLoader:MovieClipLoader = new MovieClipLoader(); conLoader.addListener(conListener); // var stageListener = new Object(); stageListener.onResize = function(){ con._x = Math.round(Stage.width/2) con._y = Math.round(Stage.height/2) } Stage.addListener(stageListener); // //var d = 1 //direction 1 or -1 var con = target.createEmptyMovieClip("scope_con",0) con.d = 1 var smc = con.createEmptyMovieClip("scope_1",0) stageListener.onResize() smc.onMouseMove = function(){smc.d = -this._ymouse/60} for(var i=0;i<8;i++){ var img = smc.createEmptyMovieClip("img"+i,i) var msk = smc.attachMovie("msk","msk"+i,i+8) img.createEmptyMovieClip("con",0) conLoader.loadClip(path, img.con); img.setMask(msk) msk._rotation = i*45 img._rotation = Math.ceil((i+1)/2)*90 img._xscale = (i%2?1:-1)*100 /* if (i==0||i==1){ img._rotation = 90 }else if(i==2||i==3){ img._rotation = 180 }else if(i==4||i==5){ img._rotation = 270 }else if(i==6||i==7){ img._rotation = 360 } */ img.dr = (i%2?1:-1) img.onEnterFrame = function(){ this._rotation += this.dr*con.d; } } var smcDup = smc.duplicateMovieClip("scope_2",1) smc._visible = false; //smcDup.blendMode = "10" } Stage.scaleMode="noScale" Stage.align="TL" createScope(this,"colorlight.jpg")