phpbuddy.eu
-


Hinweise


Antwort
 
LinkBack Themen-Optionen Thema durchsuchen Thema bewerten
Alt 16.05.2005, 15:57   #1
TP-Moderator
 
Benutzerbild von Madokan
 
Registriert seit: Oct 2002
Ort: Berlin/Germany
Madokan bringt sich richtig ein
Post

Zoom-Effekt (Prototypen)


Hier eine Sammlung von nützlichen Zoom-Prototypes.

PHP-Code:
MovieClip.prototype.ZoomDiv = function (pDimpTempo)
{
    
this.onEnterFrame = function ()
    {
        if (
this._xscale pDim pTempo)
        {
            
this._xscale this._xscale + (pDim this._xscale) / pTempo;
            
this._yscale this._yscale + (pDim this._yscale) / pTempo;
        }
        else if (
this._xscale pDim pTempo)
        {
            
this._xscale this._xscale + (pDim this._xscale) / pTempo;
            
this._yscale this._yscale + (pDim this._yscale) / pTempo;
        }
        else
        {
            
this._xscale this._yscale pDim;
            
delete this.onEnterFrame;
        }
    };
};
ASSetPropFlags(MovieClip.prototype"ZoomDiv"1);

MovieClip.prototype.ZoomPulsar = function (pDimpTempo)
{
    
this.onEnterFrame = function ()
    {
        if (
this._xscale pDim)
        {
            
this._xscale this._yscale += pTempo;
        }
        else if (
this._xscale pDim)
        {
            
this._xscale this._yscale -= pTempo;
        }
        else
        {
            
this._xscale this._yscale pDim;
            
delete this.onEnterFrame;
        }
    };
};
ASSetPropFlags(MovieClip.prototype"ZoomPulsar"1);

MovieClip.prototype.ZoomAdd = function (pOptionpDimpTempo)
{
    if (
pOption)
    {
        
this.onEnterFrame = function ()
        {
            if (
this._xscale pDim)
            {
                
this._xscale this._yscale += pTempo;
            }
            else
            {
                
this._xscale this._yscale pDim;
                
delete this.onEnterFrame;
            }
        };
    }
    else
    {
        
this.onEnterFrame = function ()
        {
            if (
this._xscale pDim)
            {
                
this._xscale this._yscale -= pTempo;
            }
            else
            {
                
this._xscale this._yscale pDim;
                
delete this.onEnterFrame;
            }
        };
    }
};
ASSetPropFlags(MovieClip.prototype"ZoomAdd"1);

// Ausfürhen (Testen)
mc.onRollOver = function ()
{
    
this.ZoomDiv (2006);
};
mc.onRollOut = function ()
{
    
this.ZoomDiv (1006);
};
mc2.onRollOver = function ()
{
    
this.ZoomPulsar (2006);
};
mc2.onRollOut = function ()
{
    
this.ZoomPulsar (1006);
};
mc3.onRollOver = function ()
{
    
this.ZoomAdd (true2006);
    
// ZoomIn (true)
};
mc3.onRollOut = function ()
{
    
this.ZoomAdd (false1006);
    
// ZoomOUt (false)
};


// Interval-Varianten
MovieClip.prototype.ZoomInterval = function (pOptionpDimpTempopBps)
{        
    var 
obj this;    
    
clearInterval(obj.iv);    
    if (
pOption)
    {
        
obj.zoomIn = function ()
        {
            if (
obj._xscale pDim)
            {                
                
obj._xscale obj._yscale += pTempo;
            }
            else
            {
                
obj._xscale obj._yscale pDim;                
                
clearInterval(obj.iv);
                
delete obj.iv;
                
delete obj.zoomIn;
                
delete obj.zoomOut;
            }
        };                    
        
obj.iv setInterval(obj.zoomIn,1000/pBps);
    }
    else
    {
        
obj.zoomOut= function ()
        {
            if (
obj._xscale pDim)
            {                
                
obj._xscale obj._yscale -= pTempo;
            }
            else
            {
                
obj._xscale obj._yscale pDim;                
                
clearInterval(obj.iv);
                
delete obj.iv;
                
delete obj.zoomIn;
                
delete obj.zoomOut;
            }
        };                
        
obj.iv setInterval(obj.zoomOut,1000/pBps);
    }
};
ASSetPropFlags(MovieClip.prototype"ZoomInterval"1);

