![]() |
|
||||||||||
|
|||||
|
меценат
|
var i:Number = 0;
var __number:Number = 3;
var Go:Array = [3, 5, 7];
var Go_start:Array = [1, -1];
//
var Soun:Sound = new Sound();
Soun.attachSound("click1");
var Soun1:Sound = new Sound();
Soun1.attachSound("Beep");
//
function onEnterFrame():Void {
while (i<__number) {
var ball:MovieClip = this.createEmptyMovieClip("ball"+i, i);
ball.lineStyle(0.25, 0x000000);
ball.beginFill(0x0099CC);
ball.moveTo(-35, -12);
ball.lineTo(-35, -12);
ball.lineTo(35, -12);
ball.lineTo(35, 12);
ball.lineTo(-35, 12);
ball.endFill();
ball._x = Stage.width/2;
ball._y = Stage.height/2;
ball.__x = Go[random(Go.length)]*Go_start[random(Go_start.length)];
ball.__y = Go[random(Go.length)]*Go_start[random(Go_start.length)];
ball.__q = 1;
ball.__a = 1;
ball.__w = __number;
ball.controll_Go = 0;
ball.onEnterFrame = mx.utils.Delegate.create(ball, onBallEnterFrame);
i += 1;
}
}
function onBallEnterFrame():Void {
if (this.controll_Go == 0) {
this._x -= this.__x;
this._y -= this.__y;
if (this._y+(this._height/2)>=Stage.height) {
this._y = Stage.height-(this._height/2);
}
if (this._y-(this._height/2)<=0) {
this._y = 0+(this._height/2);
}
if (this._y == 0+(this._height/2) || this._y == Stage.height-(this._height/2)) {
this.__q = -this.__q;
this.__y = Go[random(Go.length)]*this.__q;
Soun.start(0, 1);
}
//
if (this._x+(this._width/2)>=Stage.width) {
this._x = Stage.width-(this._width/2);
}
if (this._x-(this._width/2)<=0) {
this._x = 0+(this._width/2);
}
if (this._x == 0+(this._width/2) || this._x == Stage.width-(this._width/2)) {
this.__a = -this.__a;
this.__x = Go[random(Go.length)]*this.__a;
Soun.start(0, 1);
}
}
//
this.onRollOut = function() {
this.controll_Go = 0;
this._xscale = this._yscale=100;
this.swapDepths(this.__w);
Soun1.start(0, 1);
};
this.onRollOver = function() {
this.controll_Go = 1;
this._xscale = this._yscale=250;
this.swapDepths(this.__w+1);
Soun1.start(0, 1);
};
}
хваталку сделать можно но мне кажется это глупо и лишнее, сомневаюсь что ктото догадается без подсказки
__________________
Безвыходных положений небывает © Барон Мюнхаузен=)Исходники |
|
|||||
|
Регистрация: Jan 2008
Сообщений: 29
|
D12, Спасибо Вам огромнейшее!!!
Ссылки нужны на самих обьекта (прямоуголниках) при нажатии на них. Я думаю тут обычный getUrl прописать? А нельзя ли прямоугольники все же кружочками заменить с alpha 85%. Ато что-то никак не могу нарисовать их =( ! А вот с хваталкой - ну оочень нужно! Если возможно помогите! Fernando Costa, я итак не программист. Последний раз редактировалось grun; 13.01.2008 в 14:51. |
|
|||||
|
Цитата:
Цитата:
|
|
|||||
|
Регистрация: Jan 2008
Сообщений: 29
|
D12, написать то что угодно, я потом поправлю, надо чтобы надпись появлялась только при наведении, ну а ссылки будут на страницы html отделные, открывать нужно в этом же окне(не в новом)
Спасибо большое заранее!!!!!! |
![]() |
![]() |
Часовой пояс GMT +4, время: 20:01. |
|
|
« Предыдущая тема | Следующая тема » |
|
|