Jump to content
GreenSock

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

Kaleb242

ShockinglyGreen
  • Posts

    8
  • Joined

  • Last visited

About Kaleb242

  • Birthday 09/13/1977

Profile Information

  • Gender
    Male
  • Location
    San Francisco, CA

Kaleb242's Achievements

  1. Thanks Jack! @GreenSock It's the GSAP 3 migration guide that has no mention of .killDelayedCallsTo() or .killTweensOf() -- but you are correct, the Release Notes does mention it in the last bullet point under "What old code will definitely break?" 😅 .killDelayedCallsTo() is now .killTweensOf(). I wish it were as simple as find and replace... we're trying to migrate over 1,071 pages in 25 locales from various versions of greensock 1.x/2.x to the latest GSAP 3.6.0, and phasing out ScrollMagic for the super amazing ScrollTrigger Plugin for all new pages going forward, but permissions on various legacy pages in our corporate publishing platform prevents me from making direct edits to legacy code in Raw HTML Components on many of the pages... so all I can really do right now is switch the code library that is used site-wide. Rewriting old syntax to new syntax is currently out of scope, there are too many pages to manually port over from greensock 1.x/2.x to GSAP 3.6.0, but I'm trying hard to get us on the latest version of everything, and not have to switch between old and new versions of GSAP... I'd like to try and keep it evergreen site-wide, globally. We're trying to roll out a new accessible navigation system site-wide, and I've written everything for that navigation system in the superior GSAP 3 syntax, but several legacy pages are now breaking when I replace TweenMax 1.x/2.x with the latest GSAP 3.6.0 library. What I really don't want to have to do (but may have no other choice) is to rewrite the navigation system in legacy TweenMax syntax, in order to allow legacy pages to stay on old versions of greensock 1.x/2.x TweenMax, and newer pages to run on the latest version of GSAP 3.x.
  2. Thanks Zach; as mentioned, I'm aware of the new GSAP 3 equivalent method gsap.killTweensOf()... I was hoping that the GSAP 3 migration guide and release notes could be updated to mention that TweenMax.killDelayedCallsTo() was removed? (It's definitely a little roadblock in TweenMax backwards compatibility.) https://greensock.com/3-migration/ https://greensock.com/3-release-notes/ It would also be helpful if the GSAP 3 documentation for gsap.delayedCall() could also mention gsap.killTweensOf() -- currently it only mentions gsap.kill() https://greensock.com/docs/v3/GSAP/gsap.delayedCall() Do you know if there is a way to "bring back" the TweenMax.killDelayedCallsTo() method and have it pass along to the new gsap.killTweensOf() method for backwards compatibility without rewriting references that were written in the old syntax?
  3. I went through the GSAP 3 Migration Guide and GSAP 3 Release Notes, but haven't seen this documented there... GSAP 2's TweenLite.killDelayedCallsTo(function) and TweenMax.killDelayedCallsTo(function) have been removed, and the GSAP 3 equivalent seems to be gsap.killTweensOf(object) I have a ton of legacy code written in GSAP 1.x / 2.x, and discovered TweenMax.killDelayedCallsTo in several places in the code base, which throw errors when they are encountered. Removal of it in GSAP 3 has made the migration process a bit rough. I wish there was some kind of TweenMax legacy adapter plugin that I could import for enhanced backwards compatibility to help legacy GSAP 1.x/2.x syntax projects run seamlessly under GSAP 3 without having to make major rewrites to old syntax on things that have been removed in GSAP 3 that could basically remap references made in old TweenMax syntax to GSAP 3 equivalents (without having to bloat GSAP 3 with internal references on new pages written in GSAP 3 syntax). I know most of the old syntax of TweenLite and TweenMax tweens still work under GSAP 3 (thanks to internal references), but this particular one was omitted... and throws code breaking errors. Something that could be imported just on legacy pages would be super helpful...
  4. Since autoPlay:false loops through all movieclips of the loaded swf and stops them from running, you may find that you'll need to restart all movieclips on the timeline of your loaded swf when you want to play it at a later time on demand... just calling play() on the rawContent may not be enough. In my case, I discovered that the designer that gave me several AS3 swfs to load, also included several animated movieclip masks on the timeline, which autoPlay:false had stopped every clip on the timeline, so they needed to be restarted. The appearance was not the same without these movieclips playing too. It would be handy to have a public method to restart those same timeline clips that are stopped by autoPlay:false 's trigger of the _stopMovieClips method. In my case, I created a method to play the internal clips by reverse-engineering the _stopMovieClips method: var contents:ContentDisplay = LoaderMax.getContent("mainClip"); playMovieClips(contents.rawContent); public function playMovieClips(obj:DisplayObject):void { var mc:MovieClip = obj as MovieClip; if (mc == null) { return; } mc.play(); var i:int = mc.numChildren; while (--i > -1) { playMovieClips(mc.getChildAt(i)); } } Would be a nice addition to SWFLoader, considering that we'll need to write a playMovieClips function for every project that uses SWFLoader with autoPlay:false that has loaded swfs with movieclips containing timeline animations inside them. Perhaps I should be using autoPlay:true to avoid the _stopMovieClips method from ever being called, and then call a stop() on the main timeline of the loaded swf when the load is complete, to avoid every MovieClip on the main timeline from being stopped.
  5. Thanks Jack. LoaderMax.getContent("mainClip").rawContent.visible = true; LoaderMax.getContent("mainClip").rawContent.play();
  6. After using SWFLoader with autoPlay:false to load a swf and stop it's contents, how can you get the content to play later (on demand)? Here's my set of loaded swf files... var queue:LoaderMax = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}); queue.append( new SWFLoader("swfs/main.swf", {name:"mainClip", estimatedBytes:211461, container:container_mc, x:0, y:0, visible:false, autoPlay:false}) ); queue.append( new SWFLoader("swfs/promo1.swf", {name:"promo1", estimatedBytes:190440, container:container_mc, x:0, y:0, visible:false, autoPlay:false}) ); queue.append( new SWFLoader("swfs/promo2.swf", {name:"promo2", estimatedBytes:76251, container:container_mc, x:0, y:0, visible:false, autoPlay:false}) ); I see that there is a protected method in SWFLoader.as called _stopMovieClips(obj:DisplayObject) used when autoPlay==false, but I don't see a public method such as playMovieClips() to be used later if you have used autoPlay:false initially. What is the best strategy for preloading several swfs with autoPlay set to false, then targeting one of these later and play() it's contents? I'm loading in AS3 .SWF files that are timeline animations provided by a designer with no stop frames on them, so I need to use autoPlay:false, and want to trigger one to play at a later time (after loading is complete, of course). I traced the following trying to pinpoint the loaded swf to target, but I'm having difficulty trying to get it to play... trace((container_mc.getChildAt(0).name)); // mainClip trace((container_mc.getChildAt(0).parent).name); // container_mc trace((container_mc.getChildAt(0).parent.parent).name); // root1 trace((queue.content)); // [object ContentDisplay] It's probably something very simple, I'm just not finding a quick solution in the documentation and I want to make sure that I do this the proper way, as intended by LoaderMax. Thanks, ~K
  7. Works beautifully, you are the master. Thanks Jack! ~K
  8. Hey Jack, don't know if this exists, but I ran into a snag trying to use the ColorTransform plugin and ColorMatrix plugin in the AS2 version of TweenLite / TweenMax for a banner project with the ridiculous requirement of Flash 7 AS 2.0 and 30k file size, (yeah that's right, Flash 7, I was equally shocked) so the AS2 ColorTransform plugin and ColorMatrix plugin don't work since Flash 7 lacks flash.filters.BitmapFilter, which is what supplies the guts for those two plugins. In order to tween a Color Transform on a MovieClip pre-Flash 8 / pre-BitmapFilter, I think I'd need an "endObject" plugin similar to the "endArray" plugin to tween between two objects holding Color Transform values and apply them over time with onUpdate and onUpdateParams. I tried hacking together an onUpdate:applyColorTransform method that cycled through properties of one object to another object used for animating the values, but had trouble with it... AS 2.0 Flash 7 and below requires the use of Color() and use of the old setTransform() and getTransform() methods on that "Color"... It would be nice if I could just specify a color object to use for the start values, and an endObject to specify the end values, taking a very similar approach to the endArray plugin, but for objects that have the same name/value pairs like Color() objects have. For example... var DEFAULT_TRANSFORM:Object = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0}; var ROLLOVER_TRANSFORM:Object = {ra:100, rb:50, ga:100, gb:50, ba:100, bb:50, aa:100, ab:0}; var myObj:Object = DEFAULT_TRANSFORM; var colorObj = new Color(targetClip); colorObj.setTransform(DEFAULT_TRANSFORM); TweenLite.to(myObj, 1, {endObject:ROLLOVER_TRANSFORM, onUpdate:applyColorTransform, onUpdateParams:[myObj]}); function applyColorTransform(obj:Object):Void { colorObj.setTransform(obj); } Maybe there's a better way to go about it that I haven't thought of, but I think that kind of plugin would be handy and generic enough to have around... but maybe that's what TweenLite is already doing, looping through the matching properties of two objects and applying them to the target over the duration and easing type specified. My attempt wasn't looking so smooth, but maybe it was the lack of rounded props or my lack of sleep. ; )
×