Jump to content


  • Posts

  • Joined

  • Last visited

About Exhumator

  • Birthday 11/29/1989

Profile Information

  • Gender
  • Location

Exhumator's Achievements


Newbie (1/14)



  1. So, are these codes equal? Code #1: tl.set("element", { color: "red" }); // code #1 tl.to("element", 0, { color: "red" }); // code #2
  2. @GreenSock thanks for clarification. Now i understand i need to use timeline.invalidate() method when i want to change some of the cached values, like inner html.
  3. I've seen modifiers plugin, why this doesn't work either? I thought modifiers plugin is made for this. var messages = ["1", "2", "3", "4", "5"]; var tl = new TimelineMax({ repeat: -1 }); function getRandomValueFromArray(a) { return a[Math.floor( Math.random() * a.length )]; } tl.set("#message", { text: "this works well" }); tl.set("#message", { modifiers: { text: function() { return getRandomValueFromArray(messages); } } }); tl.to("#message", 1, { color: "red" });
  4. Hi, @mikel Thanks for your effort and code. It works good. But i still don't understand why do I have to do it this way? Why my code doesn't work?
  5. Greetings! I am trying to randomly change text in DIV in the timeline with "text" attribute (TextPlugins is loaded) but it doesn't work. I think I miss something important but don't know what it is. The right scenario of this codepen would be: Randomly set value from "messages" array. Change color to red. Repeat it. Could anybody give me advice how to do it, please?
  6. Fantastic. Thank you for your time and effort.
  7. Hello, I am trying to animate every single word in a sentence, lets say we have following div: <div id="words">I am the best</div> and now we want to animate every single word ("I", "am", "the" and "best") animate in custom way. Lets say we want: "I" to fly in from the left "am" to fly in from the top "the" to fly in from the right "best" to fly in from the bottom What's the best way of doing it? Do I really need to create every single DIV before the animation?
  8. Hello, I am trying to make object that randomly changes position forever, but now it changes position only once. I have tried to use "modifiers" but it didn't work either - it just ignored duration and animated the object instantly (position was changed in less than 20ms). Any ideas?
  9. Well, I understand what you mean by points 1 and 2. I am trying to make this: the grey line represents master line red, blue, green and orange lines are randomly faded elements - their duration is random (longer the line is, the longer duration is) Now, I am trying to understand how to code this type of animation properly, so I started with idea of master timeline that has function-generated timeline inside. But I can't imagine how to do that simultaneously (as it is on the picture).
  10. Hello, I am trying to add a dynamically created object via function into the master timeline. What I am trying to achieve is: create an element with unique ID make animation with it (it should fade in) destroy it I can create it and destroy it, but I am not able to animate it right now. Any ideas why this code doesn't work?
  11. Ok, actualy my question is - can i somehow run tween earlier? Something like this: tl.to("#object", 1, { autoAlpha: 1 }, "-=1"); // but can "-=1" be delivered by function as return value? something like this: tl.to("#object", 1, { autoAlpha: 1 }, function() { return "-=1"; });
  12. Thank you I've got one more question - how to properly code timeline which animates randomly created objects that can be created simultaneously (at the same time or when some are still being animated)?
  13. Imagine something like this: tl.to("#object", 1 { autoAlpha: 1 }); tl.to("#object", 1 { autoAlpha: 0 }); if (some_condition) { tl.to("#object2", 3 { autoAlpha: 1 }); } else { tl.to("#object3", 2, { autoAlpha: 1 }); } I mean, I would like to make some decision right in the timeline.
  14. Can I also randomly define what instructions will play? I mean randomly generated instructions for timeline? Can I do it realtime, too (for example "if condition is met, do this, else do this in the timeline")?
  15. Thank you very much, it works like a charm