___
Macromedia Flash 8. . ) - .
, . , . , . . , -- ... .
Ctrl+J , . - 25 - . .
. , . . ( ), . , "" (V)
, "" .
- "". "*", [Ctrl+B] .
. ( - ), .
: ? F8. "Convert to Symbol" MovieClip, - "zw_fly" .
, , .
F8. "Convert to Symbol" MovieClip, - "zw" .
.. "zw_fly", - "zw", . .
25 F6 - . , . ""(Properties). y- 100 . , .
" "(Create Motion Tween). , - 1 25 . .
[Ctrl+Enter] .
, , , .
"" "Ease", ( 70). . .
15 F6, 25 . . . . "Color" - "None". - "Alpha" () = "0%".
25 , F9 ""(Actions - Frame) () "removeMovieClip(this);" ( )
! ! "" .
, - "zwezda"
, ""( F9) :
CODE
/**********************
* @ MOHCTEP 2007 *
***********************/
//
//*********************
var x0:Number, y0:Number;// . " " :))
var id:Number;//
var fireLength:Number=100; //
var colorNum:Number=0;//
var colors:Array=[0xFF0000, 0xFFFF00, 0x00FF00, 0x00FFFF, 0x2020FF, 0xFF00FF, 0xFFFFFF];
//
zwezda.gotoAndStop(1);
/* . "" ,
2- . 1 . 2 -
************************
************************/
/*
, ..*/
function randomNum(min:Number, max:Number):Number{
return Math.floor(Math.random()*(max-min))+min;
}
// ""
function shoot(){
clearInterval(id);//
x0=randomNum(fireLength,(Stage.width-fireLength));//
y0=randomNum(fireLength,(Stage.height-fireLength));//
zwezda._x=randomNum(fireLength,(Stage.width-fireLength));//
zwezda._y=Stage.height+5;//
zwezda.onEnterFrame=function(){// ...
this._x-=(this._x-x0)/6;// . .
this._y-=(this._y-y0)/6;// "Tween".
if((this._y-y0)<3){//
this._y=Stage.height+5;//
delete this.onEnterFrame;//
createFirework();// ...
}
}
}
//
function createFirework(){
var total:Number=randomNum(70,120);// -
var color:Number=colors[colorNum];//
colorNum++;
colorNum%=colors.length;
for(var i:Number=0;i/ , ,
new Color(mc).setRGB(color);//
}
// !!!!
id=setInterval(shoot, 1000);// ,
}
shoot();// .
Ctrl+Enter , .
. () . , "". , . - . - . Sothink SWF Quicker.
.. )
!
http://demiart.ru/forum/index.php?showtopic=20807