Jump to content
GreenSock

Search the Community

Showing results for tags 'transformaroundpoint'.

  • 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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 4 results

  1. Hi I'm trying to scale a bitmap with TransformAroundPoint. When I call TransformAroundPoint multible times it seems to move the bitmap away from the original position. I've made an example that shows the problem: A semi transparent red square is scaled up and down 80 % a 100 times and when completed it's scaled back to 100% again. In the background a square is illustrating the original position. When the scaling is completed the two squares should be on top of each other .. but they aren't? I hope you can help figure out what the problem is. package { import com.greensock.TweenMax; import com.greensock.plugins.TransformAroundCenterPlugin; import com.greensock.plugins.TransformAroundPointPlugin; import com.greensock.plugins.TweenPlugin; import flash.display.Bitmap; import flash.display.BitmapData; import flash.display.MovieClip; import flash.geom.Point; public class Dev extends MovieClip { private var boxBmp:Bitmap; private var centerPoint:Point; private var count:int = 0; private var bgBoxBmp:Bitmap; public function Dev() { TweenPlugin.activate([TransformAroundPointPlugin]); TweenPlugin.activate([TransformAroundCenterPlugin]); centerPoint = new Point(1024/2, 768/2); var bgBmd:BitmapData = new BitmapData(100,100, false, 0xCCCCCC); bgBoxBmp = new Bitmap(bgBmd); this.addChild(bgBoxBmp); var boxBmd:BitmapData = new BitmapData(100,100, false, 0xFF0000); boxBmp = new Bitmap(boxBmd); boxBmp.alpha = 0.5; this.addChild(boxBmp); // center on screen (1024 x 768) bgBoxBmp.x = centerPoint.x - bgBoxBmp.width/2; bgBoxBmp.y = centerPoint.y - bgBoxBmp.height/2; boxBmp.x = centerPoint.x - boxBmp.width/2; boxBmp.y = centerPoint.y - boxBmp.height/2; trace("start position boxBmp.x=" + boxBmp.x); trace("start position boxBmp.y=" + boxBmp.y); nextTween(0.8); } private function nextTween(_scalePct:Number ):void { count++; var scaleTo:Number = 1+_scalePct; TweenMax.killTweensOf(boxBmp); if(count <= 100) { TweenMax.to(boxBmp, 0.25, {transformAroundPoint:{point:centerPoint, scaleX:scaleTo, scaleY:scaleTo}, onComplete:nextTween, onCompleteParams:[_scalePct*-1]}); } else { TweenMax.to(boxBmp, 0.25, {transformAroundPoint:{point:centerPoint, scaleX:1, scaleY:1}, onComplete:tweenComplete}); } } private function tweenComplete( ):void { trace("tweenComplete"); trace("tweenComplete position boxBmp.x=" + boxBmp.x); trace("tweenComplete position boxBmp.y=" + boxBmp.y); } } } You can see the swf here: http://boostmode.com/dev/transformAroundCenter/dev.html Thanks Rolf
  2. Hello, I would like to animate an image that moves left/right/left/right around a center point, rotating 3-5 degrees. To be more specific, I would like to animate the top part of a Law Balance scale. (http://www.unc.edu/depts/europe/newsletter/images/101117balance-law.jpg) We purchased a Green membership of Club GreenSock thinking that we can use the TransformAroundPoint for this. It seems like TransformAroundPoint it is not available for JS. Am I right? Is there any other way to create the above animation? Thank you. Alin
  3. How can I remove or reset transformAroundPoint effect. I have a mc that get's animated using transformAroundPoint. That all works fine. But I need to be able to replay the flash ad. Somehow it looks like the centerpoint from where transformAroundPoint is animating is changed function heliMove2 () { apache.scaleX *= -1; var timelineHeli2:TimelineLite = new TimelineLite(); timelineHeli2.append(TweenLite.to(apache, 2, {x:-20, y:50, ease:Expo.easeInOut, transformAroundPoint:{point:new Point(200, 200), rotation:170}} ) ); timelineHeli2.append(TweenLite.to(apache, 4, {x:500, y:160, ease:Expo.easeInOut, transformAroundPoint:{point:new Point(200, 200), rotation:185}} ) ); } I'm pretty sure it has to do whit the scaleX (flip horizontal), but can't seem to solve it
  4. Hi, im trying to make an ipad app and im trying to use the "transformAroundPoint" plugin of yours so that i can make a movieclip rescale from a point decided by the zoom gesture. Up to now, all i've managed to do is taht it rescales a bit, from the center point of the image and then it goes back to the size and position it had before the zoom touch. can someone help me? thanks for your time this is the line of code i have used: img3.addEventListener(TransformGestureEvent.GESTURE_ZOOM,onGesturePinch); img3.addEventListener(TouchEvent.TOUCH_BEGIN, taphandler); function taphandler(evt:TouchEvent):void { puntito = new Point(mouseX,mouseY); trace(puntito); } function onGesturePinch(event:TransformGestureEvent) { TweenLite.to(img3, 1, {transformAroundPoint:{point:puntito, pointIsLocal:true, scaleX:event.scaleX, scaleY:event.scaleY}}); } HelpGreenSock.zip
×