Jump to content
Search Community

Relative scale not working?

moxol test
Moderator Tag

Recommended Posts

Is the tween you are applying the TweenMaxVars to a from() tween or a to() tween?

Setting a value as relative doesn't change a to() tween to a from() tween.

 

if an mc has an x of 100 and you tween to a relative value of 200, that just means it tweens to 200 more than its existing value.

 

Tweening that mc to a relative x of 200 will have it land on 300.

 

Make sense?

 

If you still have trouble, please provide the full code you are using so we can test it.

 

Thanks.

Link to comment
Share on other sites

I have question again regarding relative move.

 

I tried

tweenMaxVars.y(-10, true);

var tweenMax:TweenMax = new TweenMax(obj, 1, tweenMaxVars1);

 

and I thought y value will go -10, meaning object will go up, but instead it goes down, and value y is increasing instead of decreasing.

 

Why?

Link to comment
Share on other sites

I wonder if you have a cached version? When you open the TweenMaxVars file, what version does it say at the top (and revision date)?

In file VERSION: 12.01, but I always use greensock.swc.

Please, always build identical versions of swc's with files.

Link to comment
Share on other sites

It really sounds like you have an old/cached version. I have double-checked and there are no such trace() statements in there. I even uploaded the files several times. Please double-check on your end and re-download and try again?

 

Which zip file are you downloading?

 

I download AS3 version from http://www.greensock.com/v12/

 

trace() statements are still there.

I just tried now.

Let me just be clear. Maybe you are reffering to .as files. I am using greensok.swc.

Link to comment
Share on other sites

If it's of help, code that is giving me trace statements is:

 

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
		   xmlns:s="library://ns.adobe.com/flex/spark"
		  xmlns:mx="library://ns.adobe.com/flex/halo"
 click="onc()">

<fx:Declarations>
 <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>

<fx:Script>
 <![CDATA[
 import com.greensock.TweenMax;
 import com.greensock.TimelineMax;
 import com.greensock.data.TweenMaxVars;
 import com.greensock.easing.*;

 private function onc():void
 {
  lblObj.y = 100;

  var tweenMaxVars1:TweenMaxVars = new TweenMaxVars();
  tweenMaxVars1.y(-10,true);
  tweenMaxVars1.autoAlpha(1);
  tweenMaxVars1.ease(Quart.easeOut);

  var tweenMax1:TweenMax = new TweenMax(lblObj, 1, tweenMaxVars1);

  var tweenMaxVars2:TweenMaxVars = new TweenMaxVars();
  tweenMaxVars2.y(-10,true);
  tweenMaxVars2.autoAlpha(0);
  tweenMaxVars2.ease(Quart.easeOut);

  var tweenMax2:TweenMax = new TweenMax(lblObj, 1, tweenMaxVars2);

  var timeline:TimelineMax = new TimelineMax();

  timeline.append(tweenMax1);
  timeline.append(tweenMax2);
 }
 ]]>
</fx:Script>
<s:Label id="lblObj"
 x="200"
 y="100"
 fontSize="80"
 text="A"
 alpha="0"
 />
</s:Application>

 

Click anywhere on stage.

Link to comment
Share on other sites

I test it, and obviously .as files are not compiled, meaning greensock.swc version is older then .as files.

.as files doesn't show trace statements while greensock.swc does.

 

Again, I am urging you not to publish unsync versions of .as and greensock.swc file, it just brings unnecessary confusion.

Link to comment
Share on other sites

I don't publish unsynchronized versions. Like I said, I have triple-checked and published with the .swc file and I see absolutely no trace() statements. I have recompiled the .swc multiple times. I'm really baffled about why you're seeing that trace. Can anyone else reproduce this?

 

moxol, you're absolutely positive you aren't using a cached version, right? Maybe you need to clear your ASO files?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...