Rotate a Duplicated Movieclip


i trying finish small project , having trouble continuosly rotating duplicated movieclip via button. rotate clicking button; however, have set 7.5 degrees , complete rotation takes quite while. click , hold rotate it. once button released stop. appreciated. code below:

 

movieclip (mymc):

 

on (press) {

           startdrag("", false);

}

 

on (release) {

           stopdrag();

}

 

on (release) {

           setproperty("/rotate", _name, "");

           setproperty("", _name, "rotate");

}

 

 

 

rotate button:

 

on (press) {

           changerotation = getproperty("/rotate", _rotation);

           setproperty("/rotate", _rotation, number(changerotation) -7.5);

}

 

 

button used duplicate movieclip:

 

on (release) {

   _root.mymc.duplicatemovieclip ("mymc_"+ "x",this.getnexthighestdepth());

   setproperty ("mymc_"+"x", _x, 585);

   setproperty ("mymc_"+"x", _y, 400);

   x++;

}

initiate onenterframe function when rotate button pressed , delete when button released.  have onenterframe processing handle change in rotation value.

 

the onenterframe function executes @ frame rate of file, whatever processing put in function executes continuously.

 

you should consider moving as2 @ least coding.  reduce code , bring 1 step closer modern flash programming.  , should code off of objects , place in timeline instead.



More discussions in ActionScript 1 and 2


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account