.


:




:

































 

 

 

 


.




1) ! ! , :

.. 9, 12, 3.

 

2) Corel' flash.

: File > Export ( > ),

: swf

.

 

3) Flash. (File > Import > Import to Stage - Ctrl+R) , swf.

 

4) ? . , . , , Corel', , .
- :

(Shift+Ctrl+Down).

 

5) Ctrl+A, . F8, - MovieClip.

 

6) MovieClip' . . , , , , , .

7) , . / , .

 

8) . x. , - 550 x 400.

, . . 120 12-.

 

9) Align Window > Align Ctrl+K. , ( To Stage: Align).

 

10) .

.

 

1) , , , - . , , . .

MovieClip'? ? , ... , , .

... ... F8 ! ( ) :

. - , , , , , .

2) : , .

3) : , .

4) : , .

5) - . ActionScript: - Properties. : sec.

 

 

6) - min.

7) - hr.

8) - minuter. - . .

9)

MovieClip.

 

10) - 10, , 20, .

 

11) (.. 9- ) Color: .

 

12) . Actions CODE

stop();

 

13) .

. Properties. Tween, none.

 

14) none Shape.

15) 9- .

16) minuter minuter'.

 

3. !

1) . , , - ,

, minuter, , (Paste in Place). .

2) Ctrl+B. MovieClip F8. - .

3) : - , - ( Shift ').

4) , Align' .

5) , .

6) . MovieClip, - .

7) . .

8) , .

9) (.. , .

10) Free Transform Tool (Q) . , : , - , - . .

11) ( ) . "", ().

 

12) Free Transform Tool ' Shift ' , , .

13) , : . ( 2.5) maskLeft, , maskRight.

14) , ( 1.7).

15) . - progressLeft, - progressRight.

16) ( , - ). , , . . .

17) ( ). , , .

18) Actions :

CODE

 

// .

progressLeft.setMask(maskRight);

// , , .

maskLeft._visible = false;

progressRight._visible = false;

//

SecondsChange = _parent.date.getSeconds();

onEnterFrame = function () {
// - .

if (SecondsChange!= _parent.date.getSeconds()) {

maskRight._rotation = 0;

maskLeft._rotation = 180;

_parent.fadeOut();

delete onEnterFrame;

}

if (_parent.date.getMilliseconds()!= 0 and var_empty == undefined) {

// ,

Round360 = Math.ceil(_parent.date.getMilliseconds()/1000*360);

if (Round360 <=180) {

progressRight.setMask(maskLeft);

progressLeft._visible = false;

progressRight._visible = true;

maskLeft._rotation = Round360;

} else {

// , - .

maskLeft._rotation = 180;

progressLeft._visible = true;

progressLeft.setMask(maskRight);

maskRight._visible = true;

maskRight._rotation = Round360;

}

}

//
// , , 1,2...1000
// .
// , - .
// .

if (maskRight._rotation >= -5 and maskRight._rotation < 0) {
// .

var_empty = true;

}

};

 

19) ( ). ( ). clock_seconds. .

20) Dynamic text (Text Tool) (T)

21) . . Tahoma 96.

22) Dynamic text' ( ), minuter'.

23) Color. , - 16%. , . . - Embed... .

24) . Var seconds ( ).

25) . - ,

:

 

CODE


//************************************
//Copyright (C) 2007 ZooM aka twenty.
//Name: advanced clock
//************************************

i=0;
// ,

function refresh_clock() {

date = new Date();

seconds = date.getSeconds();

minutes = date.getMinutes();

hours = date.getHours();

sec._rotation = seconds*6;

min._rotation = minutes*6-90;

// -90? .

hr._rotation = hours*30+90;
// .

clock_seconds._rotation = date.getSeconds()/60*360;

}

refresh_clock();

//*****
//***** ,
//*****
//***** .

//%%%%%%%%%%%%%%%%%%%%%%%

function refresh_clock_sec() {

date = new Date();

seconds = date.getSeconds();

sec._rotation = seconds*6+1;

// +1? , !?

}

function refresh_clock_min() {

date = new Date();

minutes = date.getMinutes();

min._rotation = minutes*6-90+2;

}

function refresh_clock_hr() {

date = new Date();

hours = date.getHours();

hr._rotation = hours*30+90+3;

}
//%%%%%%%%%%%%%%%%%%%%%%%%%%

onEnterFrame = function () {

date = new Date();

if (seconds!= date.getSeconds()) {//

refresh_clock_sec();
// ticTac, , 1.

ticTac(sec, 1);

}

if (minutes!= date.getMinutes()) {

refresh_clock_min();

ticTac(min, 2);

}

if (hours!= date.getHours()) {

refresh_clock_hr();

ticTac(hr, 3);

}

};
// , .

function ticTac (railName, tic) {

if (railName == sec) {

intervalTac_sec = setInterval(tac, 20, railName, tic);

}

if (railName == min) {

intervalTac_min = setInterval(tac, 20, railName, tic);
}

if (railName == hr) {

intervalTac_hr = setInterval(tac, 20, railName, tic);

}

}

function tac (railName, tic) { // , .

railName._rotation -= tic; // railName tic .

// , .

if (railName == sec) {

clearInterval(intervalTac_sec);

}

if (railName == min) {

clearInterval(intervalTac_min);

minuter.play();// , .

}

if (railName == hr) {

clearInterval(intervalTac_hr);

}

}
//

function fadeAlpha(mc_name) {

mc_name2 = eval(mc_name);

if (mc_name2._alpha>1) {

mc_name2._alpha -= 5;

} else {

clearInterval(interval);

}

}

function fadeOut() {

if (var_check_01) {

// -
// n
// i
//
// .

if (n<0 or n == undefined) {

n = 1;

} else {

n = -1;

}

if (i>=4) {

i = 1;

} else {

i++;

}
// MovieClip .

duplicateMovieClip("clock_seconds", "clock_seconds"+i, clock_seconds.getDepth()+n);

// "clock_seconds"+i mc_new.

mc_new = eval("clock_seconds"+i);

mc_new._alpha = 100;
// .

mc_new._rotation = date.getSeconds()/60*360;

// , .

mc_new.progressLeft._rotation = 0;

mc_new.progressRight._rotation = -180;

// .

interval = setInterval(fadeAlpha, 2, mc_last);
// .

mc_last = mc_new;

} else {
// . , 1-
// .

var_check_01 = true;

duplicateMovieClip("clock_seconds", "clock_seconds"+i, clock_seconds.getDepth()-1);

mc_new = eval("clock_seconds"+i);

mc_new._rotation = date.getSeconds()/60*360;

mc_new._alpha = 100;

mc_new.progressLeft._rotation = 0;

mc_new.progressRight._rotation = -180;
// ( ) .

interval = setInterval(fadeAlpha, 1, "clock_seconds");

mc_last = mc_new;

}

}

 

Ctrl+Enter, .

... ...

- . , .

-

 





:


: 2016-12-28; !; : 273 |


:

:

,
==> ...

1672 - | 1657 -


© 2015-2024 lektsii.org - -

: 0.075 .