Jump to content


  • Posts

  • Joined

  • Last visited


0 Newbie
  1. I found out that the parent container (newsImageBox) is what's messing it up. I was using a Box container instead of a Canvas container. The Box container automatically aligns its children. One thing I have a question about though, where do you add the ease type so it follows the proper format for transformAroundCenter tweens? Another minor annoyance is that the animation isn't very smooth. IE, it appears to be tween the object to the center and scaling it but the combination of both animations appears "step like" or "jittery" instead of smooth. Any ideas on how to optimize it?
  2. I can't seem to get transformAroundCenter to work on a Flex Image container. Here's the Greensock code: TweenMax.to(newsImage, .25, new TweenMaxVars().transformAroundCenter({ scale:newScale }) ); Here's the Flex code: Here's the plugin activation code: TweenPlugin.activate([DropShadowFilterPlugin, TransformAroundCenterPlugin]); I'm building an app to let a user view a larger image inside a mask clipped box. It's just like those product image viewers on e-commerce sites. The Image container is user-draggable/repositionable. I'm trying to build zoom in/out buttons so the user can zoom in on the image. However, when TransformAroundCenter tweens the image, it moves the image from whatever position it was on the screen to 0,0 and then applies a scale tween to it. What I want it to do is scale from the center of the image. I've been wracking my brain on this for the past 3-4hrs. Anyone have any suggestions?
  3. Holy crap! I finally figured it out! Here's the answer in BOLD, so no one else has to waste DAYS trying to figure out why you are getting that error: Do not activate plugins in a creationComplete="init()" function inside Flex, it won't work activate properly! You think it would call that init() function and execute all the code in there properly, but it doesn't. Why? I don't know. Even when I stripped down my init() function to just include the activate plugin code all by itself, it still didn't work! BUT...when I moved the activation code into another function and called it, everything worked fine! It must be a Flex life cycle thing. Now, I can sleep.
  4. Ok, I just verified and it's in the package we downloaded. However, we are using the SWC, which should be the same, I'm assuming. I think my imports look alright: import com.greensock.TweenLite; import com.greensock.easing.Back; import com.greensock.plugins.TransformAroundCenterPlugin; import com.greensock.plugins.TweenPlugin; I just doubled checked and we're referencing only the one SWC in the Flex project build path. I've actually wanted to use this class earlier in the project because it's so cool and we don't have to mess with nested containers (in order to transform around center) but it's a bit difficult to get it working. Any other suggestions? Thanks! BTW, here's the exact error message: Error #1069: Property TransformAroundCenter not found on flash.display.Sprite and there is no default value. And here's how I implement the tween: private function intro():void { TweenLite.to(currentImage, 2, { alpha:1, TransformAroundCenter: { scaleX:1, scaleY:1, rotation:0 }, ease:Back.easeOut } ); }
  5. Hey Carl, I didn't even realize that you were the guy behind snorkl.tv, I love that site! Very polished tutorials! So, our company paid for a license and got the Greensock package. Is it safe to assume that the TransformAroundCenterPlugin is included in our package or is there something extra we have to do to unlock it or get it? I'm getting the same error outlined by OP and I think I'm activating it correctly: private function init():void { pages = new Array(); currentImage = new Sprite(); TweenPlugin.activate([TransformAroundCenterPlugin]); } init() is called from here: width="100%" height="100%" clipContent="false" horizontalScrollPolicy="off" verticalScrollPolicy="off" styleName="transparentModal" creationComplete="init()" >
  6. That news service isn't actually our service but a paid service that we're planning to use. I'll let them know about the issues and see if they can resolve their server problems. As always, thanks for the great support Carl!
  7. Hi Carl, Using this different loading approach, the progress property is always returning 0, would you have any idea why? Is it because we're trying to load an image returned by a web service?
  8. Thanks for the quick reply as always Carl. Thanks for the tip about explicit container size, too. It would be a nice feature if we could force it to use a certain type of loader. Have a Happy New Year!
  9. We just recently purchased the licensed version of Greensock and I'm having trouble loading images that are being returned by an aspx web service. The URL is: http://pdf.newspaperarchive.com/API/asc ... =167076425 And the error I'm getting is: Error: LoaderMax could not parse http://pdf.newspaperarchive.com/API/ascRenderLarge.aspx?pdfid=167076425. Don't forget to use LoaderMax.activate() to activate the necessary types of loaders. The code I'm using to activate the appropriate loader is: LoaderMax.activate([imageLoader]); And this is the code I'm using to load the URLs array: queue = LoaderMax.parse(pageURLs, {maxConnections:4, onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}, {height:docHeight, scaleMode:"proportionalInside", x:0, y:0}); Everything seems to work fine if I use an array of URLs linking directly to images, but if I link it to a web service that returns an image, it fails. Is LoaderMax not compatible with web services or is there something I'm missing? Thanks!
  10. Thanks for the quick reply Carl. Yes, the developer who worked on this before me put the free TweenMax lib in another FB project, but it's in another project. However, it is still a part of the entire game. I'll explore that recommendation and let you know if it works. BTW, do I want to put that code in the nested object or the parent or both? Thanks again!
  11. It's been a long time since I've used Greensock and I love all the new features it has. However, I vaguely remember being able to nest tweens inside objects. For example: Create object1.as class and put two tweens in their to make the object pulse in size and rotate. There are two tween functions with each onComplete calling the other so that the animation cycles. Then, declare and add myObject:Object1 to your project and tween it again, maybe along a path. The end effect is supposed to be Object1, rotating and pulsing in size as it moves along a path. But, I noticed that adding multiple Tween statements targeting the same object seems to kill all previous tweens, is this so? Also, my company just purchased the Club Greensock licensed version and I've been trying to get this to work w/o any success? import com.greensock.plugins.TransformAroundPointPlugin; import com.greensock.plugins.TweenPlugin; FB4.5 gives me these error messages: However, it is able to find this just fine: import com.greensock.plugins.ShortRotationPlugin; When I manually type out the import, FB4.5 is also able to code hint the entire class location of all 3 just fine! Crazy huh? However, it still throws those 2 error messages. Any ideas why? I'm importing Greensock as a SWC in the project properties panel.
  12. Hi, does anyone know if there's a method in either MotionPath or LinePath2D that will return the stage/global x,y coordinates of a particular follower on the path? I thought there was one but after digging thru, I couldn't find that one exists?
  13. Hi, I was wondering if there is a way to specify the color of the line drawn by LinePath2D? Okay, I see that it extends MotionPath, can I just change the color in there? Nevermind again, I see the public lineStyle method.
  14. Oh, okay, that makes sense. But, for us noobs, how do you call a protected function? In the .fla example, path is the LinePath2D object. When I try to call it using path.renderAll(), I get: 1195: Attempted access of inaccessible method renderAll through a reference with static type com.greensock.motionPaths:LinePath2D.