![]() |
|
||||||||||
|
|||||
|
Регистрация: Feb 2007
Сообщений: 19
|
Нашёл код на http://www.actionscript.org/resource...und/Page1.html
//define number of layer.
var layer = 10;
//number of items in a layer
var items = 25;
//create the bg that holds the layers
this.createEmptyMovieClip("bgHolder", this.getNextHighestDepth());
//this function will update the layers current position
function updateMovies() {
//easingStrenth
d = 10;
this.x = _root._xmouse;
this.y = _root._ymouse;
//get the linear relation fo x.
var coef = (Stage.width-this._width)/Stage.width;
//update x with easing.
this._x -= (this._x-coef*this.x)/d;
//get the linear relation fo y.
coef = (Stage.height-this._height)/Stage.height;
//update y with easing.
this._y -= (this._y-coef*this.y)/d;
}
//init function for the layers
function init() {
for (i=0; i<layer; i++) {
//create a layer
temp = this.bgHolder.createEmptyMovieClip("bg"+i, this.bgHolder.getNextHighestDepth());
depth = temp.getNextHighestDepth();
//create a virtual bag for the layer to define it height and width.
virtual_mc = temp.attachMovie("virtual", "vitrual"+depth, depth, {_visible:false, _width:(i+2)*Stage.width, _height:(i+2)*Stage.height});
//put the items into the layer
for (j=0; j<items; j++) {
depth = temp.getNextHighestDepth();
//attach an item
temp1 = temp.attachMovie("float1", "float"+depth, depth);
//position it randomly in the current layer
temp1._x = Math.random()*(i+2)*Stage.width;
temp1._y = Math.random()*(i+2)*Stage.height;
//scale it randomly
rand = Math.random();
temp1._xscale *= .5+rand;
temp1._yscale *= .5+rand;
//put is opacity randomly
temp1._alpha = random(80)+20;
}
//each layer share the same updating function.
temp.onEnterFrame = this.updateMovies;
}
}
init();
Но! Если полученый файл подключаю через swfobject все "шарики" склеиваются в один. Флеш при этом сильно торозит... Глюк только в ИЕ во всех версиях. Уважаемые знатоки, помогите, пожалуйста! Прошу прощения. Совершенно случайно создал тему не в том разделе... Последний раз редактировалось sokiche; 09.02.2007 в 03:49. |
|
|||||
|
Регистрация: Feb 2007
Сообщений: 19
|
http://thisisme.ru/test/
Вот "рабочий" пример. Иногда (совершенно непонятно в какой момент) в эксплоурере загружается нормально. Но очень редко. |
|
|||||
|
Et cetera
Регистрация: Sep 2002
Сообщений: 30,787
|
У меня всё нормально работает в IE7.
Уберите CSS, может в нем проблема. SWFObject тут врядли в чем-то виноват, скорее всего что-то не то происходит при записи в div embed тега, возможно из-за CSS, наложенного на div. |
|
|||||
|
Ветеран форума
Регистрация: Jul 2006
Адрес: Грузия, Тбилиси
Сообщений: 2,675
|
у меня тоже всё ок
|
|
|||||
|
Регистрация: Feb 2007
Сообщений: 19
|
Спасибо за ответы! Но, к сожалению ничего не помогло...
Извините за назойливость, может, у кого-то есть подобный скрипт "летящих шариков"? Было бы намного проще сменить саму причину все этого... |
![]() |
![]() |
Часовой пояс GMT +4, время: 07:57. |
|
|
« Предыдущая тема | Следующая тема » |
|
|