Jump to content
GreenSock

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

Slopes

BusinessGreen
  • Posts

    8
  • Joined

  • Last visited

About Slopes

Profile Information

  • Gender
    Male
  • Location
    Ontario, CA

Recent Profile Visitors

2,358 profile views

Slopes's Achievements

1

Reputation

  1. Hello, We have been using the Greensock library in an Adobe AIR application for a while now with really no problems. We decided to try our Windows based application on an Android device and found that most things work quite well. The only problem we are seeing with the Greensock library turns up when we use scale effects. By this, I mean any time I attempt to scale a SplitTextField from say 4 to 1, the system lags. If I scale multiple SplitTextFields at once and by letter, then system can almost crash. The board we are using is running one of the latest version of Android and is capable of outputting HD content. Below is the code for one of the animations being affected. Each letter should scale down and rotate in, staggered. // target is the object we are going to animate // time is the total amount of time for the animation public static function MyEffect(target:SplitTextField, time:Number):TimelineMax{ // Activate plugins TweenPlugin.activate([TransformAroundCenterPlugin, AutoAlphaPlugin]); // Create new TimelineMax Object var t:TimelineMax = new TimelineMax(); // Determine how long each letter should animate var timePerHold:Number = time / target.textFields.length; // Go through each textField in the SplitTextField and complete the following animation for(var x:int = 0; x < target.textFields.length; x++){ // Use 20% of the time to rotate the text and scale the text half way t.fromTo(target.textFields[x], timePerHold * .2, {transformAroundCenter:{scale:4, rotation:-180}, alpha:0}, {transformAroundCenter:{scale:2, rotation:0}, alpha:1}); // Use 80% of the time to finish scaling the text t.to(target.textFields[x],timePerHold * .8, {transformAroundCenter:{scale:1}, ease:Elastic.easeOut}); } return t; } I was going to do my best to optimize the system but I wanted to go about it the right way and not just start guessing how to fix this. Any thoughts or direction would be greatly appreciated. Thank you!
  2. Hello, I am having a little difficulty with the SplitTextField and was looking for some assistance. My goal is to animate a SplitTextField from the right portion of the screen to the left. I am using a font size of 8 and have done everything I can to reduce the anti aliasing. I am using TweenMax to animate the text. The Problem: I am noticing that as the text animates across the screen, the letters do not all move in sync with each other. For example, if I have "Hello World", sometimes the e will move before the H and overlap it a little. On the next frame update, the H will move and things are back to normal. This continually happens as the text moves across the screen, making it seem as if the text is jiggling as it moves. I suspected this may be due to the GridFitType being set to PIXEL, so I changed all references of GridFitType to SUBPIXEL, but unfortunately that did not solve the problem. I know it was mentioned in the limitations that Positioning may be incorrect when non-standard anti-aliasing is used (like "anti-alias for readability"). Even with standard anti-aliasing, depending on the specific font you use positioning may be slightly off.Is the issue I am encountering directly referenced by the above limitation (is this limitation referencing the entire text block or each letter?) or is there something I can do to make the text movement more in sync? Thank you very much for your assistance!
  3. Thank you for your help Carl. I have a couple methods I might try and implement to fix the issue I am having. Unfortunately, the entire system is built on Flex objects, so redesigning it might be a little difficult. Thank you!
  4. Hello, I am having a little trouble using the FlexBlitMask to scroll an RSS feed. My goal is to create a scrolling RSS feed on the screen. I found an issue with TextFields a long time ago which basically causes the object to behave odd when too much text is asked to be rendered on the screen. Sometimes the text will stop at some character point and begin printing over itself. Other times, it displays nothing. The way I got around this was to create an HGroup, cut the text into blocks of say 100 characters, then as they are scrolling, queue them in and out of the HGroup. This method works just fine, but the text is jumpy and laggy. I attempted to use Blitmask to fix this problem, but it doesnt seem to want to show anything on the screen for me. I suspect some of the problem is due to me using horizontalScrollPosition on the HGroup to move the textFields it contains across the screen. hTextGroup = HGroup. It contains TextFields of RSS text. // How I declared blitmask blitmask = new FlexBlitMask(hTextGroup,hTextGroup.x, hTextGroup.y, this.width, this.height, true, false); A timer updates the hTextGroup.horizontalScrollPosition by a few pixels every x milliseconds I was successful in getting this to work with just one TextField and BlitMask, but using an HGroup, I'm having trouble. Any help you could provide would be appreciated. Thank you!
  5. Alright, testing complete. The new method works just fine. It should look something like this: public static function SpinClockwise(target:Object, time:Number):TimelineMax{ TweenPlugin.activate([TransformAroundPointPlugin]); var targetX:int = (target.width /2) + target.x; var targetY:int = (target.height /2) + target.y; var timeline:TimelineMax = new TimelineMax(); timeline.add(TweenMax.to(target, time, {transformAroundPoint:{point:new Point(targetX, targetY),rotation:360},ease:Linear.easeNone})); return timeline; } Our application cannot delay animations as it is mission critical that we keep images/videos playing for exact times with no space between them. I appreciate the assistance as the tip of the width/height helped me find a solution. Thanks again!
  6. I believe I may have a solution. I can pull the target.width and target.height from within the function myself and calculate the center. Then I simply call TransformAroundPoint and use the values I gathered. That should work and will give me the control I need to make this happen. Initial tests are good, but I will post back after some further testing. Thank you!
  7. Hello Jack, Thank you for the quick response! It is returning 0,0 as the width and height. I tried adding image.invalidateSize(); and image.validateNow();. No change. I tried manually setting the width and height of the image before I called SpinClockwise(...) no change. I also tried manually setting target.width and target.height just before I called the code you gave me inside the SpinClockwise function, no change. Are there any workarounds for this? Thank you for your attention and assistance.
  8. Hello, I am having some issues with some objects working differently when displayed on desktop compared to mobile devices. For example, the Spark Image will Transform-Around-Center correctly when used on mobile, but when used on AIR Desktop, it ignores the center and transforms around 0,0. I have created a very basic sample program which illustrates this and which I can make available if needed. The code simply goes like this: protected function windowedapplication1_creationCompleteHandler(event:FlexEvent):void { var image:Image = new Image(); // Create the new image image.source = "myimage.png"; // Set a picture grpMain.addElement(image); // Add the image to our group SpinClockwise(image,2).play(); // Create and play the animation } // This function creates the animation and returns the timeline to be played private function SpinClockwise(target:Object, time:Number):TimelineMax{ TweenPlugin.activate([TransformAroundCenterPlugin]); var timeline:TimelineMax = new TimelineMax(); timeline.add(TweenMax.to(target, time, {transformAroundCenter:{rotation:360}, ease:Linear.easeNone})); return timeline; } Below is the XML portion of the code where we declare the Group that this image will go in: <s:Group id="grpMain" width="500" height="400"> </s:Group> That's pretty much it. I created an AIR application and a Mobile application and imported the same Greensock library into each. Both are running the 4.6.0 compiler and require AIR 3.1 or higher to operate. Please let me know if there is something I am doing wrong or if there is a workaround to get things in sync. Thank you!
×