Jump to content
Search Community

nagipar

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by nagipar

  1. Hi, Thanks for the explanation. I see how the second tween is overriding the first one. Will use the TImeline as in your example. - nagi
  2. Hi, Thank you very much for taking the time to look at my archive. When I created the flex project to post here, I inadvertantly included the com directory from the docs directory of Greensock. Originally, in the AS project I used the correct com file (otherwise mxmlc would not have compiled). Your project works fine and I appreciate the effort. Going back to my original AS project, I compared your .as file and mine. Here is the conclusion: If we use your code: var tl:TimelineMax = new TimelineMax({repeat:100, delay:2}); tl.append(TweenMax.to(b, 1, {x:242, y:206})); tl.append(TweenMax.to(b, 2, {x:119, y:75})); things work fine. If i use TweenMax.to(b, 2, {x:242, y:206}); TweenMax.to(b, 2, {x:119, y:75}); the two calls seem to be be "optimized" into a single translation. The goals was to have the image start at a point, go along the side of one triangle and come down the other side. TweenMax.to is optimizing them into a motion along the base of the triangle! I am good to go (i am merely learning) thanks to your quick tutorial/education. However, out of curiosity, why are the two call to TweenMax.to being "optimized" - in this case overriding the intent of the animator? Thanks again for your time
  3. i just updated the zip file attached to the previous post to remove some comments out (that placed for testing). Still having the same problems. Appreciate nay help. Thx!
  4. Hi, Thank you for the performance heads-up. right now, I am only trying to learn and get a handle on all of this stuff, starting with AS. I am attaching a flex project. Originally the project was a Flex AS project. Now, i have made it into a regular flex project. The mxml file is just the default - evenutually I will code it as I learn about it. The original problem, which still persists (and is clearly because of something I am doing or not doing) is the following: when I compile the Main.as file (with the greensock com directory in the same location as the Main.as file), using mxmlc, the compile works fine. The generated .SWF file works fine execpt for the animation part - the image shows, but does not animate. I apprecaite any help. Thanks!
  5. Hi, I am a newb to AS, Tweening, etc. I wrote an ActionScript (3.0), as follows: package { import flash.text.*; import flash.events.*; import com.greensock.*; import flash.geom.*; import flash.media.*; import flash.filters.*; import flash.display.*; import flash.net.*; public class Main extends Sprite { [Embed(source="b.png")] public var BClass:Class; public function Main():void { var b:Bitmap = new BClass(); b.x = 400.0; b.y = 425.0; addChild(; var textLocal:TextField = new TextField; textLocal.appendText("Hello "); textLocal.x = 0; textLocal.y = 0; textLocal.width=500; addChild(textLocal); var i:int = 0; for ( i=0; i<100; i++) { TweenMax.to(b, 2, {x:319, y:275}); TweenMax.to(b, 1, {x:442, y:406}); } } } } In the same directory as this .as file, I placed the com directory unzipped from the TweenMax zip. I then run MXMLC (from Flex 3.x SDK) to compile the .as file. It compiles just fine, into a SWF. Problem is, when I run the swf in Flash Player 10, I only see the text (Hello) and the image (b.png image), but the animation does not work. I removed the com directory and the compiler rightly complains about the greensock class not being available. So my thinking is that the compiler is using the class at compile time, but is probably not linking it into the SWF for runtime. But this is only a guess. Any specific insights will be greatly appreciated. Thx.
×
×
  • Create New...