Search In
• More options...
Find results that contain...
Find results in...

# gigbig

Members

59

1. ## Tween from percentage to percentage

Ok, I wasn't stopping the tween, I missed this detail The TimeLineMax version is great too, as I can completely exclude TweenLite and ignore the duration of the resulting tween. Thank you Carl and Jamie!
2. ## Tween from percentage to percentage

Hi, I have created a tween to move an object from a point A to a point B with bezier trajectory: I have to dynamically calculate the starting and ending points, that will be percentages of the whole animation. How can I tell the tween to run from i.e. 23% to 78% of the whole animation (obviously in 78-23% of the total time)? I think I have to use progress property, but maybe I am doing something wrong, because it looks like the animation runs from 23 to 78% and then to 100%. I am doing like this: var timeLine: TimelineLite = new TimelineLite(); timeLine.fromTo(item, totalTime, { x: 0, y: 0 }, { bezier: { type:"thruBasic", values: [ { x: 300, y: 200 }, { x: 500, y: 800 } ] }, ease: Linear.easeNone } ); TweenLite.fromTo(timeLine, totalTime* (0.8 - 0.5), {progress: 0.5 }, {progress: 0.8, ease: Sine.easeOut } ); I have to learn a lot about timelines...
3. ## Led wheel-of-fortune animation

Yeah, I have written those lines in a hurry, sorry. I think the call function is what I needed! Oh, and your tutorial looks perfect to understand the concept: are you going to create an updated version for v12? I am sometimes confused by the v11 and v12 examples, maybe because I am pretty new to GSAP timelines. Thank you Carl!
4. ## Led wheel-of-fortune animation

Hi! Today I have returned on that piece of code, and I have combined the previously separated Tweens of the leds (delayed in order to simulate a slowing down spinning wheel) into a timeline. Previously I was using an approach similar to this: for (var i:uint = 0; i<led.length; i++) { delay += Math.pow(step, 2); TweenLite.delayedCall(delay, flashLed(i)); } Now I have converted it in a timeline: var ledTimeline: TimeLineLite = new TimeLineLite(); for (var i:uint = 0; i<led.length; i++) { delay = Math.pow(step, 2); ledTimeline.to(dummy, delay, {onStart: flashLed(i)}); } that should reproduce the same identical animation. BUT! But if I want to use an ease instead of the delay calculation...... I could do like this var ledTimeline: TimeLineLite = new TimeLineLite({ease: Quad.easeOut}); for (var i:uint = 0; i<led.length; i++) { ledTimeline.to(dummy, 0.1, {onStart: flashLed(i)}); } right? I would create a sequence with a constant speed, bended by the ease to slow down it, without slowing down the flashLed animation, this is important. I still have to try this solution, what do you think about it? I am sort of faking the timeline with a dummy object to execute my flashLed function into an eased sequence.
5. ## CirclePath2D wrong direction

Ok, thank you Jack!
6. ## CirclePath2D wrong direction

I am tweening an objct on a circular path: TweenLite.to(glareMC, 2, { circlePath2D: { path: circlePath, startAngle: 225, endAngle: 225, direction: Direction.COUNTER_CLOCKWISE, extraRevolutions: 1 }} ); I'd expect to see a CCW motion, as specified in the direction property, but the glareMC moves CW: why? If I change endAngle to whatever different from startAngle the animation looks correct: is this an unhandled exception of the motionPath engine?
7. ## Error handling

Hi, I have often stumbled on errors pointing to Greensock classes, on a certain misterious line that has appearantly nothing to do with the real problem, usually a missing/null object or an unknown property. Is there a way to handle errors (try-catch) caused by tweens? I'd like to know about a missing object before crashing into a GSAP class.
8. ## killTweensOf on multiple tweened objects

Uh! Great! Thank you!
9. ## killTweensOf on multiple tweened objects

