Статистика
Последние новости Самые отвечаемые темы Последние сообщения
Оживляем сайт в ... 25.06.2022
С Новым Годом 20... 31.12.2015
Первый соревнова... 11.12.2015
Новая статья на ... 04.10.2015
Обзор игры Black... 04.03.2015
Что надо добавля... 312
Какой выбрать ан... 297
ДИЗАЙН 237
Болталка 228
Новинки 212
Тема Дата, Время Автор Раздел
Браузерная игр... 30.04.2023, 13:21 Grandar">Grandar Игры
Облом 30.04.2023, 13:20 Leo">Leo Игры
Страны 30.04.2023, 13:20 Leo">Leo Игры
Компьютерные и... 30.04.2023, 13:20 Leo">Leo Игры
Какой выбрать ... 10.02.2023, 21:35 Leo">Leo Софт
Стишок про КС 10.02.2023, 07:46 bigfire">bigfire Юмор
Очень смешные ... 15.11.2022, 13:15 Leo">Leo Юмор
Анектоды 15.11.2022, 13:14 Fan">Fan Юмор
de_aztec 12.09.2022, 08:39 Leo">Leo Тактики и правила боя на основных картах
Skyrim 15.08.2022, 15:57 NANOSTAR">NANOSTAR Игры
Новые пользователи Активные пользователи
Grandar 30.04.2023
aLi 27.04.2023
qwII 15.04.2023
CosmoCode 09.04.2023
GaNjIk 19.03.2023
Leo 2893
ReST 686
m0n0 404
kyka 389
OzzyGreen9I 169
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Форум dream-x » Все для вебмастера/Помощь вебмастеру » Скрипты » Картинки крутятся (Скрипт картинки крутятся)
Картинки крутятся
Группа: Администраторы
Собщений: 2893
Репутация:
Наград: 24
Замечания : 0%
# 1 14:06
Пример тут: :)

Вставляем между <body></body>

Code
<!--fantasyflash.ru-->       
<script type="text/javascript">       
       var Car_Image_Width=100;       
       var Car_Image_Height=100;       
       var Car_Border=true;       
       var Car_Border_Color="#BCBFFF";       
       var Car_Speed=10;       
       var Car_Direction=true;       
       var Car_NoOfSides=6;       
       Car_Image_Sources=new Array(       
       "ссылка на картинку","",       
       "ссылка на картинку","",       
       "ссылка на кртинку","",       
       "ссылка на картинку","",       
       "ссылка на картинку",""       
       );       
       CW_I=new Array(Car_NoOfSides/2+1);C_ClcW=new Array(Car_NoOfSides/2);       
       C_Coef=new Array(       
       3*Math.PI/2,0,3*Math.PI/2,11*Math.PI/6,Math.PI/6,3*Math.PI/2,7*Math.PI/4, 0,       
       Math.PI/4,3*Math.PI/2,5*Math.PI/3,11*Math.PI/6,0,Math.PI/6,Math.PI/3);       
       var C_CoefOf=Car_NoOfSides==4?0:Car_NoOfSides==6?2:Car_NoOfSides==8?5:9;       
       C_Pre_Img=new Array(Car_Image_Sources.length);       
       var C_Angle=Car_Direction?Math.PI/(Car_NoOfSides/2):0,C_CrImg=Car_NoOfSides,C_MaxW,C_TotalW,       
       C_Stppd=false,i,C_LeftOffset,C_HalfNo=Car_NoOfSides/2;       
       function Carousel(){       
       if(document.getElementById){       
       for(i=0;i<Car_Image_Sources.length;i+=2){       
       C_Pre_Img[i]=new Image();C_Pre_Img[i].src=Car_Image_Sources[i]}       
       C_MaxW=Car_Image_Width/Math.sin(Math.PI/Car_NoOfSides)+C_HalfNo+1;       
       Car_Div=document.getElementById("Carousel");//osw       
       for(i=0;i<C_HalfNo;i++){       
       CW_I[i]=document.createElement("img");Car_Div.appendChild(CW_I[i]);       
       CW_I[i].style.position="absolute";       
       CW_I[i].style.top=0+"px";       
       CW_I[i].style.height=Car_Image_Height+"px";       
       if(Car_Border){       
       CW_I[i].style.borderStyle="solid";       
       CW_I[i].style.borderWidth=1+"px";       
       CW_I[i].style.borderColor=Car_Border_Color}       
       CW_I[i].src=Car_Image_Sources[2*i];       
       CW_I[i].lnk=Car_Image_Sources[2*i+1];       
       CW_I[i].onclick=C_LdLnk;       
       CW_I[i].onmouseover=C_Stp;       
       CW_I[i].onmouseout=C_Rstrt}       
       CarImages()}}       

       function CarImages(){       
       if(!C_Stppd){       
       C_TotalW=0;       
       for(i=0;i<C_HalfNo;i++){       
       C_ClcW[i]=Math.round(Math.cos(Math.abs(C_Coef[C_CoefOf+i]+C_Angle))*Car_Image_Width);       
       C_TotalW+=C_ClcW[i]}       
       C_LeftOffset=(C_MaxW-C_TotalW)/2;       
       for(i=0;i<C_HalfNo;i++){       
       CW_I[i].style.left=C_LeftOffset+"px";       
       CW_I[i].style.width=C_ClcW[i]+"px";       
       C_LeftOffset+=C_ClcW[i]}       
       C_Angle+=Car_Speed/720*Math.PI*(Car_Direction?-1:1);       
       if((Car_Direction&&C_Angle<=0)||(!Car_Direction&&C_Angle>=Math.PI/C_HalfNo)){       
       if(C_CrImg==Car_Image_Sources.length)C_CrImg=0;       
       if(Car_Direction){       
       CW_I[C_HalfNo]=CW_I[0];       
       for(i=0;i<C_HalfNo;i++)CW_I[i]=CW_I[i+1];       
       CW_I[C_HalfNo-1].src=Car_Image_Sources[C_CrImg];       
       CW_I[C_HalfNo-1].lnk=Car_Image_Sources[C_CrImg+1]}       
       else{ for(i=C_HalfNo;i>0;i--)CW_I[i]=CW_I[i-1];       
       CW_I[0]=CW_I[C_HalfNo];//fantasyflash.ru       
       CW_I[0].src=Car_Image_Sources[C_CrImg];       
       CW_I[0].lnk=Car_Image_Sources[C_CrImg+1]}       
       C_Angle=Car_Direction?Math.PI/C_HalfNo:0;C_CrImg+=2}}       
       setTimeout("CarImages()",50)}       
       function C_LdLnk(){if(this.lnk)window.location.href=this.lnk}       
       function C_Stp(){this.style.cursor=this.lnk?"pointer":"default";C_Stppd=true;}       
       function C_Rstrt(){C_Stppd=false}       
