Jump to content
GreenSock

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

Jakob Sternberg

Members
  • Posts

    56
  • Joined

  • Last visited

Jakob Sternberg's Achievements

  1. Sorry in late on this one. I need to do something like this. Now this thread is four years old, are there any new features or things i should look out for, or would it be the same approach as @Dipscom's codepen example?
  2. Ok, It didn't work, now the animation just moves really slow, aprox 1fps. But if i use 0.0000001 it works (good enough anyways)
  3. Hi i'm creating a banner and using gsap to do some particle animation, I need to keep the filesize down so i'm using TweenLite instead of TweenMax One thing that doesent seem to work with TweenLite is pauseAll? Is that correct, or do i need to add a plugin or something? Or, is there alternative way to mimick the TweenMax.pauseAll() with TweenLite Thanks
  4. Ehmm omg.. i must be tired.i DO get the desired effect by using transformOrigin.. sorry for wasting your time :/
  5. My last reply didnt make much sense, i was in a hurry and forgot a few words. Sorry! i've edited it Ok, so rotation makes a element rotate around it's own center. But can i change it so it rotates around, let's say the bottom left corner? Thanks alot
  6. The x/y offset. The goal was to some how change the rotation point/axis of the elements. Thanks Edited...
  7. Hi I want to create a bezier motion, and each element should rotate around it self, sofar so good. Now, can i control each element's offset? I tried to use transformOrigin, but it does not seem to work. What am i missing? =)
  8. Another solution could be to optionally make Animation.as create the _gsAnimation mc in the same SWF as the class was included, MovieB.swf ( An "option", same way you set OverwriteManager) That would probably mean a couple of bad things, - if that SWF gets unloaded, GSAP would stop working. - You could end up creating multiple mc's on multiple timelines. etc etc. Again, these facts would just be "known" limitations when using the option. It would take a few more lines of code in core, but you would get around having to do any "prepping" in MovieA.swf when using this method.
  9. I know my solution as a whole may not be very elegant, but the core change alone should be fine and really minimal as can be. Functionally-wise i don't see the code-change would break anything. What you achieve by making the change is little, i agree... But, on the other hand, it's basically costless. I hope you will concider it. =)
  10. Ok, a little more complete version: _________________________ With only two lines changed in Animation.as.. var gsMcName:String = "_gsAnimation" + String(version).split(".").join("_"); ticker = mc[gsMcName] || mc.createEmptyMovieClip(gsMcName, l); ...I can avoid the warnings by adding this snippet in root SWF (Or any SWF or Timeline, as long as there IS one in the actual root, if not?..nothing!, i just get the warnings.) function gsPrepSubload(){ if( _url === _root._url){ //Only if we are somewhere in _root SWF, or it doesn't matter var gsMcName:String = "_gsAnimation" + String(com.greensock.core.Animation.version).split(".").join("_") var l:Number = 999; while (_root.getInstanceAtDepth(l)) l++; var gsMc:MovieClip = _root[gsMcName] || _root.createEmptyMovieClip(gsMcName,l); if(!gsMc.onEnterFrame) gsMc.onEnterFrame = gsMc.addEventListener = gsMc.removeEventListener = null; }; }; // Anywhere in root SWF gsPrepSubload(); ;
  11. I somewhat agree, still we deal with medias whos systems require AS2 banners. But I'm also sure you are aware that greensock framwork is widely used , also in banner production workflows. In "Rich-media" you will in most cases have a external SWF loading another, also known as "polite load". You cannot stuff TweenMax into the polite part as its too heavy.. the whole idea of the polite load is that is has to be light. (often < 50kb), so the scenaraio of having TweenLite initializing from subloaded SWF is not that uncommon i think. Again, it's totally harmless, and i'll agree that it's a"flash thing" in the sense that, if you check if TweenLite could actually create those methods, that you get warnings about, then you see it could!, also why everything works, you just get the darn warnings (so lame why you cant turn them off) Solutions for picky users: Well for the "prep a movieclip"-technique, a very simple fix would be on line 236, (if im not too wrong) var gsMcName:String = "_gsAnimation" + String(version).split(".").join("_"); ticker = mc[gsMcName] || mc.createEmptyMovieClip(gsMcName, l); Then the user could do in _root SWF: _root.createEmptyMovieClip("_gsAnimation" + String(com.greensock.core.Animation.version).split(".").join("_"),_root.getNextHighestDepth()); Requires action by user, but codechange is minimal, and fully backwardscompatible It could be a "prepper" class, that could be available? (entirely seperate from core, only creating the movieclip) import com.greensock.* gsPrepSubload(); --- I'm still thinking,... if you could somehow trick the ticker mc to set the handlers on itself - but i guess that would be inventing a way to circumvent sandbox entirely, so i don't think it's possible =P Edit: Corrected the "if movieclip exists" script part..
  12. Ok it is these 3 lines, starting on line 237 in Animation.as, that causes the warnings: you can put traces between them, and see for yourself. ticker.onEnterFrame = _tick; ticker.addEventListener = _addTickListener; ticker.removeEventListener = _removeTickListener; So.. clearly it IS TweenLite/Max that causes the warnings. ( just to state it again xD ) The external SWF can use _roots.createEmptyMovieClip method, but the movieclip it returns has not any methods defined yet, so as the external SWF tries to define the three non-existing methods on the movieclip, we get the warnings. i guess, defining it as a "flash thing" depends on how fixable it is =) So, i made small hack illustrating that it is possible to avoid the warnings. I have to create my own "ticker" in root, to be sure that i have "prepped" it for TweenMax From anywhere in the "root" swf: (i know it could be shorter) _root.createEmptyMovieClip("_gsAnimationCustom",_root.getNextHighestDepth()) _root["_gsAnimationCustom"].onEnterFrame = null _root["_gsAnimationCustom"].addEventListener = null _root["_gsAnimationCustom"].removeEventListener = null I would have to modify Animation.as before line 237: if(typeof(mc["_gsAnimationCustom"]) === "movieclip"){ ticker = mc["_gsAnimationCustom"] }else { ticker = mc.createEmptyMovieClip("_gsAnimation" + String(version).split(".").join("_"), l); } Thats it, the warnings are gone!, and actually it only took two lines of code to make it possible to avoid the warnings. Please concider a solution (i see a few) ---- I've made a file-example illustrating the whole thing,greensock classes included: http://edweb.dk/Temp/MovieA_MovieC_Fix.zip
×