Jump to content
Search Community

peterPotter

Members
  • Posts

    70
  • Joined

  • Last visited

Everything posted by peterPotter

  1. When TransformAroundCenterPlugin is used in conjuction with TimelineMax and the target has its transform modified in other ways as well, the TransformAroundCenterPlugin fails to work accurately. Here is the code: static public function buildDefaultZoomInTween( node:XML, cont:DisplayObjectContainer ):TweenMax { var targName:String = node.@target; var targ:Object = cont.getChildByName( targName ); if(!targ) return null; var dur:Number = parseFloat( node.@duration ); if(isNaN(dur)) dur = 0.4; var tempPopUp:String = String (node.@tempPopUp); var removePopUpSec:Number = parseFloat( node.@removeSec ); if(isNaN(removePopUpSec)) removePopUpSec = 10; var delayTime:Number = parseFloat( node.@delay ); if(isNaN(delayTime)) delayTime = 0; return TweenMax.fromTo(targ, dur, {alpha:0, transformAroundCenter:{scaleX:targ.scaleX, scaleY:targ.scaleY}}, {alpha:1, delay:delayTime, transformAroundCenter:{scaleX:1, scaleY:1}, ease:Expo.easeOut}); }
  2. Thanks a lot, Jack, and keep up the excellent work.
  3. Greensock, Where do I get the updated files? I am a member, but I haven't received any emails informing me of updates, I saw that there is an updated version 11 available. I posted the question here so others who have their question like me could find the answer with google search. This forum is well optimized for google, I have found many answers by searching in google: the search results brought me directly to posts in ths forum.
  4. greensoc, Thanks very much. My apologies, I actually just looked at the code yesterday and thought it wasn't the solution I was looking for, but I just noticed I missed the last parameter in the insert function. The solutions you posted were indeed what I was trying to do. Thank you very much. Problem solved. Now I am getting the hang of the timeline classes. I used the myTimeline.insert option because it seems more elegant. Have a great day.
  5. greensock, I just realized I did a horrible job explaining my problem. I actually have the animation working fine in a sequence. What I want to accomplish is: While the first tween is animating the scale from 100% to 75%, when that scale reaches about 80%, I want to do the rotationY, but do not overwrite the scale tween or stop the scale tween. Continue with both scale and the rotationY together. It is analogous to inserting a manual keyframe about halfway through the scaling tween (if doing tweening on the timeline the old fashion way), and rotating the movieClip. The rest of the scaling will continue, but the rotaionY rotation will also affect the clip, both tweens at the same time. The bottom line is that I don't want to do the scale, wait for the entire scale to complete, then do the rotation. I want to add the rotation about halfway through the scale, and have both the rotation and the rest of scale continue.
  6. I simply want to scale and rotate a clip, but the trick is that I want the rotation to occur sometime halfway through the scale. Note that the tweens are on the same clip. See my comments in the code. myContentTweens = new Array (); myContentTweens.length = 0; myContentTweens.push ( TweenLite.to(mainClip, 1, {scaleX:0.75, scaleY:0.75, ease:Expo.easeOut, onComplete:addStageEventListener}) ); // When the scale above reaches about 0.8, I want to do the rotation below. I don't want to wait until the end (stop and start) of the 0.75 scale to proceed with the rotation. myContentTweens.push ( TweenLite.to(mainClip, 2.3, {rotationY:mainClip.rotationY + 180, ease:Expo.easeOut }) ); // Exactly the same situation here, about halfway through the rotation, I want to start scaling up to 1. myContentTweens.push ( TweenLite.to(mainClip, 0.3, {scaleX:1, scaleY:1, ease:Expo.easeOut}) ); timelineFlip = new TimelineMax({tweens:myContentTweens, repeat:0, yoyo:false, repeatDelay:0, align:TweenAlign.SEQUENCE, onComplete:addHomeBackBtns}); // I tried the following, but of course all the prior tweens are overwritten by new tweens //timelineFlip = new TimelineMax({tweens:myContentTweens, repeat:0, yoyo:false, repeatDelay:0, align:TweenAlign.START, stagger:0.34, onComplete:addHomeBackBtns}); Thanks very much.
  7. I searched the forum and google for an answer to this question, and I looked at the API for TimelineLite and TimelineMax, but I am still not sure about the proper way to remove TimelineMax instances because I am getting compile time errors: private var timelineThumbSeq:TimelineMax; timelineThumbSeq = new TimelineMax({tweens:myTweens, repeat:0, yoyo:false, repeatDelay:0, align:TweenAlign.START, stagger:0.1, onComplete:clearTimelineThumbSeq}); private function clearTimelineThumbSeq():void { TimelineMax.remove(timelineThumbSeq); timelineThumbSeq = null; //I even tried this: TimelineMax.killTweensOf, to no avail } This is the error I am getting: 1061: Call to a possibly undefined method remove through a reference with static type Class. Someone else had the same question, as per the post below, but the question was not resolved in that post. viewtopic.php?f=1&t=1423
  8. I have a bunch of MovieClips and I am trying to animate each clip's z property (using yoyo), but I want the start time for each TweenLite animation to stagger. here is my code: var timeline:TimelineMax = new TimelineMax({repeat:1, yoyo:true, repeatDelay:0, TweenAlign.START, 0.2}); for(var i:int=0; i < mainClip.thumbPanel.numChildren; i++) { var thisThumb:MovieClip = MovieClip(mainClip.thumbPanel.getChildAt(i)); timeline.insert( TweenLite.to(thisThumb, 0.2, {z:-700, ease:Expo.easeOut}) ); } I know my syntax (TweenAlign.START, 0.2) is incorrect. What is the correct syntax? Thanks very much. Usually I figure out these things on my own, but I am on a tight schedule with the project I am developing. Sorry for the few questions.
  9. Aha, got it. Thanks for all your help, hopefully I wouldn't have any more questions. Thanks very much for the wonderful GreenSock Tweening Platform that is far superior to the other three well-known Tweening engines, including the Flash built-in Tween engine that I personally dislike.
  10. I was using dynamicProps correctly, getDistX is a function that returns the distx:Number = mouseX / stage.stageWidth; Thanks for the following thought, "You could do an ENTER_FRAME that keeps recreating the tween while the mouse is over the object." I will try that, I am confident I will get it to work.
  11. Essentially I want to use dynamicProps and TweenLite only to replace the following code, which is using the Enter_Frame event and TweenLite. stage.addEventListener(Event.ENTER_FRAME, moveMC); private function moveMC(e:Event):void { var distx:Number = mouseX / stage.stageWidth; var disty:Number = mouseY / stage.stageHeight; TweenLite.to(mainClip.panel_mc, 2, {rotationY:(-8 + (16*distx)), rotationX:(8 - (16*disty)), ease:Expo.easeOut }); } // Instead of using the Enter_Frame event, I want to do: mainClip.panel_mc.addEventListener(MouseEvent.ROLL_OVER, moveMC); private function moveMC(e:MouseEvent):void { TweenLite.to(mainClip.panel_mc, 4, {dynamicProps:{rotationY:(-8 + (16*getDistX)), rotationX:(8 - (16* getDistY))}, ease:Expo.easeOut }); // the 4 second duration cannot work here because I want to keep rotating until the user MouseEvent.ROLL_OUT of the mainClip.panel_mc clip } ;
  12. greensock, That DistortedView class is exactly what I have in mind. The rotationY property is not enough for the kind of distortion I want to do. Thanks, I look forward to seeing that plugin--hopefully soon. I don't know if there is a feature request somewhere on the forum, but I would like to see transformAroundCenter used with the 3D properties like rotationZ, and z. In addition, I think the DistortedView plugin will be a big hit.
  13. Look at the attached image, is that type of 3D transformation possible with any of the greensock tween classes? I was experimenting with the demo on your site but I couldn't get it.
  14. Thanks for the prompt response, greensock. I changed the subject of my post so your visitors wouldn't think TweenMax has bugs, because I have been using TweenMax for a long time and never had any problems. The buggy issue I am having could be unique to my program, although I hesitate with this conclusion because it works great with TweenLite. I will try to make an example swf and post it on my site for you to see. Can I email you the link? I would prefer to send it to you directly. You were correct about the swf file. My laptop was indeed trying to open it in the Flash IDE. I learned something new. Thanks again.
  15. Here are some issues I am having since downloading v11 yesterday: 1. TweenMax seems to be buggy, or might just be me. I am trying to change the z property and add some blur on my MovieClip, and it is just acting really weird. I know it is not my code because I activated the corresponding filters in TweenLite and everything is running smoothly. The problem lies somewhere in TweenMax (it might be related to the z property). 2. TweenLite with motionBlur when changing the "z" property is not working. 3. Are transformAroundCenter and transformAroundPoint to be used with the x, y, and rotation properties only? 4. After joining the greensock club, I downloaded the files to my desktop computer (my G5 MAC server), then I copied the files to my MAC Book Pro where I do my development. I noticed I can view the swf files (like TweenProxy_Demo.swf) on my G5 but not on my laptop. I got the following error on my laptop: "cannot open protected movie." Did I do something wrong? Thanks for your help.
  16. I am trying to do the following, but it is not working: TweenLite.to(mainClip, 2, {transformAroundCenter:{rotationX:(20 - (40*disty)), rotationY:(-20 + (40*distx))}, ease:Expo.easeOut}); Thanks.
  17. greensock, So how can I transformAroundCenter and use the dynamicProps? It seems doable with the proper syntax.
  18. What is the proper syntax to use transformAroundCenter and dynamicProps simultaneously? Thanks. I am new to the board, but I have been using TweenLite for a long time. I just became a Club GreenSock member. TweenMax is by far the best tween engine, IMHO.
×
×
  • Create New...