Well, I didn't think about killing tweens of an array, my mistake. Anyway I think that this approach would not work for me, as the array of elements to tween can change, so I am obligued to killTweensOf the single elements. In the meanwhile I am tweening elements separately, assigning the onComplete to just one of them, obviously. Waiting for the new release, and, as always... keep on the good work! Thank you Jack!
10. ## killTweensOf on multiple tweened objects

Hi, I am trying to kill the common tween assigned to two movieclips TweenLite.to([obj1, obj2], 1, { y: 10, onComplete: smile } ); If I do something like TweenLite.killTweensOf(obj1); TweenLite.killTweensOf(obj2); the onComplete function continue to exhist, but why? I am doing something wrong for sure...
11. ## SteppedEase not working

Well, you are the guru Jamie's solution is good, I am adopting equivalent solutions for various cases. I was just wondering if an event system could be possible, but it looks like it would be the wrong way to proceed. Ok! No, problem! Thank you Jack and Jamie!
12. ## SteppedEase not working

Yes, you're right, this case is very simple and I am not working on an 8088 anymore, but for very complex contexts an event phylosophy would be more clear and efficient, don't you think? I don't know if a new property "onStep" is in the plans of the future releases (it would be specific just for this ease), but it sounds very natural to me, when using a "step" parameter.
13. ## SteppedEase not working

Well, yes, it works, but that way I am updating both the score (rounding it to int) and movieclip once per ENTER_FRAME, and not 10 times as it seems. I could add a variation check (if score != previousScore) to avoid redrawing the gfx when not needed. If I could intercept the STEP event of SteppedEase I could write very short, efficient and clean pieces of code. It could be a cool addition for future GSAP releases
14. ## SteppedEase not working

Hi, I am trying to tween a number that grows progressively: I have a totalAmount and the number of total steps to reach it. I should have something like this: TweenLite.to(this, totalTime, { ***textfieldText: totalAmount***, ease:SteppedEase.create(steps) } ); My problem is: how can I increase the amount in a textfield at each step? I tried a few solutions, but I don't know how to execute actions at each step. I have the onUpdate property, but it is synchronized with the tween updates, not the step event. Maybe I am missing the onStep property or something similar...

var itemsNames:Vector.<String> = queue.getLoader("audioLib").rawContent.loaderInfo.applicationDomain.getQualifiedDefinitionNames(); Great! It works! Thank you! It could be a nice code snippet to add to the docs

17. ## Led wheel-of-fortune animation

Yeah! Thank you Carl! Your post convinced me to start using timelines, and I wounder how I could do without them. BUT... timeline does not solve my problem, unless I miss something. I have to nest the leds animations/tweens into a timeline, at a fixed distance from eachother, and this is ok, offset is what I needed (ah, I am using v11). Now I can choose the ease for the whole timeline, and this is fine, BUT I'd like to execute the nested animations/tweens (the leds) at the native speed, independently from the timeline speed/ease: is this possible? In the past I tried updating from 11 to 12, but I encountered a problem (VerifyError: Error #1053, maybe a have to recompile all the SWFs). What about the recent discussion about the timeline modifications? I read something about it, but I don't remember the details. If I switch to v12, will I have to modify the timelines written in v11? Thank you!
18. ## Led wheel-of-fortune animation

