Jump to content
Search Community

YellowSock

Members
  • Posts

    16
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

YellowSock's Achievements

0

Reputation

  1. Okay I've realized thanks to your help that it was that I needed currentProgress over totalProgress to resolve these issues. I think one can splice this code change at bottom into TimelineMax.as's renderTime() function to achieve true infinite looping but I'm not certain it's needed since using currentProgress causes less problems despite this....999999999999 limit //Instead of Infinity, we use 999999999999 so that we can accommodate reverses. this.cachedTotalDuration = (_repeat == -1) ? 999999999999 : this.cachedDuration * (_repeat + 1) + (_repeatDelay * _repeat); But I'm not sure what it might do to reverse as the comment warns. var totalDur:Number = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration, prevTime:Number = this.cachedTime, prevStart:Number = this.cachedStartTime, prevTimeScale:Number = this.cachedTimeScale, tween:TweenCore, isComplete:Boolean, rendered:Boolean, repeated:Boolean, next:TweenCore, dur:Number, prevPaused:Boolean = this.cachedPaused; //START INSERT if(time >= totalDur && repeat == -1) { currentProgress = 0; } //END INSERT if (time >= totalDur) { The idea of using a dummy for inquires is excellent (thank you Good thinking) but I'm currently storing and restoring the values before and after my inquiry, which I imagine is easiest (cycles wise). Since I'm still duplicating paths and haven't looked into subclassing "follow" objects to offset for centers.
  2. Right sorry. Well again this relates to my only other previous post about getting to the distributed start point first, which was mainly a confusion of usage surrounding setter getter overrides of the property totalProgress as opposed to maybe what a more intuitive function version [totalProgress()] would have lead me to believe initially. I suppose I also assumed timelines don't do anything until I actually play() them. Let me quickly explain again since it's pretty simple. I'm using my own code to distribute objects via totalProgress on a path (which happens to be a circle but the same code should work the same for all complex timelines [defined via dynamically loaded XML in my usage]). so each one starts at a different point along said path/timeline but repeats infinitely or until I say otherwise, (without using starting degrees etc. since it works with the same code for all paths.) I do think repeating (-1) should set to 1 not 999999... but restart when ending for this reason. Thanks for all the great help, toleration, and understanding it's pretty frustrating, but I think I'm through with most of the issues soon... just speed and reverse or going to be on my mind next. I can live with the trillion repeats patch. Again I'll suggest a function for inquiring where an item would be at said time without affecting it would be a useful call.
  3. Well since I've attempted to change this //Instead of Infinity, we use 999999999999 so that we can accommodate reverses. this.cachedTotalDuration = (_repeat == -1) ? 999999999999 : this.cachedDuration * (_repeat + 1) + (_repeatDelay * _repeat); 999999999999 to a 1 and add in where it tests if it's over something like... if(time >= totalDur && _repeat == -1) { time = 0; } if (time >= totalDur) { Seems the totalPosition was wrong/short and it stopped short to. Maybe I'll try again to make it just "repeat" once (1) instead of trying to live with myself at a trillion repeats tomorrow.
  4. Well I've now tried repeats above -1 999999999999 is infinity and it fails the same as -1 99999999999 this works but the initial position from distributing 3 objects on a Cicle Path via totalProgress is off 9999999999 also equally whacked position results. 999999999 now it's at a trillion repeats and the starting position seems right and it's I suppose essentially infinite over an 8 second time.
  5. No wait a minute totalProgress = 0 on a never played but freshly restarted timeline results in negatives there too... -9.99999791639 E7 So I'm not sure way but they don't play and stay frozen at point zero. Now I'm digging around debugging why the this.ratio in the renderTime function of TweenMax is not calculating. Something to do with setRatio is false? Maybe because time is equal to totalDur because of this line maybe?.... var totalDur:Number = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration, prevTime:Number = this.cachedTime, isComplete:Boolean, repeated:Boolean, setRatio:Boolean; Seems it's forcing children to end in TimelineMax ... if (prevForward) { prevTime = forceChildrenToEnd(this.cachedDuration, suppressEvents); ... which is the time of 8 seconds in this case? Still digging. PrevForward is set by... var prevForward:Boolean = Boolean(!this.yoyo || (prevCycles % 2 == 0)); It's not Yoyoing! yoyo=false & prevCycles is 0 so divided by 2 has no remander = true (I think) Well I'm pretty much lost back tracking again?! At least I'll add that this is a circle path so it's understandable I thought it never started but clearly it's ended. I've tried my other Circle path method (the one that reveals linear ease actually sins=slows at the beginning and end for some reason?!) so it's not an issue with the CirclePath2D class. [Rant] Next up the line is... if (repeated && !isComplete && (this.cachedTime != prevTime || force)) { true true true false
  6. If you set a timeline to repeat for infinity (=-1) and then set a relative start point via totalProgress (for distributed placement) an error occurs. in TweenCore.as setTotalTime function line... this.cachedStartTime = tlTime - (time / this.cachedTimeScale); Results in a negative which errors for instance one third 1/3 = 0.333333333333 starting point through an infinite timeline of... 999999999999 = 666666666666 The value time is never bigger, so a tlTime that's negative results, which is in error!? I think, or maybe it eventually starts moving forward after 1/3 of infinity? I might try replacing onComplete with a call again to repeat = 1 but that's just an external patch.
  7. Yes I was coming to say after digging in the code and tracing my issues it seems since your totalProgress property is overriding via getter and setter it caused rendering to occur. I was creating in advance various tweens (Again particularly to determine where to tween to initially - some point distributed on the next tween). I though as a timeline I have control when it renders only by playing it, and was not expecting simply setting up the totalProgress property (in advance) was going to start moving things around. Although it does make sense it should I suppose. Maybe having a function to set totalProgress() would have suggested to me more intuitively in my haste lack of knowledge and particular usage, that it might actual do something too. While also having totalProgress as a property which is obviously happening in various ways. setTotalTime() time= cacheStartTime= maybe whatever. So that was the root of much confusing and possibly worth noting. It took me days of complex source code debugging to grasp the source of confusion for my needs. My code is about 4 months of work in Flex and completely not postable,no simple FLA or way to untangle an example. Now I'll say in sudocode I... Create Main Path Tween store in target object desired totalProgress starting point store target's position set totalProgress extract now calculated desired starting position from main path restore target's original position create initial tween from original starting position to main path tweens distributed starting position play initial tween onComplete play Main Tween onComplete create and tween to original position. Now I'm trying to figure out how (in my situation) to have the center of the objects follow the path, so multiple targets on the same bath with different size (width and height) offset to the center of the path properly, alas that's the topic for another thread. I tried hacking into CirclePath2D renderAll f.target.x = f.target.x - (f.target.width / 2); f.target.y = f.target.y - (f.target.height / 2); and renderObjectAt target.x = target.x - (target.width / 2); target.y = target.y - (target.height / 2); to no avail ?! I observed the values changing in debug but it didn't translate the objects on screen.
  8. Maybe you meant Glow? there is a plugin for that. import com.greensock.*; import com.greensock.easing.*; TweenMax.to(mc, 1, {glowFilter:{color:0x3300ff, blurX:30, blurY:30}}); says it's activated in TweenMax You'd need to call this once first I believe. TweenPlugin.activate([GlowFilterPlugin]);
  9. Maybe it's when I render to find position of totalProgress that it renders all other objects in the path and they need restoring or suppressing that.
  10. I thought I had things working, now I'm not sure. I'll look deeper into what you've said. For now I'll try to sum up... I want to make Timelines or appended tweens at the same time and them play one and then the other without conflict (intuitively of course). The usage is when a bunch of items are distributed on a path via totalProgress I want to tween to the path start first. I've been trying to create a path tween in a stored timeline with a distributed start point and then move to that start point on the path/circle and when it finishes return to the original location. (the end doesn't seem to be a problem since it's initialized at onComplete of the main timeline. The issues seem to arise when I try to use renderObjectAt or renderTime on a (stored to play later) timeline to figure out where on the timeline to tween from an origin to the path's starting point first. (could be any timeline sequence of lines, beziers circles etc.) I have latest version and tried ever form of Overwite with nominal difference originally. The setEnabled stuff doesn't seem to be working like I thought it was, and functionality seems intermittent whch seems to be related to overwriting. I'm concerned my control over when a tween plays and actually starts is limited so I've though enabled=false should be an overrideable global default or something.
  11. After much digging through the code in an attempt to understand the convolutions I've come to some newer understanding I'll be exploring more. It seems if you want to make multiple timelines with a target you have to setEnabled(false) the timelines until you use them otherwise there is a chain of linkage that causes problems. I've also discovered some motionpath classes for handling circular paths but I'm still not certain if I'll be able to determine how to tween to a different starting position on a path first.
  12. You'll want to go to an ActionScript (AS3) forum that doesn't have anything to do with TweenMax. Try FlashKit... (or google) http://board.flashkit.com/board/showthread.php?t=698429 This one shows you how [keyworks] http://scriptplayground.com/tutorials/a ... nScript-3/ What you want to do is dissolve alpha (transparency) of one image to 0.0 and the other to 1.0 and back again on mouseOut Graphics and shiny or rainbow highlighting is a graphics or designer issue not much help there from programmers either. Then you want Photoshop or 3D maybe compositing, etc. Are you using fla files in Flash or more direct .as files in Flex or similar? Find an example tutorial and change it to you needs is the best newbie advice. You could try something like this fla file download link from the bottom of the page. http://www.flashkit.com/movies/Effects/ ... /index.php To answer your question to the level of TweenMax you want this kind of code in your mouse event handler... TweenLite.to(defaultButton, 1, {alpha:0.0}); TweenLite.to(shinyButton, 1, {alpha:1.0}); and back again for mouseOut. These are basic questions that have been asked again and again so you will find a plethora of answers. Good Luck and welcome to the world of AS3 it's amazingly powerful and therefore satisfying.
  13. Hmmm... I thought I posted to this earlier not sure why it didn't show up?! Maybe it needed code blocks. This version I'll have to try and make simpler. TweenLite.to(mc, 1, {scaleX:1.5, scaleY:1.5, ease:Elastic.easeInOut}); the mc is your MovieClip or button etc. next follows the amount of time (setting frames is option don't worry about that for now). in AS3 objects can be created with squigly brackets containing comma separated, colon separated pairs of properties/vars and there values so... {} === new Object() and then var changesObj:Object = {scaleX:1.1, scaleY:1.1}; is the same as var changesObj:Object = new Object(); changesObj.scaleX = 1.1; changesObj.scaleY = 1.1; Therefore the last argument is an object with the changing properties. The target (mc) should contain these properties to be tweened from current values. Any Questions?
  14. Initial HACK attempts... Well I thought to first try replacing all masterList[target] (and/or masterList[this]) reference with this... [starting in TweenLite I skipped TweenNano since I don't use that for now] Of course this probably has repercussions I've not encountered full yet. var uniqueID:String = UIDUtil.getUID(target); trace("TweenLite constructing:" + uniqueID); var a:Array = masterList[uniqueID]; So that a uniqueID is created for reference. Storing it internally in the target to say an Image class, which isn't dynamic is not possible, so it must be extrapolated for each use (at least as an initial test). This last code now plays the tm first and them plays twice the loop of tm2... so still not right but better. var tm:TimelineMax = new TimelineMax(); tm.append(new TweenMax(targetItem.link, 2, {x:600, y:100})); var tm2:TweenMax = new TweenMax(targetItem.link, 1, {x:100, y:600, repeat:3}); tm.play(); //tm2.play(); I think I was hoping to have uniquely stored references in the masterList for Timelines but this is only on target.
  15. First test var tm:TimelineMax = new TimelineMax(); tm.append(new TweenMax(targetItem.link, 2, {x:100, y:100})); tm.append(new TweenMax(targetItem.link, 1, {x:100, y:600, repeat:3})); tm.append(new TweenMax(targetItem.link, 2, {x:600, y:100})); tm.play(); YES: looping only the middle one works! var tm:TimelineMax = new TimelineMax(); tm.append(new TweenMax(targetItem.link, 2, {x:100, y:100})); new TweenMax(targetItem.link, 1, {x:100, y:600, repeat:3}); tm.append(new TweenMax(targetItem.link, 2, {x:600, y:100})); tm.play(); This version causes the first Tween to disappear (AUTO?) while the second one not part of the play()ed timeline plays twice. It starts tweening from the original origin? not from the last place the first one was to go to? This maybe somehow related to my issues. Creating an unused TweenMax shouldn't break the flow of the TimelineMax. Should it?! no. It seems the first is gone, but maybe they add? Still only repeats twice or something so it seems like a bug to me. No? var tm:TimelineMax = new TimelineMax(); tm.append(new TweenMax(targetItem.link, 2, {x:100, y:100})); tm.append(new TweenMax(targetItem.link, 2, {x:600, y:100})); var tm2:TweenMax = new TweenMax(targetItem.link, 1, {x:100, y:600, repeat:3}); tm.play(); tm2.play(); Let's note that this has the same effect as above. First Tween gone, Second (tm2) tweens twice (2 not 3 repeats or sorry it plays twice not four times), third okay. comment out the first tween to 100 100 results the same but this time tm2 plays wipping out tm altogether as potentially expected. still remove tm2.play and it's the same?!?!! four times to lower left. So It looked right but it wasn't was it? no.
×
×
  • Create New...