Jump to content
GreenSock

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

Search the Community

Showing results for tags 'oncompleteparams'.

  • 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

Found 3 results

  1. This might not really be a GSAP specific problem, but more a Javascript related one, nevertheless I would like to ask here for help, it that is ok. (The CodePen unfortunately throughs an error, and I do not see the reason why...) I like to save DOM elements to a SETTINGS object like this: ``` var SETTINGS = SETTINGS = { intro: { topics: { singer: { btn: { el: document.querySelector('.c-topic--singer'), params: { right: "5%", onComplete: resetTxt, onCompleteParams: [ SETTINGS.intro.topics.singer.btn.el ] }, }, }, }, }, } ``` The TweenMax then looks like this: ``` TweenMax.to( SETTINGS.intro.topics.singer.btn.el, 2, SETTINGS.intro.topics.singer.btn.params ); ``` The idea is, that the animated element (a button) is set to another position as soon as it is finished. Therefore I'd like to set a self reference in the SETTINGS object in order not to call document.querySelector twice. But that doesn't work as I hoped, and reading up on google I find posts that use a function for callback parameters, but in cases where there is not array needed. So I tried something like this: ``` onCompleteParams: function() { var arr = push(this.intro.topics.singer.btnTxt.el); return arr; } ``` But no success... I am not a JS pro by any means, so I am pretty sure, there is something fundamental I do not grasp about JS objects and self referencing. Maybe somebody of you finds a moment to explain, how I could use such a self reference within an array? And maybe also, if it is in general a good idea to build up such a SETTINGS object, anyway? Or would there be better approaches for SPAs? Thanks in advance! Best, Robert
  2. TweenNano.to(mc,0.3,{alpha:0,onComplete:gotoAndStop,onCompleteParams:[1]}); Hi, I'm not having much luck with the above code. It is supposed to go to Frame 1 on the Main Timeline, but so far, only NextFrame and PrevFrame work. I cannot seem to get gotoAndStop to pass the parameters Thanks
  3. this a testing class i did cause of have some memory issues on much, much more complicated situation i am currently in and tried this to test my memory leaks and seems MyClass instance doesnt clear it self, but tweenlite, tw is clearing from memory fine. I am just wondering if I am missing anything. I didnt even have to add any thing to stage or do any to find that instance isnt clearing when its called null. and MyClass is an empty class. public class ui extends MovieClip { private var tw:TweenLite; private var instance:MyClass; public function ui() { super(); instance = new MyClass(); tw = TweenLite.to(instance, 1, {x:10, onComplete:clearmem, onCompleteParams:[instance]}); } private function clearmem(obj:MyClass):void { if (tw != null) { tw.kill(); tw = null; } TweenLite.killTweensOf(obj); instance = null; } } I am using version 12
×