Форум Flasher.ru
Ближайшие курсы в Школе RealTime
Список интенсивных курсов: [см.]  
  
Специальные предложения: [см.]  
  
 
Блоги Правила Справка Пользователи Календарь Сообщения за день
 

Вернуться   Форум Flasher.ru > Flash > ActionScript 1.0/2.0

Версия для печати  Отправить по электронной почте    « Предыдущая тема | Следующая тема »  
Опции темы Опции просмотра
 
Создать новую тему  
Старый 16.10.2013, 09:56
Nick Rogalev вне форума Посмотреть профиль Отправить личное сообщение для Nick Rogalev Найти все сообщения от Nick Rogalev
  № 1  
Nick Rogalev
 
Аватар для Nick Rogalev

Регистрация: Aug 2006
Адрес: Russian Federation. Perm.
Сообщений: 41
Отправить сообщение для Nick Rogalev с помощью ICQ
По умолчанию Проблема с кодом

Здравствуйте, помогите пожалуйста новичку.
Мне понравился переход картинок, сделанный в примере (см вложения) Размер сцены в примере 750х300 пикс.

Я взял его за основу, но увеличил размер сцены до 1366х768. В описании примера написано, что для изменения размеров этого достаточно, однако это не так. Эффект выполняется не в моем размере, а в меньшем (см. вложения) Как это можно исправить?


Спасибо!
Вот код, расположенный внутри:
Цитата:
stop();
Stage.scaleMode = "noScale";

// This is where you insert all your img1,img2,img3,... movieclips
// Attention! Don't forget NOT to put "," (comma) after the last one
loop = true;
frames = new Array(
img1,
img2,
img3,
img4,
img5,
img6

);

// Circle Functions
circleListener = null;
CurrentFrame = null;
CurrentFrameNumber = null;
erasing = false;

initcirclesequence();

function initcirclesequence() {
for (i=0; i<frames.length; i++) {
frames[i]._visible = false;
frames[i].gotoAndStop(1);
}
CurrentFrame = frames[0].duplicateMovieClip("cf", 996);
CurrentFrameNumber = 0;
circleListener = createEmptyMovieClip("circleListener", 998);
CurrentFrame._visible = true;
CurrentFrame.gotoAndPlay(1);
}

// This onEnterFrame function listens to see if one of the movieclips has finished playing and if it has, it erases it out of view
circleListener.onEnterFrame = function() {
if (erasing == true) {
return;
}
if (CurrentFrame._currentframe == CurrentFrame._totalframes) {
var NextFrameNumber = CurrentFrameNumber == frames.length-1 ? 0 : CurrentFrameNumber+1;
if (NextFrameNumber == 0 && loop == false) {
circleListener.onEnterFrame = null;
return;
}
var NextFrame = frames[NextFrameNumber].duplicateMovieClip("nf", 995);
CurrentFrame.stop();
NextFrame._visible = true;
NextFrame.gotoAndStop(1);
erasing = true;
mycircle(CurrentFrame);
}
};
function mycircle(sender) {
// Speed of the circles (1-8)
speed = 2;
// Speed of the sizing
scalespeed = 1000;
// Circles direction (1-8)
mode = random(8)+1;
// Circle steps: Diamond = 4, Pentagon = 5, Circle = 15
steps = 15;
// Circle radius
radius = 30;
// Movieclips erased when this radius is reached
removeradius = 3;
// Transition delay (frames)
tansdelay = 6;

// Don't edit anything beyond this point
created = 0;
done = 0;
startdepth = 1;
createEmptyMovieClip("circleContainer", startdepth);
circleContainer.createEmptyMovieClip("circle", startdepth+1);

// Circle drawing
lx = Math.cos(0)*radius;
ly = Math.sin(0)*radius;
sender.setMask(circleContainer);
circleContainer.circle.lineStyle(1, 0xFFFFFF, 100);
circleContainer.circle.moveTo(lx, ly);
circleContainer.circle.beginFill(0xFFFFFF, 100);
for (s=1; s<steps+2; s++) {
lx = Math.cos((s/steps)*360*Math.PI/180)*radius;
ly = Math.sin((s/steps)*360*Math.PI/180)*radius;
circleContainer.circle.lineTo(lx, ly);
}
circleContainer.circle.endFill(0x000000, 100);
circleContainer.circle._visible = false;
circleContainer.circle._x = -1000;
circleContainer.circle._y = -1000;

// Grid
i = startdepth+2;
// This assumes that the registration point is centered vertical and horizontal
for (y=sender._y-sender._height/2; y<=(sender._y+sender._height/2)+radius; y += radius) {
for (x=sender._x-sender._width/2; x<=(sender._x+sender._width/2)+radius; x += radius) {
i++;
circleContainer.circle.duplicateMovieClip("o"+i, i);
created++;
o = circleContainer["o"+i];
o._x = x;
o._y = y;
o._visible = true;
switch (mode) {
case 1 :
o.wait = x*y/2.5;
break;
case 2 :
o.wait = y*sender._height/2;
break;
case 3 :
o.wait = (-y+sender._height+24)*200;
break;
case 4 :
o.wait = (-x+sender._width+24)*150;
break;
case 5 :
o.wait = x*sender._height/2;
break;
case 6 :
o.wait = (-x+sender._width+24)*y/2;
break;
case 7 :
o.wait = (-y+sender._height+24)*x/2;
break;
case 8 :
o.wait = (-y+sender._height+24)*(-x+sender._width)/2;
break;
}
}
}

enddepth = startdepth+2+i;

// Animation
f = 0;
circleContainer.onEnterFrame = function() {
if (done<created) {
for (i=startdepth+2; i<=enddepth; i++) {
obj = circleContainer["o"+i];
if (obj != undefined) {
if (f>obj.wait/(scalespeed*speed)) {
obj._width -= speed;
obj._height -= speed;
}
if (obj._height<=2 || obj._width<=2) {
obj.removeMovieClip();
done++;
}
}
}
} else {
CurrentFrame._visible = false;
CurrentFrame.gotoAndStop(1);
CurrentFrameNumber = CurrentFrameNumber == frames.length-1 ? 0 : CurrentFrameNumber+1;
CurrentFrame = frames[CurrentFrameNumber].duplicateMovieClip("cf", 996);
CurrentFrame.gotoAndPlay(1);
CurrentFrame._visible = true;
erasing = false;
circleContainer.onEnterFrame = null;
circleContainer.unloadMovie();
return;
}
f++;
};
}
/////////
// End //
/////////
Вложения
Тип файла: swf пример.swf (88.8 Кб, 40 просмотров)
Тип файла: swf результат.swf (451.0 Кб, 22 просмотров)
__________________
Большое Вам спасибо!

Создать новую тему   Часовой пояс GMT +4, время: 23:05.
Быстрый переход
  « Предыдущая тема | Следующая тема »  

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.


 


Часовой пояс GMT +4, время: 23:05.


Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.