NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Graphic Design / Flash
Reload this Page Tween Problem

Graphic Design / Flash Photoshop, Flash, and other visual art topics including software, fonts, animation.

Advanced Search
0 members in live chat ~  
NamePros Design Contests NamePros Design Contests
Forum Sponsorship
Join in on the FUN! You can start an affordable design contest and pick from entries talented members submit or you can enter a design contest for a chance to win CASH PRIZES! What are you waiting for? Get started in the fun TODAY! - Banners, Logos, Mascots, and MORE! (Please READ the design Contest section rules Prior to starting or entering a contest)



Closed Thread
 
LinkBack Thread Tools
Old 01-26-2007, 04:56 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
food_consult's Avatar
Join Date: Feb 2003
Posts: 950
food_consult is on a distinguished road
 



Tween Problem


The Tween function is not working... can anyone tell me what is messed up??!

thanks


PHP Code:
if (_global.$tweenManager == undefined)
{
    
_global.$tweenManager = new zigo.tweenManager();
}
else
{
    
_global.$tweenManager.cleanUp();
    
_global.$tweenManager.init();
// end if
com.robertpenner.easing.Back;
com.robertpenner.easing.Bounce;
com.robertpenner.easing.Circ;
com.robertpenner.easing.Cubic;
com.robertpenner.easing.Elastic;
com.robertpenner.easing.Expo;
com.robertpenner.easing.Linear;
com.robertpenner.easing.Quad;
com.robertpenner.easing.Quart;
com.robertpenner.easing.Quint;
com.robertpenner.easing.Sine;
var 
Mp MovieClip.prototype;
Mp.addListener = function ()
{
    if (!
this._listeners)
    {
        
AsBroadcaster.initialize(this);
    } 
// end if
    
this.addListener.apply(thisargs);
};
ASSetPropFlags(Mp"addListener"10);
Mp.tween = function (propspEndsecondsanimTypedelaycallbackextra1extra2)
{
    if (
_global.$tweenManager.isTweenLocked(this))
    {
        
trace("tween not added, this movieclip is locked");
        return(
undefined);
    } 
// end if
    
if (arguments.length 2)
    {
        
trace("tween not added, props & pEnd must be defined");
        return(
undefined);
    } 
// end if
    
if (typeof(props) == "string")
    {
        if (
props.indexOf(",") > -1)
        {
            
props props.split(" ").join("").split(",");
        }
        else
        {
            
props = [props];
        } 
// end if
    
// end if
    
if (!(pEnd instanceof Array))
    {
        
pEnd = [pEnd];
        while (
pEnd.length props.length)
        {
            
pEnd.push(pEnd[0]);
        } 
// end while
    
// end if
    
if (seconds == undefined)
    {
        
seconds 2;
    }
    else if (
seconds 0.010000)
    {
        
seconds 0;
    } 
// end if
    
if (delay 0.010000 || delay == undefined)
    {
        
delay 0;
    } 
// end if
    
switch (typeof(animType))
    {
        case 
"string":
        {
            
animType animType.toLowerCase();
            if (
animType == "linear")
            {
                var 
eqf com.robertpenner.easing.Linear.easeNone;
            }
            else if (
animType.indexOf("easeoutin") == 0)
            {
                var 
animType.substr(9);
                
t.charAt(0).toUpperCase() + t.substr(1);
                var 
eqf com.robertpenner.easing[t].easeOutIn;
            }
            else if (
animType.indexOf("easeinout") == 0)
            {
                var 
animType.substr(9);
                
t.charAt(0).toUpperCase() + t.substr(1);
                var 
eqf com.robertpenner.easing[t].easeInOut;
            }
            else if (
animType.indexOf("easein") == 0)
            {
                var 
animType.substr(6);
                
t.charAt(0).toUpperCase() + t.substr(1);
                var 
eqf com.robertpenner.easing[t].easeIn;
            }
            else if (
animType.indexOf("easeout") == 0)
            {
                var 
animType.substr(7);
                
t.charAt(0).toUpperCase() + t.substr(1);
                var 
eqf com.robertpenner.easing[t].easeOut;
            } 
// end if
            
if (eqf == undefined)
            {
                var 
eqf com.robertpenner.easing.Expo.easeOut;
            } 
// end if
            
break;
        } 
        case 
"function":
        {
            var 
eqf animType;
            break;
        } 
        case 
"object":
        {
            if (
animType.ease != undefined && animType.pts != undefined)
            {
                var 
eqf animType.ease;
                
extra1 animType.pts;
            }
            else
            {
                var 
eqf com.robertpenner.easing.Expo.easeOut;
            } 
// end if
            
break;
        } 
        default:
        {
            var 
eqf com.robertpenner.easing.Expo.easeOut;
        } 
    } 
// End of switch
    
switch (typeof(callback))
    {
        case 
"function":
        {
            
callback = {funccallbackscopethis._parent};
            break;
        } 
        case 
"string":
        {
            var 
ilp;
            var 
funcp;
            var 
scope;
            var 
args;
            var 
a;
            
ilp callback.indexOf("(");
            
funcp callback.slice(0ilp);
            
scope funcp.slice(0funcp.lastIndexOf("."));
            
func funcp;
            
args callback.slice(ilp 1callback.lastIndexOf(")")).split(",");
            var 
0;
            while (
args.length)
            {
                
args[i];
                if (
!= undefined)
                {
                    
args[i] = a;
                } 
// end if
                
i++;
            } 
// end while
            
callback = {funcfuncscopescopeargsargs};
            break;
        } 
    } 
// End of switch
    
if (_global.$tweenManager.autoStop)
    {
        
_global.$tweenManager.removeTween(this);
    } 
// end if
    
if (delay 0)
    {
        
_global.$tweenManager.addTweenWithDelay(delaythispropspEndsecondseqfcallbackextra1extra2);
    }
    else
    {
        
_global.$tweenManager.addTween(thispropspEndsecondseqfcallbackextra1extra2);
    } 
// end if
};
Mp.stopTween = function (props)
{
    if (
typeof(props) == "string")
    {
        if (
props.indexOf(",") > -1)
        {
            var 
_l3 props.split(" ").join("").split(",");
        }
        else
        {
            
_l3 = [_l3];
        } 
// end if
    
// end if
    
_global.$tweenManager.removeTween(this_l3);
};
Mp.isTweening = function (prop)
{
    return(
_global.$tweenManager.isTweening(thisprop));
};
Mp.getTweens = function ()
{
    return(
_global.$tweenManager.getTweens(this));
};
Mp.lockTween = function ()
{
    
_global.$tweenManager.lockTween(thistrue);
};
Mp.unlockTween = function ()
{
    
_global.$tweenManager.lockTween(thisfalse);
};
Mp.isTweenLocked = function ()
{
    return(
_global.$tweenManager.isTweenLocked(this));
};
Mp.isTweenPaused = function (prop)
{
    return(
_global.$tweenManager.isTweenPaused(thisprop));
};
Mp.pauseTween = function (props)
{
    var 
_l4;
    if (
props != undefined)
    {
        if (
typeof(props) == "string")
        {
            if (
props.indexOf(",") > -1)
            {
                var 
_l3 props.split(" ").join("").split(",");
            }
            else
            {
                
_l3 = [_l3];
            } 
// end if
        
// end if
        
_l4 = {};
        while (
_l3 != null)
        {
            var 
_l5 _l3;
            
_l4[_l3[_l5]] = true;
        } 
// end while
    
// end if
    
_global.$tweenManager.pauseTween(this_l4);
};
Mp.unpauseTween = function (props)
????: NamePros.com http://www.namepros.com/graphic-design-flash/286576-tween-problem.html
{
    var 
_l4;
    if (
props != undefined)
    {
        if (
typeof(props) == "string")
        {
            if (
props.indexOf(",") > -1)
            {
                var 
_l3 props.split(" ").join("").split(",");
            }
            else
            {
                
_l3 = [_l3];
            } 
// end if
        
// end if
        
_l4 = {};
        while (
_l3 != null)
        {
            var 
_l5 _l3;
            
_l4[_l3[_l5]] = true;
        } 
// end while
    
// end if
    
_global.$tweenManager.unpauseTween(this_l4);
};
Mp.pauseAllTweens = function ()
{
    
_global.$tweenManager.pauseTween();
};
Mp.unpauseAllTweens = function ()
{
    
_global.$tweenManager.unpauseTween();
};
Mp.stopAllTweens = function ()
{
    
_global.$tweenManager.stopAll();
};
Mp.ffTween = function (props)
{
    var 
_l4;
    if (
props != undefined)
    {
        if (
typeof(props) == "string")
        {
            if (
props.indexOf(",") > -1)
            {
                var 
_l3 props.split(" ").join("").split(",");
            }
            else
            {
                
_l3 = [_l3];
            } 
// end if
        
// end if
        
_l4 = {};
        while (
_l3 != null)
        {
            var 
_l5 _l3;
            
_l4[_l3[_l5]] = true;
        } 
// end while
    
// end if
    
_global.$tweenManager.ffTween(this_l4);
};
Mp.rewTween = function (props)
{
    var 
_l4;
    if (
props != undefined)
    {
        if (
typeof(props) == "string")
        {
            if (
props.indexOf(",") > -1)
            {
                var 
_l3 props.split(" ").join("").split(",");
            }
            else
            {
                
_l3 = [_l3];
            } 
// end if
        
// end if
        
_l4 = {};
        while (
_l3 != null)
        {
            var 
_l5 _l3;
            
_l4[_l3[_l5]] = true;
        } 
// end while
    
// end if
    
_global.$tweenManager.rewTween(this_l4);
};
Mp.alphaTo = function (destAlphasecondsanimTypedelaycallbackextra1extra2)
{
    
this.tween(["_alpha"], [destAlpha], secondsanimTypedelaycallbackextra1extra2);
};
Mp.scaleTo = function (destScalesecondsanimTypedelaycallbackextra1extra2)
{
    
this.tween(["_xscale""_yscale"], [destScaledestScale], secondsanimTypedelaycallbackextra1extra2);
};
Mp.sizeTo = function (destSizesecondsanimTypedelaycallbackextra1extra2)
????: NamePros.com http://www.namepros.com/showthread.php?t=286576
{
    
this.tween(["_width""_height"], [destSizedestSize], secondsanimTypedelaycallbackextra1extra2);
};
Mp.slideTo = function (destXdestYsecondsanimTypedelaycallbackextra1extra2)
{
    
this.tween(["_x""_y"], [destXdestY], secondsanimTypedelaycallbackextra1extra2);
};
Mp.rotateTo = function (destRotationsecondsanimTypedelaycallbackextra1extra2)
{
    
this.tween(["_rotation"], [destRotation], secondsanimTypedelaycallbackextra1extra2);
};
_global.getColorTransObj = function (typeamtrgb)
{
    switch (
type)
    {
        case 
"brightness":
        {
            var 
_l4 100 Math.abs(amt);
            var 
_l6 0;
            if (
amt 0)
            {
                
_l6 256 * (amt 100);
            } 
// end if
            
return({ra_l4rb_l6ga_l4gb_l6ba_l4bb_l6});
        } 
        case 
"brightOffset":
        {
            
_l6 256 * (amt 100);
            return({
ra100rb_l6ga100gb_l6ba100bb_l6});
        } 
        case 
"contrast":
        {
            var 
_l2 = {};
            
_l2.ra _l2.ga _l2.ba amt;
            
_l2.rb _l2.gb _l2.bb 128 1.280000 amt;
            return(
_l2);
        } 
        case 
"invertColor":
        {
            
_l2 = {};
            
_l2.ra _l2.ga _l2.ba 100 amt;
            
_l2.rb _l2.gb _l2.bb amt 2.550000;
            return(
_l2);
        } 
        case 
"tint":
        {
            if (
rgb == undefined || rgb == null)
            {
                break;
            } 
// end if
            
var _l8 rgb >> 16;
            var 
_l9 rgb >> 255;
            var 
_l7 rgb 255;
            var 
_l5 amt 100;
            
_l2 = {rb_l8 _l5gb_l9 _l5bb_l7 _l5};
            
_l2.ra _l2.ga _l2.ba 100 amt;
            return(
_l2);
        } 
    } 
// End of switch
    
return({rb0ra100gb0ga100bb0ba100});
};
Mp.brightnessTo = function (brightsecondsanimTypedelaycallbackextra1extra2)
{
    
this.tween(["_ct_"], [getColorTransObj("brightness"bright)], secondsanimTypedelaycallbackextra1extra2);
};
Mp.brightOffsetTo = function (percentsecondsanimTypedelaycallbackextra1extra2)
{
    
this.tween(["_ct_"], [getColorTransObj("brightOffset"percent)], secondsanimTypedelaycallbackextra1extra2);
};
Mp.contrastTo = function (percentsecondsanimTypedelaycallbackextra1extra2)
{
    
this.tween(["_ct_"], [getColorTransObj("contrast"percent)], secondsanimTypedelaycallbackextra1extra2);
};
Mp.colorTo = function (rgbsecondsanimTypedelaycallbackextra1extra2)
{
    
this.tween(["_ct_"], [getColorTransObj("tint"100rgb)], secondsanimTypedelaycallbackextra1extra2);
};
Mp.colorTransformTo = function (rarbgagbbabbaaabsecondsanimTypedelaycallbackextra1extra2)
{
    var 
_l2 = {rararbrbgagagbgbbababbbbaaaaabab};
    
this.tween(["_ct_"], [_l2], secondsanimTypedelaycallbackextra1extra2);
};
Mp.invertColorTo = function (percentsecondsanimTypedelaycallbackextra1extra2)
{
    
this.tween(["_ct_"], [getColorTransObj("invertColor"percent)], secondsanimTypedelaycallbackextra1extra2);
};
Mp.tintTo = function (rgbpercentsecondsanimTypedelaycallbackextra1extra2)
{
    
this.tween(["_ct_"], [getColorTransObj("tint"percentrgb)], secondsanimTypedelaycallbackextra1extra2);
};
Mp.getFrame = function ()
{
    return(
this._currentframe);
};
Mp.setFrame = function (fr)
{
    
this.gotoAndStop(Math.round(fr));
};
Mp.addProperty("_frame"Mp.getFrameMp.setFrame);
Mp.frameTo = function (endframedurationanimTypedelaycallbackextra1extra2)
{
    if (
endframe == undefined)
    {
        var 
_l2 this._totalframes;
    } 
// end if
    
this.tween("_frame"_l2durationanimTypedelaycallbackextra1extra2);
};
var 
TFP TextField.prototype;
if (!
TFP.origAddListener)
{
    
TFP.origAddListener TFP.addListener;
    
ASSetPropFlags(TFP"origAddListener"10);
    
TFP.addListener = function ()
    {
        if (!
this._listeners)
        {
            
AsBroadcaster.initialize(this);
        } 
// end if
        
this.origAddListener.apply(thisargs);
    };
// end if
var $_$methods = ["tween""stopTween""isTweening""getTweens""lockTween""isTweenLocked""unlockTween""isTweenPaused""pauseTween""unpauseTween""pauseAllTweens""unpauseAllTweens""stopAllTweens""ffTween""rewTween""getFrame""setFrame""_frame""frameTo""alphaTo""brightnessTo""colorTo""colorTransformTo""invertColorTo""tintTo""scaleTo""sizeTo""slideTo""rotateTo""brightOffsetTo""contrastTo"];
for (var 
$_$i in $_$methods)
{
    
ASSetPropFlags(Mp$_$methods[$_$i], 10);
    if (
$_$methods[$_$i].toLowerCase().indexOf("frame") == -1)
    {
        
TFP[$_$methods[$_$i]] = Mp[$_$methods[$_$i]];
        
ASSetPropFlags(TFP$_$methods[$_$i], 10);
    } 
// end if
// end of for...in
delete Mp;
delete TFP;
delete $_$methods;
delete $_$i;
about.alphaTo(1001"linear"0.500000);
store.alphaTo(1001"linear"1);
products.alphaTo(1001"linear"1.500000);
gifts.alphaTo(1001"linear"2);
weddings.alphaTo(1001"linear"2.500000);
events.alphaTo(1001"linear"3);
press2.alphaTo(1001"linear"3.500000);
contact.alphaTo(1001"linear"4);
about.onRelease = function ()
{
    
getURL("about.html");
};
store.onRelease = function ()
{
    
getURL("/shop/store.cfm");
};
products.onRelease = function ()
{
    
getURL("products.html");
};
gifts.onRelease = function ()
{
    
getURL("gift_bouquets.html");
};
weddings.onRelease = function ()
{
    
getURL("weddings.html");
};
events.onRelease = function ()
{
    
getURL("events.html");
};
press2.onRelease = function ()
{
    
getURL("press.html");
};
contact.onRelease = function ()
{
    
getURL("contact.html");
}; 
food_consult is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 06:26 AM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger