Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by jeremyhoss

  1. Yes, using fromTo worked fine, thanks!
  2. I have a MovieClip that I want to have the arrow keys call the below functions. When press the right arrow key, I want it to call tweenIntoView() and when press the Left arrow key, I want it to call TweenOutOfView() and I currently have it working fine. The problem is that when I run that tweenOutOfView() function, the MovieClip go's outside of view of the screen and repeatedly calling the method doesn't return it back to where it started. How do I do it properly? The tweenIntoView() function works as I expect because it starts off the screen and zooms into the middle of the screen. //holds the tween to tween in var tweenInFromLeftSide:TweenMax; //holds the tween to tween out var tweenOutFromLeftSide:TweenMax; public function tweenIntoView() { tweenInFromLeftSide = TweenMax.from(this, 1, {x:-760, alpha:0, ease:Strong.easeOut}); } public function tweenOutOfView() { tweenOutFromLeftSide = TweenMax.to(this, 1, { x:780, alpha:0, ease:Strong.easeOut } ); }
  3. ok, here is my problem. I have a new test tween file that you can download to see what I'm doing. As you can see I do not make use of the updateTo at all and I'm using a bunch of booleans to keep track of things. Can you show me how to make use of updateTo method so I dont have to do what I'm doing? http://rickydoesit.com/wp-content/uploa ... Proper.zip the new example just uses a Sprite
  4. Ok, yes I realize the object i'm tweening is actually the the keyword this so I traced out that instead, trace(this.cacheAsBitmap); traces false.
  5. Regarding what you said about whether or not any of these Square Sprites have cacheAsBitmap set to true or false, I did some checking. //traces false. targets the Sprite's cacheAsBitmap property trace(tileArray[0][0].cacheAsBitmap); //traces false also. targets the Sprite's first child (the shape) trace(tileArray[0][0].getChildAt(0).cacheAsBitmap);
  6. Ok, here is a new zip file that contains all the code in the timeline in the .fla file. I commented out the rightTween that works smoothly but it's slow to move across the screen. The tween I want that has the right speed, moves choppy and is not smooth, can you fix it so it's smooth and still moves at good speed? http://rickydoesit.com/wp-content/uploa ... tFlash.zip
  7. Ok, I've fooled around trying to get it to be a fast and smooth tween. Do you want to see if you can get it any smoother than what I've got so far? I used flashdevelop, just open up the TweenTest.as3proj file and edit TweenTest.as, you'll see where I put the tween code there. If you press the left/right arrow keys, I have it moving about the speed that I want which is good, but the smoothness is quite choppy, especially on the ends. Maybe were reaching flash's limitations or maybe we are reaching Greensock limitations?
  8. When trying to use TweenMax.updateTo({ x:"50"}, true); 1061: Call to a possibly undefined method updateTo through a reference with static type Class. I'm getting that. Do i need to instantiate the Tween to a new instance before I can use this? Before I was using tween staticly
  9. ok after reading around on the forum, it appears the problem is that i'm creating a new tween every single frame by using the enterframe handler. what is the alternate solution. I simply want to tween this.x either way depending on whether or not i'm pressing the arrow keys. Basically move super smoothly and concistantly
  10. Ok, after re-reading my post, I realize this is an earlier version of my tween testing that doesn't use bitmaps, it actually uses a custom class Square which extends Sprite but I tried using bitmaps and thought it would perform better, but it's about the same. Perhaps I'm not utilizing the tween properly or something?
  11. Forgot to mention, i'm using AS3 with TweenMax and the framerate of my movie is 60fps
  12. Hi I noticed the TweenMax can tween thousands of objects very nicely however I'm looking to get just 20 flash bitmaps on the screen to scroll smoothly. I have the main document class for my flash cs4 project set to Main.as so it has a class file with it. I placed the 20 bitmaps onto the screen and Instead of tweening all 20 bitmaps, I decided to tween just the Main.as object by tweening the this.x and this.y property. Here is my result, although it's quite smooth, I thought it would be amazingly smooth lol Am I doing anything wrong or can I do anything to make it even faster/smoother? I uploaded the swf file to this free swf host I found on google, http://megaswf.com/view/87311edf2ec5998 ... c8665.html press the left/right arrow keys to make use of the tween. Here is my source code, http://actionscript.pastebin.com/m4baad918