Jump to content
Search Community

Search the Community

Showing results for tags 'tweenlite'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Twitter


CodePen


Company Website


Location


Interests

  1. Hi all, I wanted to know how the EndArrayPlugin is different from the regular TweenLite? Comparing: var myArray:Array = [1,2,3,4]; TweenLite.to(myArray, 1.5, [10,20,30,40]); And the alternate EndArray syntax: var myArray:Array = [1,2,3,4]; TweenLite.to(myArray, 1.5, {endArray:[10,20,30,40]}); How would that be different? And I looked at the code in EndArrayPlugin, it supports round on/off which TweenLite does not? Is that the only difference or is there more? They both work, I've tested them.
  2. I'm trying to figure out the best practice for an image swap. I'm coming from AS, new to JS, but I have a basic idea of what to do -- and nothing seems to work. I'm trying to use the old 'make a UL inline for a horizontal menu' trick -- I ran through all of these options but couldn't get any to work 1) loaded both images into the <li> with different z-indexes, thinking that I'd TweenMax the top image to 0 opacity on rollover -- even with float:left they sat next to each other not on top of each other. 2) I set the "over" image as the background with CSS and put the "out" image in the <li> and then tweened the "out" image to 0 opacity on rollover. Somehow this seemed to collapse the box -- the background image wasn't displayed when the front was invisible -- this seemed to be a result of the 'display:inline' The easiest thing is to simply swap 'src' on rollover -- but I'm looking for a gradual transition. Any suggestions? I know it's hard to talk about what I'm doing/not doing without my code, but in lieu of that, if someone could provide a sample, or a link, that would be helpful. Thanks!
  3. Note: This page was created for GSAP version 2. We have since released GSAP 3 with many improvements. While it is backward compatible with most GSAP 2 features, some parts may need to be updated to work properly. Please see the GSAP 3 release notes for details. Update: don't miss our guest post on css-tricks.com, Myth Busting: CSS Animations vs. JavaScript which provides some additional data, visual examples, and a speed test focused on this topic. jQuery is the 700-pound gorilla that has been driving lots of animation on the web for years, but let's see how it fares when it steps into the ring with the feisty GSAP (GreenSock Animation Platform) which gained its fame in the Flash world and is now flexing its greased-up muscles in JavaScript. Before we put the gloves on, we need to make it clear that we've got the utmost respect for jQuery, its authors, and its community of users (to which we belong). It's a fantastic tool that we highly recommend for non-animation tasks. This tongue-in-cheek "cage match" is solely focused on animation. Performance Performance is paramount, especially on mobile devices with sluggish processors. Silky smooth animation is the hallmark of any animation platform worth its weight. This round wasn't even close. GSAP was up to 20 TIMES faster than jQuery under heavy stress. See a speed comparison for yourself or make your own. Performance winner: GSAP Controls With jQuery, you can stop an animation but that's about it. Some 3rd party plugins add resume capability, but jQuery takes a pounding in this round. GSAP's object oriented architecture allows you to pause, resume, reverse, restart, or jump to any spot in any tween. Even adjust timeScale on the fly for slow motion or fastforward effects. Place tweens in a timeline with precise scheduling (including overlaps or gaps) and then control the whole thing just like it's a single tween. All of the easing and effects remain perfectly intact as you reverse, pause, adjust timeScale, etc. And you can even kill individual portions of a tween anytime (like if a tween is controlling both "top" and "left" properties, you can kill "left" while "top" continues). Put labels in a timeline to mark important spots and seek() to them anytime. Imagine trying to build the example below using jQuery. It would be virtually impossible. With GSAP, it's easy. In fact, all of the animation is done with 2 lines of code. Drag the slider, click the buttons below, and see how easy it is to control the sequenced animation. See the Pen Impossible with jQuery: controls (used in jquery cagematch) by GreenSock (@GreenSock) on CodePen. Controls winner: GSAP Tweenable Properties jQuery.animate() works with basic numeric properties, but that's about it. If you want to do more, you'll need to rely on lots of 3rd party plugins which may have spotty support or unresolved bugs. GSAP's CSSPlugin handles almost anything you throw at it while protecting you from various browser bugs and prefix requirements. GSAP jQuery  = supported    = supported with 3rd party plugins    = partially supported with 3rd party plugins Basic numeric css properties like left, top, opacity, fontSize, etc. Supported Supported Colors like backgroundColor, borderColor, etc. Supported Supported with 3rd party plugins backgroundPosition Supported Supported with 3rd party plugins boxShadow Supported Supported with 3rd party plugins clip Supported Supported with 3rd party plugins textShadow (including multiple text shadows) Supported Partially supported with 3rd party plugins 2D transforms like rotation, scaleX, scaleY, x, y, skewX, and skewY, including 2D transformOrigin and directional rotation functionality Supported Partially supported with 3rd party plugins 3D transforms like rotationY rotationX, z, and perspective, including 3D transformOrigin and directional rotation functionality Supported Partially supported wiht 3rd party plugins borderRadius (without the need to define each corner and use browser prefixes) Supported Partially supported with 3rd party plugins className allows you to define a className (or use "+=" or "-=" to add/remove a class) and have the engine figure out which properties are different and animate the differences using whatever ease and duration you want. Supported Partially supported with 3rd party plugins Tweenable properties winner: GSAP Workflow When you're creating fun and interesting animations, workflow is critical. You need to be able to quickly build sequences, stagger start times, overlap tweens, experiment with eases, leverage various callbacks and labels, and create concise code. You need to be able to modularize your code by creating functions that each spit back an animation object (tween or timeline) which can be inserted into another timeline at a precise time. You need a flexible, powerful system that lets you experiment without wasting hours wrestling with a limited tool set. jQuery has some nice simple convenience methods like show(), hide(), fadeIn(), and fadeOut(), but GSAP bloodies its nose in this round: GSAP jQuery  = supported    = unsupported Easily create sequences (even with overlapping animations) that can be controlled as a whole Supported Unupported Flexible object-oriented architecture that allows animations to be nested inside other animations as deeply as you want Supported Unupported Animate things into place (backwards) with convenience methods like from() and staggerFrom() Supported Unupported Accommodate virtually any ease including Bounce, Elastic, SlowMo, RoughEase, SteppedEase, etc. Supported Unupported Create a staggered animation effect for an array of objects using one method call (like staggerTo(), staggerFrom(), or staggerFromTo()) Supported Unupported Easily repeat and/or yoyo a tween a specific number of times (or indefinitely) without resorting to callbacks or redundant code Supported Unupported Callbacks for when a tween or timeline starts, updates, completes, repeats, and finishes reversing, plus optionally pass any number of parameters to those callbacks Supported Unupported Place labels at specific times in a sequence so that you can seek() to them and/or insert animations there. Supported Unupported Animate any numeric property of any JavaScript object, not just DOM elements Supported Unupported Call a function whenever the entire platform finishes updating on each frame (like for a game loop) Supported Unupported Workflow winner: GSAP Compatibility Browser inconsistencies and bugs are the bane of our existence as developers. Whether it's the way Internet Explorer 8 implements opacity or Safari's transformOrigin bug that wreaks havok on 3D transforms or the fact that browser prefixes are required to enable many of the more modern browser features, you want your animations to "just work" without having to learn all the annoying hacks. jQuery does a great job of delivering cross-browser consistency overall, but when it comes to animation it falls a bit short mainly because it doesn't even attempt to handle the more modern CSS properties. No JavaScript framework can work miracles and suddenly make IE8 do fluid 3D transforms, for example, but GSAP implements a bunch of workarounds under the hood to solve problems wherever possible. It can do 2D transforms like rotation, scaleX, scaleY, x, y, skewX, and skewY all the way back to IE6 including transformOrigin and directional rotation functionality! Plus it works around scores of other browser issues so that you can focus on the important stuff. Compatibility winner: GSAP Popularity jQuery has been around for a long time and has gained incredible popularity because it does many things well. It's like the Swiss Army knife of JavaScript. There probably isn't a single JavaScript tool that's more popular than jQuery, and GSAP is no exception. As the new kid on the block, GSAP is gonna have to prove itself in the JavaScript community just like it did in the Flash community before it's crowned the undisputed champion. Popularity winner: jQuery Conflict management What happens if there's already a tween running that's controlling a particular object's property and a competing tween begins? jQuery does nothing to manage the conflict - the original tween keeps running. For example, let's say you're animating an element's "top" to 100px and that tween still has 2 seconds left before it's done, and another tween starts running that animates the same element's "top" to 0px over the course of 1 second. It would tween to 0px and then immediately jump to almost 100px and finish that [first] tween. Yuck. GSAP automatically senses these conflicts and handles them behind the scenes. In this case, it would kill the "top" portion of the first tween as soon as the second tween begins. Plus there are several other overwrite modes you can choose from if that's not the behavior you want. Conflict management winner: GSAP Support Both jQuery and GSAP have thriving support forums, but since right now jQuery has a massive user base, you're very likely to find someone with an answer to your question. Even though the GreenSock forums rarely have a question that remains unanswered for more than 24 hours, jQuery's pervasiveness gives it an edge here. On the other hand, GreenSock's forums are manned by paid staff (including the author of the platform), so you're quite likely to get solid answers there. Add to that the fact that GreenSock has a track record of being much more agile in terms of squashing bugs and releasing updates than jQuery, so we'll call this round a tie. Support winner: tie Expandability jQuery and GSAP both offer a plugin architecture, but since jQuery has been out much longer and gained so much popularity, there are numerous plugins available. Some are good, some are not, but there is a thriving community of plugin developers out there. Even though technically they're both equally expandable, the sheer number of plugins currently available for jQuery give it the advantage in this round. Expandability winner: jQuery Learning resources Again, jQuery's popularity trumps anything GSAP could throw at it right now. There are lots of tutorials, videos, and articles about jQuery whereas GSAP is new to the game. GreenSock is being aggressive about putting together solid resources (like the Jump Start tour) and the community is crankin' out some great articles and videos too, but jQuery scores the win in this round. Learning resources winner: jQuery Price & license Both jQuery and GSAP are completely free for almost every type of usage and both allow you to edit the raw source code to fix bugs (if that's something you need to do). If you plan to use GSAP in a product/app/site/game for which a fee is collected from multiple customers, you need the commercial license that comes with "Business Green" Club GreenSock memberships (one-off commercial projects don't need the special license). It's actually a more business-friendly license in many ways than a typical open source license that offers no warranties or backing of any kind or imposes code sharing or credit requirements. GreenSock's licensing model provides a small funding mechanism that benefits the entire user base because it empowers continued innovation and support, keeping it free for the vast majority of users. See the licensing page for details. jQuery employs an MIT license and is free for virtually all uses. As much as we all like "free" software, there's always a cost somewhere. jQuery has a few large corporate sponsors that have helped keep it viable. Both jQuery and GreenSock have long track records of delivering updates, bug fixes, and new features (GreenSock is newer to JavaScript, but served the Flash community since around 2006). Both count some of the largest companies in the world among their user base. Although there are some clear benefits of GreenSocks' license over jQuery's, we'll give this round to jQuery because it is technically "free" in more scenarios than GSAP. Price & license winner: jQuery File size jQuery weighs in at about 32kb gzipped and minified whereas GSAP's TweenLite and CSSPlugin are about half that combined. So in half the size, you're getting significantly more animation capabilities and speed. GSAP is built in a modular fashion that allows you to use just the parts that you need. Of course jQuery serves many other purposes beyond animation, but in this cage match we're focused on animation. Even if you add up TweenLite, TimelineLite, TimelineMax, TweenMax, EasePack, CSSPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin, and RoundPropsPlugin, it's still almost 20% less than jQuery. File size winner: GSAP Flexibility Let's face it: any tweening engine can handle the basics of animating one value to another, but it's really the details and advanced features that make a robust platform shine. GSAP crushes jQuery when it comes to delivering a refined, professional-grade tool set that's truly flexible. All these conveniences are baked into GSAP (no 3rd party plugins required): Tween any numeric property of any object. Optionally round values to the nearest integer to make sure they're always landing on whole pixels/values. Animate along Bezier curves, even rotating along with the path or plotting a smoothly curved Bezier through a set of points you provide (including 3D!). GSAP's Bezier system is super flexible in that it's not just for x/y/z coordinates - it can handle ANY set of properties. Plus it will automatically adjust the movement so that it's correctly proportioned the entire way, avoiding a common problem that plagues Bezier animation systems. You can define Bezier data as Cubic or Quadratic or raw anchor points. Animate any color property of any JavaScript object (not just DOM elements). Define colors in any of the common formats like #F00 or #FF0000 or rgb(255,0,0) or rgba(255,0,0,1) or hsl(30, 50%, 80%) or hsla(30, 50%, 80%, 0.5) or "red". Set a custom fps (frames per second) for the entire engine. The default is 60fps. All tweens are perfectly synchronized (unlike many other tweening engines). Use the modern requestAnimationFrame API to drive refreshes or a standard setTimeout (default is requestAnimationFrame with a fallback to setTimeout) Tons of easing options including proprietary SlowMo, RoughEase and SteppedEase along with all the industry standards Animate css style sheet rules themselves with CSSRulePlugin Animate the rotation of an object in a specific direction (clockwise, counter-clockwise, or whichever is shortest) by appending "_cw", "_ccw", and "_short" to the value. You can tween getter/setter methods, not just properties. For example, myObject.getProp() and myObject.setProp() can be tweened like TweenLite.to(myObject, 1, {setProp:10}); and it will automatically recognize that it's a method and call getProp() to get the current value when the tween starts. Same for jQuery-style getters/setters that use a shared method like myObject.prop(). You can even tween another tween or timeline! For example, TweenLite.to(otherTween, 1, {timeScale:0.5}) would animate otherTween.timeScale to 0.5 over the course of 1 second. You can even scrub the virtual playhead of one tween/timeine with another tween by animating its "time". Use plugins like ThrowPropsPlugin for momentum-based motion, and RaphaelPlugin, EaselPlugin, and KineticPlugin for those [canvas or svg] libraries (Raphael, EaselJS, and KineticJS). Plus there are physics-based plugins like Phyics2DPlugin and PhysicsPropsPlugin as well as a fun ScrambleTextPlugin for Club GreenSock members. Flexibility winner: GSAP Conclusion jQuery eeked out a few decent rounds, but ultimately GSAP left it lying on the mat in a pool of its own blood. Of course we're slightly biased, but check out the facts for yourself. Kick the tires. Audition GSAP on your next project. See how it feels. If you only need simple fades or very basic animation, jQuery is probably just fine. In fact, its fadeIn() and fadeOut() methods are quite convenient. However, what happens when your client wants to do something more expressive? Or what if they start complaining that animation isn't smooth on mobile devices? Why not build on a solid foundation to begin with so that you don't find yourself having to rewrite all your animation code? If you want professional-grade scripted animation, look no further. To get started fast, check out our Jump Start tour. Update: there's now a jquery.gsap.js plugin that allows you to continue using jQuery.animate() but have GSAP drive the animations under the hood, thus delivering much better speed plus a bunch of new properties that you can tween (like colors, 2D and 3D transforms, boxShadow, textShadow, borderRadius, clip, etc.). Read more about the plugin here. Recommended reading: Main GSAP JS page jQuery.animate() with GSAP: get the jquery.gsap.js plugin! Why GSAP? A practical guide for developers Jump Start: GSAP JS CSS3 transitions vs GSAP: cage match Speed comparison 3D Transforms & More CSS3 Goodies Arrive in GSAP JS
  4. I am trying to make a flash that has twinkling stars. I thought it would be a simple effect. All I want is the alpha to fade in and out on a randomly generated cycle. And have the AS inside the star so every time I place one it will fade in and out on its own. var cycle:Number = Math.random() * 4; TweenLite.To(mc, cycle, {alpha:0, repeat:-1, yoyo:true}); But I am missing something because it will appear and fade out and not repeat or yoyo. Thanks cH
  5. Hi, I couldnt find an answer to this on the forums. Appologies if a similar thread exists. I am as my name suggests; new to greensock and flash-programming. Current code is working and moves the "hero" up and down to fixed locations in my game: private function keyPressed(event:KeyboardEvent):void { if (oppnedcount <2 && event.keyCode==38) { if (oppnedcount == 0) { oppnedcount++; TweenLite.to(hero, 0.3, {y:(421)}); } else { oppnedcount++; TweenLite.to(hero, 0.3, {y:(365)}); } } if (oppnedcount > 0 && event.keyCode==40) { if (oppnedcount == 2) { oppnedcount--; TweenLite.to(hero, 0.3, {y:(421)}); } else { oppnedcount--; TweenLite.to(hero, 0.3, {y:(477)}); } } } "Attatched" to the heros X- and Y-pos i have a running particle-object. Is there a way to rotate the angle of this particle-object DURING the tween of my "hero"? Preferrably using the tweenlite-code and not adding a timer to calculate the 0.3 seconds of my tweens. Thanks in advance, best regards
  6. I'm trying to create an animation (timelineLite animation) that can be controlled by a scrollbar or scrubber. a perfect example of which, is the demo swfs on the TimelineLite page as well as the TimelineMax page. The scrollbar has to allow the viewer to play the animation forward and scrub the animation in reverse. Thanks in advance!
  7. http://forums.greensock.com/topic/6734-tweenlite-does-not-animate/page__gopid__24844#entry24844 What happened, I uploaded a file so someone could take a look but now it's gone...? Did I violate some rule?
  8. So I tried searching this on here and stackoverflow too, but can't seem to find the exact same issue. I've drawn an object using shapes on the stage. I grouped everything in a movieclip called "number_mc". After which I wanted to Animate the scaleX and scaleY values of that movieclip like so: var scaleAnim:TweenLite = new TweenLite(nummer_mc, 2.5, {scaleX: 2, scaleY: 2}); or TweenLite.to(nummer_mc, 2.5, {scaleX: 2, scaleY: 2}); But they just don't work, nothing happens, To my believe I'm not doing something different from the dozen times I've done this before. Kind Regards, Shuyinsan PS: I use Flash CS6 btw (in case this matters)
  9. Hi. I'm writing a particle tweening script that tweens a bunch of dom elements, which I each give a slightly more delay. Everything looks fine, but when I switch tabs in my browser (chrome, but same in safari) and after that go back to the tab with my particle tweens, the delay seems to be ignored.. All the tweens start at the same time, without the delay! Any idea why this is? If you don't understand what I mean, I could upload the script to my hosting as an example. Oh, and I thought about using timelinelite for this, but I really want the sort of plugin I'm writing to not be dependent of timelinelite, only of tweenlite. Edit: I've uploaded the test project to my webhost so you can see the problem yourself. http://sanderbruggem...cles/index.html Open the page in a tab, then click on another tab, wait a few seconds and go back to the tab with my test project: the particles "explode" now instead of continuously loop.. I think I know why: the first time the tween is played, the delay is taken into account, but then when I call "restart()" on the tween in onComplete, the delay is not added anymore. Which in general is good: the tween already has an offset regarding the other tweens because of the initial delay. However, probably for speed reasons, when navigating away from the page, all the tweens are being reset/paused or whatever, and on focus again all the tweens are played again (but this time without the initial delay, because it practically fires "restart()" but this time on all the tweens at the same time). So my question actually is: what type of event is used to determine if the window/tab is focussed, so I can intercept this (i've had partial success with window.onfocus() and window.onblur()) OR is there maybe another solution for this?
  10. There have been a number of posts here about various ways to preload images or build dynamic slideshows with the javascript version of GSAP. Please check out this tutorial by Michael from nightlycoding.com. He did an excellent job: http://nightlycoding.com/index.php/2012/09/image-slideshow-with-preloadjs-jquery-and-tweenmax/ Keep an eye on him. He has a number of GreenSock tutorials. Very cool. Carl ---
  11. I am trying to create a timeline that is populated with content from an xml source. My questions are: How do I fade out the previous mc for the next mc? How do I restart the whole she-bang after the mcs have been populated? How do I reset the timeline when the xml file is updated? function loadTaglines():void { for ( var i:uint = 0; i < xml.length(); i++ ){ var tagline = new mc; tagline.txt_tagline.text = xml.tagline[i] tagline.x = 816; tagline.y = 47; tagline.scaleX = 4; tagline.scaleY = 4; tagline.alpha = 0; addChild(tagline).name = tagline + i; timeline.append( new TweenLite (tagline, .5, {scaleX:1, scaleY:1, alpha:1) ); } }
  12. Dear Tutors, This is Sanjib i have a flash web banner which has two kind of navigation in it one is "next and previous button" and second one is "Tween Animated Tab navigation at the bottom" you can download the the folder of the banner by clicking on this link "http://www.touchpixl...er1/banner1.rar" . I want to change the dimension "width or height" of the banner, can anyone make the same logic in a banner in flash file format and upload some where or send it to me at "sanjibpersonaldata@gmail.com", you can see the banner here "http://www.touchpixl.com/banner1" I would like to mention that i have lost the flash file of the "holder" file nad without that i am not being able to increase or decrease the dimension of this banner/slide. Thanks in advance Sanjib Das
  13. Hi all, I started routinely using Tweenlite.to() static method instead of a Timer by setting a fake target (like 'this') and just putting a onComplete on the tweenvars object. I dunno if I should, what about the efficiency of that trick? TweenLite.to(this,2,{onComplete:myFunc}); function myFunc() { //My instructions... }
  14. Alan

    bezier in javascript

    Hi, I wonder if we will have bezier support in javascript version soon? I had a great success with greensock and easelJs together, I can almost 100% duplicate what I have done with actionscript 3 before, apart from bezier curve animation...
  15. I have some code that scrolls a movieClip. The problem is I cannot get the onComplete to fire and remove the listener. It will fire when the clip reaches its bounds but not any time in between. Does my code prevent the tween from completing? import com.greensock.*; import flash.display.MovieClip; var mc:Sprite = new Sprite(); mc.graphics.beginGradientFill(GradientType.LINEAR, [0x666666,0xfff000],[0.9,0.1],[0,255], new Matrix(0,-1,1,0,height,0)); mc.graphics.drawRect(225, 50, 100, 300) addChild(mc); var destination:Point=new Point(); var dragging:Boolean=false; var speed:Number=20; var offset:Point=new Point(); var topLimit:Number = 0 - ( mc.height - (stage.height-50) ); var bottomLimit:Number = 120; mc.addEventListener(MouseEvent.MOUSE_DOWN,startdrag, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP,stopdrag, false, 0, true); function startdrag(e:MouseEvent):void{ offset.y=mc.mouseY*mc.scaleY; dragging=true; mc.addEventListener(Event.ENTER_FRAME,followmouse, false, 0, true); } function stopdrag(e:MouseEvent):void{ dragging=false; } function followmouse(e:Event):void{ if(dragging){ destination.y=mouseY; } TweenLite.to(mc, 2, {y:mc.y-=(mc.y-(destination.y-offset.y))/speed, onComplete:removeEFListener}); if(mc.y > bottomLimit){ mc.removeEventListener(Event.ENTER_FRAME,followmouse); TweenLite.to(mc, .6, {y:bottomLimit}); trace('removedBottom'); } if(mc.y<topLimit){ TweenLite.to(mc, .6, {y:topLimit}); mc.removeEventListener(Event.ENTER_FRAME,followmouse); trace('removedTop'); } } function removeEFListener():void{ mc.removeEventListener(Event.ENTER_FRAME,followmouse); trace('removedEL'); } Note: This code is repurposed. I lost the source for the original code and gladly give credit where its due - so if its yours, thanks and good job.
  16. Hi, here is one I hope simple problem. I`m using tweenlite to simple rotate some stuff and then to trigger some sound when wheel reach a certain position: TweenLite.to(_myWheel, _speed, {rotation:_suspension + (_pieIndex * _pieAngle), immediateRender:true, useFrames:false, ease:easeFunct, onUpdate:playTickSound }); private function playTickSound ():void { trace (Math.round(_myWheel.rotation)); _isWhole = (Math.round(_myWheel.rotation) / Math.round(_pieAngle)) % 1 == 0; if (_isWhole) playSimpleSound(); } To exactly calculate _isWhole = true, I need to have Math.round(_myWheel.rotation) exact position every time when onUpdate occurs. Anyways, for some reason I don`t get those info right, so here is what I get when I try to trace it: trace (Math.round(myWheel.rotation)); 139 156 171 -176 -162 -144 -130 -119 -109 -98 -88 -78 -67 -54 -42 -30 -19 -9 1 11 21 30 39 51 63 76 86 95 103 111 118 126 135 143 150 157 165 172 179 -174 -168 -162 -155 -148 -140 -133 -127 -121 -116 -110 -104 -99 -93 -87 -81 -76 -70 -65 -61 -57 -52 -48 -43 -39 -34 -30 -27 -23 -20 -17 -14 -11 -8 -5 -2 0 2 4 5 7 9 11 12 14 15 16 17 18 19 20 21 21 22 22 22 23
  17. flag468x90.zipHi all While trying out the new v12 GSAP with a small 468x90 banner I noticed the background image shifts a few pixels, like a quick snapping movement once it starts to loop via a label in the timelinelite. Why is this happening? The bg image is img_fundo_mc. Thanks for your help. The code: import com.greensock.*; import com.greensock.easing.*; var tl:TimelineLite = new TimelineLite({onComplete:loopBackground}); tl.append( TweenLite.from(img_flag_mc, .5, {x:"-=100", ease:Power4.easeOut}) ); tl.append( TweenLite.from(img_cursos_mc, .5, {y:"-=100", ease:Power4.easeOut}) ); tl.append( TweenLite.from(img_saber_mc, .5, {alpha:0, ease:Power4.easeOut}) ); tl.append( TweenLite.from(img_fundo_mc, 1, {alpha:0, ease:Power4.easeOut}) ); tl.insert( TweenLite.to(img_fundo_mc, 2, {x:-13, y:-16, scaleX:0.75, scaleY:0.75, rotation:-10, ease:Power3.easeInOut}), "loop"); tl.append( TweenLite.to(img_fundo_mc, 2, {x:-69, y:-168, scaleX:0.90, scaleY:0.90, rotation:10, ease:Power3.easeInOut}) ); tl.append( TweenLite.to(img_fundo_mc, 2, {x:0, y:0, scaleX:1.0, scaleY:1.0, rotation:0, ease:Power3.easeInOut}) ); function loopBackground():void { tl.play("loop") }
  18. I'm writing an app thatdoes a zoom in and out around a point. To do this I registered a callback function that does a matrix transform. Everything is working great except for the fact that the cllback is called an inconsistent number of times. For a 1 second duration at 24 frames per second the function is called between 23-25 times. Is this a bug or should I be doing something different? I would think the number of times the callback is called would be equal to duration * frameRate. Below is the call I am using: TweenLite.to(target, this.duration, {ease:Elastic.easeOut , onUpdate:MotionUtil.zoomOut, onUpdateParams:[ target, scaleIncrement, _origin, _originalScale ], onComplete:onComplete }); Thanks in advance for any help you can offer.
  19. I'm trying to plug this into my custom framework before I pull the trigger on a commercial licence and I might be asking a super noob question but I have looked through a bit of the documentation and from what I can tell there is no way of manually updating a tween through a external function. bool = true; TweenLite.to(someMC, frameCount, {useFrames:true, updateOnFunction:updateTween, onComplete:tweenComplete}); public function render():void { if(bool) updateTween(); } public function tweenComplete():void { bool = false; } I'm sure I can program some roundabout way to get this to work but I am hoping I am simply blind Xp
  20. I'm having problems with the code below. For some reason when I export I only see the last tween appear and thats it. I'm using the overwrite manager but I'm not sure if it's working correctly or not. I'm not a advanced Flash user so any help would be greatly appreciated. I have the file attached as well. import com.greensock.*; import com.greensock.easing.*; OverwriteManager.init(OverwriteManager.AUTO); // Intro Animations TweenLite.from (gfx7, 1, { _alpha:0 }); TweenLite.from (statement, .7, { _x:7, _y:175, _alpha:0, _delay:0.5 }); TweenLite.to (statement, .7, { _x:7, _y:175, _alpha:0, _delay:3.5 });
×
×
  • Create New...