</script><div id="Carousel" style="position:relative; width:130; height:21">

Заменяем

Code
<body>

на

Code
<body onload='carousel()'>

Где написано ссылка на картинку,меняйте на свою ссылку с картинкой.
Материал взят с сайта. laibel.net.ru

Помог? +!

Группа: Пользователи
Собщений: 1
Репутация:
Наград: 0
Замечания : 0%
# 2 16:14
почему у меня не крутятся??????????????

<body onload='carousel()'>
<!--fantasyflash.ru-->
<script type="text/javascript">
var Car_Image_Width=100;
var Car_Image_Height=100;
var Car_Border=true;
var Car_Border_Color="#BCBFFF";
var Car_Speed=10;
var Car_Direction=true;
var Car_NoOfSides=6;
Car_Image_Sources=new Array(
"http://content.foto.mail.ru/mail/avpiryakov/490/i-108.jpg","",
"http://static.baza.farpost.ru/bulletins_images/5/0/8/50889.jpg","",
"http://s59.radikal.ru/i163/0908/97/5977d0b6dd49.jpg","",
"http://www.xrest.ru/images/collection/00012/444/original.jpg","",
"http://bookinist.ws/uploads/posts/2009-05/1243778075_pic_id34074.jpeg",""
);
CW_I=new Array(Car_NoOfSides/2+1);C_ClcW=new Array(Car_NoOfSides/2);
C_Coef=new Array(
3*Math.PI/2,0,3*Math.PI/2,11*Math.PI/6,Math.PI/6,3*Math.PI/2,7*Math.PI/4, 0,
Math.PI/4,3*Math.PI/2,5*Math.PI/3,11*Math.PI/6,0,Math.PI/6,Math.PI/3);
var C_CoefOf=Car_NoOfSides==4?0:Car_NoOfSides==6?2:Car_NoOfSides==8?5:9;
C_Pre_Img=new Array(Car_Image_Sources.length);
var C_Angle=Car_Direction?Math.PI/(Car_NoOfSides/2):0,C_CrImg=Car_NoOfSides,C_MaxW,C_TotalW,
C_Stppd=false,i,C_LeftOffset,C_HalfNo=Car_NoOfSides/2;
function Carousel(){
if(document.getElementById){
for(i=0;i<Car_Image_Sources.length;i+=2){
C_Pre_Img[i]=new Image();C_Pre_Img[i].src=Car_Image_Sources[i]}
C_MaxW=Car_Image_Width/Math.sin(Math.PI/Car_NoOfSides)+C_HalfNo+1;
Car_Div=document.getElementById("Carousel");//osw
for(i=0;i<C_HalfNo;i++){
CW_I[i]=document.createElement("img");Car_Div.appendChild(CW_I[i]);
CW_I[i].style.position="absolute";
CW_I[i].style.top=0+"px";
CW_I[i].style.height=Car_Image_Height+"px";
if(Car_Border){
CW_I[i].style.borderStyle="solid";
CW_I[i].style.borderWidth=1+"px";
CW_I[i].style.borderColor=Car_Border_Color}
CW_I[i].src=Car_Image_Sources[2*i];
CW_I[i].lnk=Car_Image_Sources[2*i+1];
CW_I[i].onclick=C_LdLnk;
CW_I[i].onmouseover=C_Stp;
CW_I[i].onmouseout=C_Rstrt}
CarImages()}}

