һ½FLASHĵ½ӰƬΪActionScriptڵһ֡ϣʶSS_clock

ȷӰƬڲԲ߻һԲʴɫ⣬ڲɫҪ


ڶ صڿ

ҵղŵӰƬҼҵ壬ֱ
    
               ֵ             

    $fillColor     13421798       Number
    $strokeColor   3355443        Number
    $large          true          Boolean
    $small          true          Boolean
    $cont           true          Boolean
    $rounded        false         Boolean
    $_enableShadow   true         Boolean
    $_shadowColor   10066329      Number
    $_shadowAlpha    30           Number


ѶõӰƬϵ̨УʵtheClock ˫ӰƬڲ½һ㣬

ڵһ֡룺


 ½һ㣬

ڵһ֡ 
  
       // Action script...

// [Initial MovieClip Action of sprite 3]
#initclip 1
SS_clock = function ()
{
    this.init();
};
SS_clock.prototype = MovieClip.prototype;
Object.registerClass("SS_clock", SS_clock);
SS_clock.prototype.init = function ()
{
    this.bounding_box._visible = 0;
    this.w = this._width;
    this.createEmptyMovieClip("clock", 1);
    if (this.$large)
    {
        this.clock.createEmptyMovieClip("line0", 1);
        this.rectangle(this.clock.line0, 49, -2, 4, 8, this.$strokeColor);
        for (var _loc2 = 1; _loc2 < 12; ++_loc2)
        {
            this.clock.line0.duplicateMovieClip("line" + _loc2, _loc2 + 1, {_rotation: _loc2 * 30});
        } // end of for
    } // end if
    if (this.$small)
    {
        this.clock.createEmptyMovieClip("line_b0", 100);
        this.rectangle(this.clock.line_b0, 52, 0, 1, 5, this.$strokeColor);
        for (var _loc2 = 0; _loc2 < 60; ++_loc2)
        {
            this.clock.line_b0.duplicateMovieClip("line_b" + _loc2, _loc2 + 101, {_rotation: _loc2 * 6});
        } // end of for
    } // end if
    if (this.$rounded)
    {
        this.clock.drawCircle(0, 0, this._width / 2, 2, this.$strokeColor, this.$fillColor, 100);
    } // end if
    this.clock.createEmptyMovieClip("secondi", 1000);
    this.rectangle(this.clock.secondi, -5, 0, 1, 50, this.$strokeColor);
    this.clock.createEmptyMovieClip("minuti", 1001);
    this.rectangle(this.clock.minuti, -5, -1.500000E+000, 3, 50, this.$strokeColor);
    this.clock.createEmptyMovieClip("ore", 1003);
    this.rectangle(this.clock.ore, -5, -2.500000E+000, 5, 35, this.$strokeColor);
    this._width = this._height = this.w;
    if (this.$_enableShadow)
    {
        this.drawShadow(this);
    } // end if
    this.startClock(this);
    this.$mainTime = setInterval(this.startClock, this.$cont == true ? (10) : (1000), this);
    this.$_theInt = this.$cont == true ? (10) : (1000);
};
SS_clock.prototype.changeInterval = function (newInterval)
{
    clearInterval(this.$mainTime);
    this.$mainTime = setInterval(this.startClock, newInterval, this);
    this.$_theInt = newInterval;
};
SS_clock.prototype.getInterval = function ()
{
    return (this.$_theInt);
};
SS_clock.prototype.drawShadow = function (obj)
{
    obj.clock.createEmptyMovieClip("minuti_2", 800);
    obj.rectangle(this.clock.minuti_2, -5, -1.500000E+000, 3, 50, obj.$_shadowColor);
    obj.clock.createEmptyMovieClip("ore_2", 700);
    obj.rectangle(this.clock.ore_2, -5, -2.500000E+000, 5, 35, obj.$_shadowColor);
    obj.clock.createEmptyMovieClip("secondi_2", 900);
    obj.rectangle(this.clock.secondi_2, -5, 0, 1, 50, obj.$_shadowColor);
    obj.clock.secondi_2._alpha = obj.clock.minuti_2._alpha = obj.clock.ore_2._alpha = obj.$_shadowAlpha;
};
SS_clock.prototype.killShadow = function ()
{
    this.$_enableShadow = false;
    unloadMovie(this.clock.secondi_2);
    unloadMovie(this.clock.minuti_2);
    unloadMovie(this.clock.ore_2);
};
SS_clock.prototype.start = function ()
{
    this.$mainTime = setInterval(this.startClock, this.$cont == true ? (10) : (1000), this);
};
SS_clock.prototype.startClock = function (obj)
{
    var _loc3 = new Date();
    var _loc6 = _loc3.getSeconds();
    var _loc8 = _loc3.getMilliseconds();
    var _loc9 = _loc3.getMinutes();
    var _loc2 = _loc3.getHours();
    _loc2 = _loc2 >= 12 ? (_loc2 - 12) : (_loc2);
    var _loc5 = (_loc6 + _loc8 / 1000) * 6;
    var _loc4 = (_loc9 + _loc5 / 360) * 6;
    var _loc7 = (_loc2 + _loc4 / 360) * 30;
    obj.clock.secondi._rotation = _loc5 - 90;
    obj.clock.minuti._rotation = _loc4 - 90;
    obj.clock.ore._rotation = _loc7 - 90;
    if (obj.$_enableShadow)
    {
        obj.clock.secondi_2._rotation = obj.clock.secondi._rotation;
        obj.clock.minuti_2._rotation = obj.clock.minuti._rotation;
        obj.clock.ore_2._rotation = obj.clock.ore._rotation;
        obj.clock.secondi_2._x = obj.clock.secondi._x + 2;
        obj.clock.secondi_2._y = obj.clock.secondi._y + 2;
        obj.clock.minuti_2._x = obj.clock.minuti._x + 1.500000E+000;
        obj.clock.minuti_2._y = obj.clock.minuti._y + 1.500000E+000;
        obj.clock.ore_2._x = obj.clock.ore._x + 1.500000E+000;
        obj.clock.ore_2._y = obj.clock.ore._y + 1.500000E+000;
    } // end if
};
SS_clock.prototype.stop = function ()
{
    clearInterval(this.$mainTime);
};
SS_clock.prototype.drawCircle = function (thex, they, theradius, lineW, lineColor, fillColor, fillAlpha)
{
    var _loc3;
    var _loc2;
    var _loc4;
    var _loc6;
    var _loc5;
    _loc3 = thex;
    _loc2 = they;
    _loc4 = theradius;
    _loc6 = _loc4 * 4.086000E-001;
    _loc5 = _loc4 * 7.071000E-001;
    if (lineW != "")
    {
        this.lineStyle(lineW, lineColor, 100);
    } // end if
    if (fillColor != undefined || fillColor != "")
    {
        this.beginFill(fillColor, fillAlpha);
    } // end if
    this.moveTo(_loc3 - _loc4, _loc2);
    this.curveTo(_loc3 - _loc4, _loc2 - _loc6, _loc3 - _loc5, _loc2 - _loc5);
    this.curveTo(_loc3 - _loc6, _loc2 - _loc4, _loc3, _loc2 - _loc4);
    this.curveTo(_loc3 + _loc6, _loc2 - _loc4, _loc3 + _loc5, _loc2 - _loc5);
    this.curveTo(_loc3 + _loc4, _loc2 - _loc6, _loc3 + _loc4, _loc2);
    this.curveTo(_loc3 + _loc4, _loc2 + _loc6, _loc3 + _loc5, _loc2 + _loc5);
    this.curveTo(_loc3 + _loc6, _loc2 + _loc4, _loc3, _loc2 + _loc4);
    this.curveTo(_loc3 - _loc6, _loc2 + _loc4, _loc3 - _loc5, _loc2 + _loc5);
    this.curveTo(_loc3 - _loc4, _loc2 + _loc6, _loc3 - _loc4, _loc2);
    if (fillColor != undefined || fillColor != "")
    {
        this.endFill();
    } // end if
};
SS_clock.prototype.rectangle = function (obj, x, y, h, w, rgb)
{
    obj.lineStyle(0, 0, 0);
    obj.beginFill(rgb, 100);
    obj.moveTo(x, y);
    obj.lineTo(x + w, y);
    obj.lineTo(x + w, y + h);
    obj.lineTo(x, y + h);
    obj.lineTo(x, y);
    obj.endFill();
};
#endinitclip

// [Action in Frame 1]



 ˣڿԿЧˡ

                                                        ߣƵּԻ

                                                              QQ564945283

                                                           վhttp://huangdizhiyue.2000y.net