mc4.onRollOver = function ()
{
    
this.ZoomInterval (true200624); // ZoomIn (true) / 24 -> 24 Bps (Dokument-Einstellung)
};
mc4.onRollOut = function ()
{
    
this.ZoomInterval (false100624); // ZoomOUt (false) / 24 -> 24 Bps (Dokument-Einstellung)
};

MovieClip.prototype.ZoomIntervalDiv = function (pDimpTempopBps)
{
    var 
obj this;    
    
clearInterval(obj.iv);    
    
obj.zoom = function ()
    {
        if (
obj._xscale pDim pTempo)
        {            
            
obj._xscale obj._xscale + (pDim obj._xscale) / pTempo;
            
obj._yscale obj._yscale + (pDim obj._yscale) / pTempo;
        }
        else if (
obj._xscale pDim pTempo)
        {            
            
obj._xscale obj._xscale + (pDim obj._xscale) / pTempo;
            
obj._yscale obj._yscale + (pDim obj._yscale) / pTempo;
        }
        else
        {            
            
obj._xscale obj._yscale pDim;            
            
clearInterval(obj.iv);
            
delete obj.iv;
            
delete obj.zoom;
        }
    };
    
obj.iv setInterval(obj.zoom,1000/pBps);
};
ASSetPropFlags(MovieClip.prototype"ZoomIntervalDiv"1);

mc5.onRollOver = function ()
{
    
this.ZoomIntervalDiv (200624);
};
mc5.onRollOut = function ()
{
    
this.ZoomIntervalDiv (100624);
}; 
Zusatz:
PHP-Code:
Object.prototype.ZoomIntervalDiv = function (pDimpTempopBps)
{
    var 
obj this;    
    
clearInterval(obj.iv);    
    
obj.zoom = function ()
    {
        if (
obj._xscale pDim pTempo)
        {            
            
obj._xscale obj._xscale + (pDim obj._xscale) / pTempo;
            
obj._yscale obj._yscale + (pDim obj._yscale) / pTempo;
        }
        else if (
obj._xscale pDim pTempo)
        {            
            
obj._xscale obj._xscale + (pDim obj._xscale) / pTempo;
            
obj._yscale obj._yscale + (pDim obj._yscale) / pTempo;
        }
        else
        {            
            
obj._xscale obj._yscale pDim;            
            
clearInterval(obj.iv);
            
delete obj.iv;
            
delete obj.zoom;
        }
    };
    
obj.iv setInterval(obj.zoom,1000/pBps);
};
ASSetPropFlags(Object.prototype"ZoomIntervalDiv"1);

clip_mc.onRollOver = function ()
{
    
this.ZoomIntervalDiv (200624);
};
clip_mc.onRollOut = function ()
{
    
this.ZoomIntervalDiv (100624);
};

but_btn.onRollOver = function ()
{
    
this.ZoomIntervalDiv (200624);
};
but_btn.onRollOut = function ()
{
    
this.ZoomIntervalDiv (100624);
}; 
Be inspired...

Liebe Grüsse
Matze K.
Madokan ist offline   Mit Zitat antworten


Antwort

  Aktuelles Thema
  TP Hilfe Forum > Web-Editoren & Coding > Flash > Sammlung Actionscript 1 und 2
Zoom-Effekt (Prototypen) Zoom-Effekt (Prototypen)
« Alphatween für Buttons | FPS Meter (Anzeige Komponente) »

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 08:57 Uhr.

Powered by: vBulletin Version 3.7 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. / Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Traum-Projekt.com | Suchen | Archiv | Impressum | Kontakt | | | Nach oben |



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67