bas
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by bas
-
-
cool - thanks - however
i still get an exception, it seems because vars is an instance of TweenMaxVars
ReferenceError: Error #1037: Cannot assign to a method overwrite on com.greensock.data.TweenMaxVars. at com.greensock::TweenMax/init()[/users/bas/Documents/Adobe Flash Builder 4.5/FlexBased/src/com/greensock/TweenMax.as] at com.greensock::TweenMax/renderTime()[/users/bas/Documents/Adobe Flash Builder 4.5/FlexBased/src/com/greensock/TweenMax.as] at com.greensock::TimelineMax/renderTime()[/users/bas/Documents/Adobe Flash Builder 4.5/FlexBased/src/com/greensock/TimelineMax.as] at com.greensock.core::SimpleTimeline/renderTime()[/users/bas/Documents/Adobe Flash Builder 4.5/FlexBased/src/com/greensock/core/SimpleTimeline.as] at com.greensock::TweenLite$/updateAll()[/users/bas/Documents/Adobe Flash Builder 4.5/FlexBased/src/com/greensock/TweenLite.as]
which originates from in TweenMax.as
override protected function init():void { if (this.vars.startAt) { this.vars.startAt.overwrite = 0;
my suggested patch was to extract the anonymous vars object from the TweenMaxVars instance before calling the _set method... That solves it, but perhaps it could be done differently...
suggested change (works for me):
public function startAt(vars:TweenMaxVars):TweenMaxVars { return _set("startAt", vars); }
to
public function startAt(vars:TweenMaxVars):TweenMaxVars { return _set("startAt", vars.vars); }
-
hi i found a possible bug with TweenMaxVars (version 5.1) and the startAt method. The generated object in the vars property contains a repeatDelay property while utilizing the startAt method, not - as one would expect - an startAt property.
consider the following
vars = new TweenMaxVars().prop('z', 0).startAt(new TweenMaxVars().prop('z', -200)).vars; trace(ObjectUtil.toString(vars)); (Object)#0 repeatDelay = (com.greensock.data::TweenMaxVars)#1 isGSVars = true vars = (Object)#2 z = -200 z = 0
change in data.TweenMaxVars
public function startAt(vars:TweenMaxVars):TweenMaxVars { return _set("repeatDelay", vars); }
to
public function startAt(vars:TweenMaxVars):TweenMaxVars { return _set("startAt", vars.vars); }
and the vars object is what is expected
trace(ObjectUtil.toString(vars)); (String) = (Object)#0 startAt = (Object)#1 z = -200 z = 0
-
top thanks! works...
-
I did not mean to do bad form especially on my first post. my apologies...
"Could someone please confirm this is a problem or not?" wasn't an invitation then?
recreating the timeline does work fine. For this iOS project I try to reuse as much objects as possible (object pooling) that was why I choose this route. I also kind of like the idea of creating several timelines as 'behaviors' and trigger them when needed... My reason for posting here is that this seems like a bug to me. The invalidate method doesn't correctly invalidate... But perhaps it is just a side effect of the way the timeline works and is it not intended by design for what i want. I you agree i would like to hear about it someday...
anyway thanks! I love the library!
-
I seem to have a similar problem
I have are three tweens in a timeline (zoom in, rotate, zoom out). I create this timeline once per object and would ideally 'rewind' and play it every time. According to the documentation I need to use myTimeline.invalidate() and myTimeline.restart(). I think I understand why that is, however something goes wrong with the relative rotationY value in the seconds tween.
The point is that the third animation only runs once. A second time it gets skipped, but the sprite IS set to it z=0 position... When i change the rotationY value to be relatively changed the animation runs flawless (but i need it to run relative to it value) every time.
Any pointers would be appreciated.
private function onAddedToStage(event:Event):void { myTimeline = new TimelineMax(); myTimeline.append(new TweenMax(this, .36, new TweenMaxVars().prop('z', -180).ease(Strong.easeIn))); myTimeline.append(new TweenMax(this, 1.50, new TweenMaxVars().prop('rotationY', 180, true).ease(Strong.easeInOut))); myTimeline.append(new TweenMax(this, .36, new TweenMaxVars().prop('z', 0).ease(Strong.easeIn))); myTimeline.addEventListener(TweenEvent.COMPLETE, movementComplete); myTimeline.pause(); } public function startMove():void { if (isMoving) return; this.mouseEnabled = true; this.isMoving = true; myTimeline.invalidate(); myTimeline.restart(); } private function movementComplete(event:TweenEvent):void { this.isMoving = false; this.mouseEnabled = true; }
transformMatrix3D Plugin
in GSAP (Flash)
Posted
hi,
i need to tween the scale of an image, which simple to do via the scaleX/Y properties. However due to performance (iOS) i wish to examine using the transform.matrix3D which enables the gpu. The transformMatrix works as expected yet just not hardware accelerated.
unfortunately i cannot find much on tweening 3Dmatrix properties. How would you do it?
I did found reference to QuaternationPlugin but documentation on that subject is scarse and I am unsure on how to proceed with that (is it even possible to scale, with that?)
Would it be difficult to add such a plugin by modifying a copy of transformMatrixPlugin?
any insight/hint/code would be very much appreciated, thanks