function CarImages(){
if(!C_Stppd){
C_TotalW=0;
for(i=0;i<C_HalfNo;i++){
C_ClcW[i]=Math.round(Math.cos(Math.abs(C_Coef[C_CoefOf+i]+C_Angle))*Car_Image_Width);
C_TotalW+=C_ClcW[i]}
C_LeftOffset=(C_MaxW-C_TotalW)/2;
for(i=0;i<C_HalfNo;i++){
CW_I[i].style.left=C_LeftOffset+"px";
CW_I[i].style.width=C_ClcW[i]+"px";
C_LeftOffset+=C_ClcW[i]}
C_Angle+=Car_Speed/720*Math.PI*(Car_Direction?-1:1);
if((Car_Direction&&C_Angle<=0)||(!Car_Direction&&C_Angle>=Math.PI/C_HalfNo)){
if(C_CrImg==Car_Image_Sources.length)C_CrImg=0;
if(Car_Direction){
CW_I[C_HalfNo]=CW_I[0];
for(i=0;i<C_HalfNo;i++)CW_I[i]=CW_I[i+1];
CW_I[C_HalfNo-1].src=Car_Image_Sources[C_CrImg];
CW_I[C_HalfNo-1].lnk=Car_Image_Sources[C_CrImg+1]}
else{ for(i=C_HalfNo;i>0;i--)CW_I[i]=CW_I[i-1];
CW_I[0]=CW_I[C_HalfNo];//fantasyflash.ru
CW_I[0].src=Car_Image_Sources[C_CrImg];
CW_I[0].lnk=Car_Image_Sources[C_CrImg+1]}
C_Angle=Car_Direction?Math.PI/C_HalfNo:0;C_CrImg+=2}}
setTimeout("CarImages()",50)}
function C_LdLnk(){if(this.lnk)window.location.href=this.lnk}
function C_Stp(){this.style.cursor=this.lnk?"pointer":"default";C_Stppd=true;}
function C_Rstrt(){C_Stppd=false}
</script><div id="Carousel" style="position: relative; width: 130px; height: 21px;">

Добавлено (15.01.2010, 16:14)
---------------------------------------------
что молчим? помогите............

Группа: Проверенные
Собщений: 404
Репутация:
Наград: 3
Замечания : 0%
# 3 21:22
Читать весь скрипт долго, парень который выкладывал новость в армии, и не терпеливый ты я смотрю, просмотри скрипт, мож что-то неправильно прописал, да и есть google, yandex и т.д. не получилось ищи дальше!))
Группа: Пользователи
Собщений: 2
Репутация:
Наград: 0
Замечания : 0%
# 4 05:02
Очень хороший скрипт.
Группа: Пользователи
Собщений: 27
Репутация:
Наград: 0
Замечания : 0%
# 5 23:40
Need Discount Generic Macrobid Ups Cash Delivery http://zol1.xyz/zoloft-buy-online.php - Zoloft Buy Online On Line Acticin Real Cash Delivery Without Rx I Need To Order Some Viagra http://antabuse.ccrpdc.com/generic-antabuse-buy.php - Generic Antabuse Buy Buy Pet Chlorampheticol Il Viagra Effetti Collaterali http://viag1.xyz/generic-viagra-100mg.php - Generic Viagra 100mg Vente De Cialis Sur Le Net Prix Du Xenical En Parapharmacie http://kama1.xyz/buy-kamagra-jelly-online.php - Buy Kamagra Jelly Online Cialis Und Grapefruitsaft Efecto De Kamagra http://cial5mg.xyz/order-cialis-pills.php - Order Cialis Pills Viagra In Osterreich Propecia Tempie http://cial5mg.xyz/how-to-order-cialis.php - How To Order Cialis Cialis Ou Viagra Que Choisir Clomicalm Onit At Canadian Pharm http://cial5mg.xyz/viagra-cialis.php - Viagra Cialis Clomid Et Fertilite Prix Levitra 10 Mg Posologie http://zol1.xyz/get-cheap-zoloft-online.php - Get Cheap Zoloft Online Cialis Cruz Verde Discount cheapeast isotretinoin purchase in internet overseas pharmacy http://zol1.xyz/buy-cheap-zoloft-site.php - Buy Cheap Zoloft Site Ginecologia Propecia Acheter Misoprostol En Ligne Moin Cher http://cial5mg.xyz/how-to-buy-cialis.php - How To Buy Cialis Cialis 20 Mg Foglio Illustrativo
Форум dream-x » Все для вебмастера/Помощь вебмастеру » Скрипты » Картинки крутятся (Скрипт картинки крутятся)
  • Страница 1 из 1
  • 1
Поиск: