Jump to content
Search Community

protoemocional

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by protoemocional

  1. Hello dear TweenMaxers and Greensock, Once again I resort to you to... This time, I have some doubts on how to insert a TweenMax instance onto a Timeline without triggering its first position. Take for example this attachment, where I have described a LinePath2D with progress 0, inserting its Tween at frame number 5, yet it still renders its elements on stage, instantly. Is there a way to inserting/appending/whatever Tweens without having to write action snippets on every desired frame, in order to not render a Tween's trajectory on the spot?
  2. Thanks for such an illustrating explanation, I had always wondered about all those 0.nines in the source files. Quite interesting, this time-wrapping (un)paradox.
  3. Hello, I have spotted strange behaviour using LinePath2D in conjunction with SteppedEase and useFrames turned on. It basically avoids state 0 of the LinePath2D when you step once per frame. Please see the attachment. Is this intended behaviour? How can it be solved? Thanks in advance.
  4. Nevermind, I think I solved the issue. Anyhow, I have noticed that if you have a TimelineMax (time1) variable instantiated directly in your document class, nothing you append from within the IDE timeline will progress beyond state 0. This become even worse if you want to append some global TimelineMax (time1, time2, time3) variables to a master TimelineMax (master.append()), also from within the document class. To append to "master", you have to instantiate them first. But if you want to append anything to them from within the IDE timeline frames, you need to reinstantiate them and thus loose all of master's inherited properties – for instance, useFrames. This means that Timelines are made to act as modules, so... you can't just control them globally, regardless of appending-by-frame? Thanks, as always.
  5. Hello, Is it possible to "extend" the TweenMax class, in order to add some customized functions? Suppose I have this function, toLine():TweenMax, that returns new Tweens according to different data that is manipulated dinamically within reach of the Document class (or perhaps an instance of another class). var t:TimelineMax = new TimelineMax(); t.append(TweenMax.toLine(movieclip, somevariable, someothervariable)); Is this at all possible using OOP? Or am I just daydreaming? Thanks a lot, any pointers appreciated.
  6. Eternal gratefulness to you, I just wanted to add my own (obtuse) way of dealing with the inherent limitations of this callback method, i.e. no parameter availability, in order to reuse the onChangeRatio plugin for different tween instances: var pic:Picture = new Picture(); doTween(pic, 24, true); doTween(p:Picture, delay:int, frame:Boolean):void { var tween:TweenLite = new TweenLite(p, delay, {useFrames: frame, x:500, onChangeRatio: function() { trace(p.x)}, ease:SteppedEase.create(12)}); } Hope this helps.
  7. I was about to change my last message as I've been experimenting with the "ratio" property. I did settle for something similar to your proposition. I've been checking your plugins with the hopes of writing this onChangeRatio feature myself, but I'm afraid of ruining your architecture with my absolute lack of proper knowledge. I'll be checking here if you end up writing this plugin, for the sake of others as well, but I understand of course that you are now busy, end of the year, etc. Thanks anyways for your permanent willingness to help, and to solve. Good luck.
  8. I had already tried this method of relying on conditional comparisons on some MovieClip's position, but the thing is, sometimes you are not tweening coordinates but other properties. I see two alternatives to this, unfortunately, intentional behaviour: a – Using some kind of "property changed" Event but this is way out of my actual knowledge, anyone knows of custom events running around the web? b - Using the "ratio" property as mentioned, but this might seem a little too complicated for determining frame intervals, always requiring by-frame divisions, modulo operations, rounding, etc. I see this as overkill, but perhaps I didn't really understand what you mean, Greensock, by saying that I could I say this because, of course, this property changes in tandem to frames, so we go back to the beginning of alternative b. Please clarify this point, if I didn't understood correctly. Thank you very much...
  9. Hello again... I think I found the first bug working with SteppedEase. Let your .FLA have 24 frames per second, you have your mc on stage and you want it to move once every 3 frames (24 * 3 = 72) TweenMax.to(mc, 72, {x:250, useFrames:true, ease:SteppedEase.create(5), onUpdate:onUpdate}); function onUpdate():void { trace("this is not your 3-frame interval"); } Clearly, the onUpdate function is being triggered by frame changes and not for every 3 frames – in other words, it is not being triggered when mc changes x position. I suppose this happens if you are actually using the Timeline within your .FLA, Any thoughts?
  10. Don't know how to use the SOLVED label, but this is solved. Thanks.
  11. Thanks a lot man, this is exactly what I was looking for. I think these type of features give extra credit to your engine, as a highly robust system grown out of the simple need for transitioning (as opposed to strict tweening). As for me, this is the reason why I end up coming back to yours, anyways, great support and responsiveness BTW – just like with the other special, RoughEase.
  12. Yes, you got it. Steps is a nice way to put it, as something opposed to transition ramps. In my case, I'm more interested in frame-based updating than seconds, but yeah, something like what you describe in your formula is right up with what I thought. Will be checking then...
  13. In line with my most recent question... I know that whenever you define a LinePath2D, each point in an array is joined with the last point in order to create one single line. This is typical of a vectorial-style drawing. Is it possible to set a discontinuous path, like in my picture, where 1, 2, and 3 define different trajectories that form a single path? In this way, whenever a shape finishes a line, it is immediatly 'teleported' to the next line. I reckon you can do this with Timelines, but perhaps this is not the best way, if at all... Thank you very much, and congratulations for your engine.
  14. Thanks for your quick response... I've posted three pictures representing different times. You've got a 10 x 10 grid (could be boxes or pixels, it doesn't matter) and one square shape. I want to be able to define paths with your TweenMax engine and make my shapes follow them, but on a frame schedule and without transitions. For instance, define a path that has points in (0,0), (0,1) and (0,2). I want my square to move through those points as you'd see in those pictures, no transitions, just basic positioning per frame; in this particular case, per 3 frames. Is this possible to do with TweenMax without too much overkill?
  15. Hello TweenMaxers, This one is written specially to mr. Greensock himself as this is a very peculiar question... I know this is kind of absurd since Tweens are used to give a sense of fluidity to motion, but I was wondering if there was some alternative in TweenMax in order to NOT give easing to motion. Say, in a 10x10 grid you want to move from (0, 0) to (0,9) by only passing through the slots in the grid (a la Tetris), without 0. to 1. transitions. Is this possible to do with TweenMax? For instance, tell a square movieclip to move from (0,0) to (0,9) in 3–frame intervals? I know this is silly, but I don't want to lose all the TweenMax functionalities. I'm thinking about the excellent LinePath2D, which allows me to move shapes along each point and saves me much time... Thanks everybody,
  16. Hello good people, I've spent almost two afternoons trying to solve this simple problem, checking multiple times for every item involved. I'm using a TimelineMax variable (t1) instanced in the class constructor, which is supposed to do a sequence whenever a mouse CLICK event triggers a dclick function. The problem comes only when I use TweenMax.allTo() inside a Timeline; if outside it behaves properly. Now, the defacto sequence does occur, but the AS3 Output window gives me this: TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.greensock::TimelineLite/insert() at com.greensock::TimelineLite/insertMultiple() at Exo/dclick() at Exo/CLICK() The code is this: private function dclick(r:Number):void { ti.insertMultiple([TweenMax.to(mc1, r, {y:300, yoyo:true}), TweenMax.allTo(mc_array, r, {tint:0xFFFFFFFF}, 0.3)], 0, TweenAlign.SEQUENCE, 0.1); } Please help me....
  17. Hey Greensock, It is indeed an interesting and rare challenge. Unfortunately, I did not find your new easing class approaching the kind of roughness I needed. Here are some ideas that you could apply, since I'm a no-brainer in scripting: - Above all, the roughness on the tween should be based on the on both coordinates (x,y). If the path is diagonal, throw some trigonometry there. I'm thinking about emulating sound wave algorithms for the tween: a triangular wave, a sinewave, a sinusoid. Check them out, they are the best way to bring that stuttering, glitchy feeling. I did post a day ago my very own function to apply to a custom Bezier. Unfortunately, I'm afraid my scripting skills don't allow me to do much with it, it may need serious improvements. It works more fluid than squarely, since it's based on Bezier, but it may be worth checking out. Look for "custom Bezier triangular function" or something, it's still on the first page of the forum. - In the case that the tween is just horizontal or vertical, with no diagonals, I advise you to focus on the coordinate opposite to movement: If you're moving on the x-axis, the y-axis should become more affected. Otherwise, the sensation is more like a drunken, squared bezier curve. It may be useful but it doesn't give the sense of movement in that way. - Optimization, bitwise operators, better random functions than the Adobe preset. I am using your function though, and thank you for posting the code. Maybe I'm doing something wrong? I'd like to move the MovieClip on the y-axis when moving along x-axis, but I can't find a way to do so... Goodbye.... -
  18. Hello folks, I improvised a function for the Bezier plugin that may accomodate more easily to a given stage's dimensions. This function is only working for straight lines though, in which either x or y stays the same from the original point and the destination point. Its made to produce a triangular wave along a given line, to give an effect that is opposite to easing... I have 2 questions now: - I'm pretty sure there must be a more efficiente algorithm for producing th tirangular sequence, maybe similar to an actual triangular wave algorithm? I mean that one needs to go from 0 to 3 to 0 to -3 to 0 to 3, etc.... Please, if anyone sees something to fix or to optimize, post it! - The implementation has a bug; it will not complete a given sequence from the array unless the Tween function assigns sufficient time to do so. Please, if anyone can help me, we could contribute something to this community! BTW, great job to Mr. GreenSock! var arr:Array= []; //f.x and f.y are the destination points, d.x and d.y are the origin poins Bezier(f.x,d.x,f.y,d.y); function Bezier(x2:int,x1:int,y2:int,y1:int):void { var lx:int=x2-x1; //length of line x var len:int=lx>0?lx:y2-y1; //if line x = 0, line length of line y var lp:int=Math.round(len/20); //number of points for the triangle var xyes:Boolean=lx>0?true:false; //boolean to pass x or y value length var up:Boolean=true; //boolean for the pattern making, wether negative or positive var ori:int=xyes==true?x1:y1; //first point of origin var sine:int=y1; //point of origin, in this case the y coordinate var f:int=0; //int flag for change trace(sine); for (var ii:int= 0; ii < lp; ii++) { ori+=lp; arr.push({x:ori, y:sine}); if (up) { if (sine==126) { sine+=3; } else { sine-=3; } f++; if (f==2) { up = !up; f=0; } } else { if (sine==126) { sine-=3; } else { sine+=3; } f++; if (f==2) { up = !up; f=0; } } } } TweenLite.to(d, 0.5, {bezier:arr});
  19. Dear TweenMax users, I have another question: How can I disort the x,y space on the stage, in order for an object moving towards X:0 to being appearing from X:stage.Width? In other words, anyone old enough here can remember those Atari/early Nintendo games, where the character upon approaching the right extreme of the screen would appear at the opposing side, the left side. I have devised a system using 2 identical movieclips, 1 TweenMax constructor, 1 TweenMax.fromTo method, and 1 TimelineMax to coordinate the, using the stagger and align properties. To anyone who iss a genius on this, is there any other method with which I'd be able to use less variables and objects (in other words, optimized)? Or perhaps should I look at classes to modify the stage coordinates independently? Thanks a lot!
  20. This question might sound stupid, considering the very function intended for TweenLite/Max. How can I make any kind of stuttered movement, still using TweenLite/Max? What I mean is, I don't want to make smooth tweens, but glitched and rough ones. Since I'm not goot at math, I have no idea how to design an easing equation for this (think of a sawtooth wave). Can anyone point me out on the right track? Easing eqautions visualizer? Other tools? Thanks a lot!
×
×
  • Create New...