Hi, I am trying to create a sort of wheel of fortune animation: I have 37 numbers, I always start from the first number, I know how many numbers I have to pass before reaching the right one (I could complete more than one cycle) and the time needed. The basic tween to turn a number on like a fading led is something like this TweenLite.to(led#, 0.5, {onInit: setLedAlphaTo1, alpha: 0, ease: Linear.easeNone}); If I have to make 2 cycles and a half I will create about 93 tweens, this not a problem. My problem is: how do I tween the sequence of tweens using an ease? That is: i.e. I want to tween these 93 tween on 5 seconds with an ease:Quad.easeOut, making the spinning gradually slowing down. I thought about TimeLineLite-Max, but... if I append the 93 tweens they will start as soon as the previous one has completed, but this is not the case as they partly overlap, and then I don't know if I can tween the total time with an ease. Have you got any idea of how I can do this? Thanks
19. ## Recompiling swfs independently from parent swf

Noone knows if application domain could be the problem? I'd like to focus on a possible problem to fix it, otherwise I think I should abandon the project. I don't know if it is a LoaderMax problem, as I switched from regular loader from the beginning.
20. ## Recompiling swfs independently from parent swf

Hi, I am having big time losses in creating a project: I have multiple games that use a common AssetsLoader class to load a toolbar manager (agent), that loads a toolbar through another assetsloader. The structure is as follows: a single configurable toolbar, 3 agents (toolbar managers) for 3 kinds of games, 80 games. Now, when I modify the toolbar code I can recompile it, it takes a few seconds, and the same is for the 3 agents, but recompiling 80 games is terrible! Why should I recompile all games? I noticed that if I modify the toolbar or an agent I have to recompile the parent cascaded swfs, otherwise I wouldn't see the agent or toolbar modifications in game as if recompiling the game I included agent and toolbar inside it. If I modify a game I need to recompile it, and it is ok; if I modify an agent I have to recompile it and all the games that load it; if I recompile the toolbar I have to recomile it, all agents, and consequently all games, and this is absolutely no good! I tried to cast the agent to * instead of the corresponding interface, but nothing changed. I tried to mess around with the application domains (trying to use a different sandbox for the agent and the toolbar), but I think I don't know very well how this works. I use LoaderMax for assets, and interfaces to access an agent from games and the toolbar from agents: game -> interface(agent) -> interface(toolbar). Can you help me please?
21. ## OnComplete gives me a value as it was before the tween

Yeah, it was my mistake, I know that () is no good I didn't know about the () behaviour, thank you for your explanation!
22. ## OnComplete gives me a value as it was before the tween

Ah! oNComplete is evaluated at the tween creation? Good to know, so I have to call an external function. I didn't know that () means "execute immediately": what does this imply? Does it execute it just once at the first tween step? Thank you Carl!
23. ## OnComplete gives me a value as it was before the tween

Hi, I am using TweenLite with Away3D, and I am rescaling a Mesh with an Elastic tween: the code is as follows TweenLite.to(this, magnifyTime, {x: this.x + deltaX, z: this.z + deltaZ, y: this.y * zoomScale, scaleX: diceScale * zoomScale, scaleY: diceScale * zoomScale, scaleZ: diceScale * zoomScale, onUpdate: updateShadow(), ease: Elastic.easeOut, onComplete: trace, onCompleteParams: ["this.scaleX = " + this.scaleX]} ); My problem is that the mesh (this) scales correctly, multiplying the initial scale 1 by 2.5, obtaining a 2.5 scale, but when the tween reaches the onComplete event it traces "1"! WHY?! Am I missing a stupid detail I can't see? I need to update the shadow in the onUpdate event, but if I can't get the correct mesh scale it remains unchanged! The onComplete event it just a test, I will delete it: I need the changing value of the scale, but the tween register the initial value, so... who can I constantly update the shadow with the correct scale?
24. ## extracting bitmap from a swf class

Fixed! Idiot me: I have to remember that I instance a CLASS from the loader, and I have to instance it to obtain an object, it is not an object yet! Then I can simply throw it on a normal Bitmap.
25. ## extracting bitmap from a swf class

Hi, my question could sound noobish, but... I'am having a headache trying to do a very simple operation. I have loaded a SWF with SWFLoader, and now I want to instance a Bitmap with linkage "DotMatrixPattern" and use its Bitmap content to create a pattern with beginBitmapFill: the problem is... how do I extract the Bitmap from DotMatrixPattern? I am able to instance DotMatrixPattern, but then? DotMatrixPattern.rawContent? No! undefined! What am I doing wrong?
×