id en en en en en en en en en en en en en en en fa en en fr hbs_lat en en en es en en en ms en de en fr en en en ca en en en en en en en id id en en fr en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en id en en en nl en de en es en hu en pl en en en en en en en en en en en en en fr cv es tr es en en en en ms en en en en en en fr en hbs_lat en en en en en en en fr cv es tr es en en en en de en en en ca en en en en en
TimelineMax with +500 tweens stops rendering when going back
dominggi replied to dominggi's topic in GSAP (Flash)
dominggi replied to thomasdegry's topic in GSAP (Flash)
TweenMax is trying to tween the variable because it doesn't recognize the 'reverse' property. try this: mc.addEventListener(MouseEvent.ROLL_OVER, mcMouseHandler); mc.addEventListener(MouseEvent.ROLL_OUT, mcMouseHandler); function mcMouseHandler(event:MouseEvent):void { hoverTween = TweenMax.to(this, .5, {y:"-25", paused:true}); if (event.type == MouseEvent.ROLL_OUT) { hoverTween.reverse(); } else { hoverTween.play(); } } or a shorter if: (event.type == MouseEvent.ROLL_OUT) ? alphaTween.reverse() : alphaTween.play();
dominggi replied to dominggi's topic in GSAP (Flash)
IT WORKS! I now calculate the delayTime and append the departing tween to the subTimeline and it works PERFECTLY! departureDelay = flyingToGatesTimeline.getLabelTime(airplane.flight.etd) - flyingToGatesTimeline.getLabelTime(airplane.flight.eta); airplaneTimeline.append(new TweenLite(airplane, 3, {x:departurePoint.x, y:departurePoint.y, delay:departureDelay, onUpdate:airplane.faceTowards, onUpdateParams[departurePoint.x, departurePoint.y]})); http://dominggus.nl/school/minor_vi/opdr5/ fixed slider code now too, it works (almost)perfect - need more fps though bottomSliderGUI.timeSlider.addEventListener(SliderEvent.THUMB_DRAG, timeSliderChangeHandler); bottomSliderGUI.timeSlider.addEventListener(SliderEvent.THUMB_PRESS, timeSliderChangeHandler); bottomSliderGUI.timeSlider.addEventListener(SliderEvent.THUMB_RELEASE, timeSliderChangeHandler); bottomSliderGUI.timeSlider.addEventListener(SliderEvent.CHANGE, timeSliderChangeHandler); [..] private function timeSliderChangeHandler(event:SliderEvent):void { switch(event.type) { case SliderEvent.THUMB_DRAG: isDragging = true; mainTimeline.goto(event.value,false); break; case SliderEvent.THUMB_PRESS: isDragging = true; mainTimeline.gotoAndStop(event.value,false); break; case SliderEvent.THUMB_RELEASE: isDragging = false; mainTimeline.gotoAndPlay(event.value,false); break; case SliderEvent.CHANGE: if (isDragging) { mainTimeline.gotoAndStop(event.value,false); } else { mainTimeline.gotoAndPlay(event.value,false); } break; } }
TimelineMax with +500 tweens stops rendering when going back
dominggi replied to dominggi's topic in GSAP (Flash)
wow, this is interesting. I yoyo it now, and it happens too when yoyoing! http://dominggus.nl/school/minor_vi/opdr5/yoyo/ before this forloop, i create (24 + 12) * 60 labels for every 'minute, so that i can do mainTimeline.insert(tween, flight.eta) with flight.eta being the estimated time of arrival (a String i.e. "11:35") because ALL flights are arrivals, but some will depart again too. I wanted those to departing flights to tween back off screen, it was easier to insert it in mainTimeline to a label with the flight's etd (est. time of depart) than to calculate the delay (arrivingTime - departTime)in seconds and putting this in the subtimeline (airplaneTimeline). could be the issue though... It actually isn't a fla, I'm using assets.fla to compile as an SWC, and am embedding it in a FDT Flex 4.5 project. i'm currently thinking how to get this workingly in a fla...
dominggi replied to thomasdegry's topic in GSAP (Flash)
you should not do an addEventlistener each time you hover somewhere -these will all add up so this will trigger it twice/three times/4 times etc... try copying those lines to outside of these functions.
TimelineMax with +500 tweens stops rendering when going back
dominggi posted a topic in GSAP (Flash)
im currently creating an interactive infographic about all flights from and to Amsterdam Airport (schiphol). data i'm using is coming from http://schiphol.dutchplanespotters.nl as you can see, these are about 500 flights. This means i have around 500 TweenMax objects in my 'main' TimelineMax. (actually main timeline -> flight-timeline -> tweenLite) I attached a time-slider and set this to control the main timeline. Now, the problem is - when i let it play for about till noon (about 12seconds), and then 'slide' back in time, some airplanes (Tweens actually) are not being updated. I already tried mainTimeline.goto, .gotoAndStop, .gotoAndPlay, with and without supressEvents set to true, but it seems to me tweens are just not being updated. Could someone PLEASE help me with this?? you can test it your self at: http://dominggus.nl/school/minor_vi/opdr5/ edit: here's a piece of code from the for loop for creating each tween: airplaneTimeline = new TimelineLite(); arrivalTime = convertTimeToSeconds(airplane.flight.eta); airplaneTimeline.append(new TweenLite(airplane, 3, {x:gatePoint.x, y:gatePoint.y, onUpdate:airplane.faceTowards, onUpdateParams:[gatePoint.x, gatePoint.y]})); airplaneTimeline.append(new TweenLite(airplane, .5, {rotation:parking.rotation + 105})); if (isDeparture) { departurePoint = calculateMarginPointByLngLat(airplane.flight.departureLng, airplane.flight.departureLat); mainTimeline.insert(new TweenLite(airplane, 3, {x:departurePoint.x, y:departurePoint.y, onUpdate:airplane.faceTowards, onUpdateParams:[departurePoint.x, departurePoint.y]}), airplane.flight.etd); } else { airplaneTimeline.append(new TweenLite(airplane, .5, {alpha:0})); } mainTimeline.insert(airplaneTimeline, airplane.flight.eta);
strange behaviour of textfield proxy
dominggi posted a topic in TransformManager (Flash)
I have extended TM so i can use Textfields that are scalable and resizable. I use a textfield IN a mc that is called through the flash library (as linkage class). This worked fine, but i traced the displaylist and found an DisplayObject on the displaylist with name "__tmProxy3", but these are dislocated... I know these are textfield proxies that are used in TransformItem, but why aren't they removedProxy'ed? I also extended TransformItem (TextBoxTransformItems) and can override this createProxy, but I don't know when. I need to get rid of these proxies, because displayobjects are dynamically loaded/saved, and I can not have any garbage on the displayList due to the zooming of the canvas. When exactly are these proxies used and when can i remove them? or, what is the cleanest way to use scalable AND resizable textfields in your opinion?
“I am more and more amazed every day, and very glad that I decided to get a business license.”
“I think I love GreenSock as much as bacon.”
“There is no doubt that GreenSock is currently the best available tool for creating astonishing interactive websites and animation effects.”
“It's shocking the @w3c didn't use @greensock as a model of how to do animation via code. Did they even ask animators what they use?”
“It's so correct that GSAP's logo is a superhero. Every time I use GSAP it saves me heaps of time and frustration. Thank god for GSAP honestly.”
“I'm always left with my mind blown by the way in which you guys quickly identify the solution and provide answers.”
“GSAP is awesome - I just dropped all my [custom] code, like a thousand lines of code and everything is so so much simpler, smoother and much easier to read for other developers! You have no idea how cool it is to offload that thought process to you guys!”
“I absolutely love working with GSAP. It’s been one of the most enjoyable things I’ve ever studied and the team do a fantastic job of making it first of all but also in the fantastic forums. I’ve managed to learn so much from that so I’ll always be gratefu”
“GreenSock has encouraged me to play with the code, to dream up new and exciting things to do.”
Sign Up For Our Newsletter
Get the latest updates on GreenSock products, exclusive offers, and more right in your inbox.
Your information will always be kept confidential.
Thanks for signing up!
Now you'll begin receiving the latest GreenSock updates, exclusive offers, and more right in your inbox. Welcome aboard.