NikolyA
26.09.2007, 20:39
Ребята у меня к Вам еще одна просьба такого характера, подскажите как проделать такую штуку: я загружаю картинку в мувик, и теперь мне надо сделать вращение по часовой и против часовой стрелки с помощью ползунка для вращения картнки, у меня получилось картинку вращать с помощью 2-х кнопок: используя такой код:
для кнопки по часовой стрелки:
img._rotation +=90;
_root.mc=_root.img;
if(img._rotation==0){
_root.img._x = 512-_root.mc._width/2;
_root.img._y = 140+628/2-_root.mc._height/2;
}else if(img._rotation==90){
_root.img._x = 512+_root.mc._width/2;
_root.img._y = 140+628/2-_root.mc._height/2;
}if(img._rotation==180){
_root.img._x = 512+_root.mc._width/2;
_root.img._y = 140+628/2+_root.mc._height/2;
}else if(img._rotation==-90){
_root.img._x = 512-_root.mc._width/2;
_root.img._y = 140+628/2+_root.mc._height/2;
}
и против часовой стрелки вот таки кодом:
img._rotation -=90;
_root.mc=_root.img;
if(img._rotation==0){
_root.img._x = 512-_root.mc._width/2;
_root.img._y = 140+628/2-_root.mc._height/2;
}else if(img._rotation==90){
_root.img._x = 512+_root.mc._width/2;
_root.img._y = 140+628/2-_root.mc._height/2;
}if(img._rotation==-180){
_root.img._x = 512+_root.mc._width/2;
_root.img._y = 140+628/2+_root.mc._height/2;
}else if(img._rotation==-90){
_root.img._x = 512-_root.mc._width/2;
_root.img._y = 140+628/2+_root.mc._height/2;
}
вот такая вот картина. А теперь как прицепить это к ползунку на вращение, я не знаю, мозгов видать не хватает! обращаюсь к Вам друзья, товарищи, подскажите плиз!!!
для кнопки по часовой стрелки:
img._rotation +=90;
_root.mc=_root.img;
if(img._rotation==0){
_root.img._x = 512-_root.mc._width/2;
_root.img._y = 140+628/2-_root.mc._height/2;
}else if(img._rotation==90){
_root.img._x = 512+_root.mc._width/2;
_root.img._y = 140+628/2-_root.mc._height/2;
}if(img._rotation==180){
_root.img._x = 512+_root.mc._width/2;
_root.img._y = 140+628/2+_root.mc._height/2;
}else if(img._rotation==-90){
_root.img._x = 512-_root.mc._width/2;
_root.img._y = 140+628/2+_root.mc._height/2;
}
и против часовой стрелки вот таки кодом:
img._rotation -=90;
_root.mc=_root.img;
if(img._rotation==0){
_root.img._x = 512-_root.mc._width/2;
_root.img._y = 140+628/2-_root.mc._height/2;
}else if(img._rotation==90){
_root.img._x = 512+_root.mc._width/2;
_root.img._y = 140+628/2-_root.mc._height/2;
}if(img._rotation==-180){
_root.img._x = 512+_root.mc._width/2;
_root.img._y = 140+628/2+_root.mc._height/2;
}else if(img._rotation==-90){
_root.img._x = 512-_root.mc._width/2;
_root.img._y = 140+628/2+_root.mc._height/2;
}
вот такая вот картина. А теперь как прицепить это к ползунку на вращение, я не знаю, мозгов видать не хватает! обращаюсь к Вам друзья, товарищи, подскажите плиз!!!