Jump to content

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


  • Posts

  • Joined

  • Last visited

treeloy's Achievements


Newbie (1/14)



  1. Words cannot describe how awesome you are.
  2. I'm working on (searching) for a way to split any given image up into a set amount of rows/columns. And then use TweenFromTo or the like to animate the pieces to form the complete image. Will it be possible to tween the pieces? Before I spend the next days searching for the right code. A heads-up would be great help. I'll include some code as soon as I find the way I wanna go with this. I would like to just avoid applying a technique to find out that it won't work with the Tweening. Thanks in advance.
  3. Just one more question to that. Although I don't think it's specifically related to the Tweening. How can I set the ChildIndex of the square so that the entire grid is behind the other objects on the stage? I tried to put the stage.setChildIndex(mr_square_fade,0); in there, but keep getting the error message: ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. Sorry to reopen the topic. ///Mr. Square function mrSquare():void{ var rows:int = 10; var cols:int = 30; var delay:Number = 0; for (var py:int = 0; py for (var px:int = 0; px var mr_square_fade:mr_square = new mr_square(); //container.setChildIndex(mr_square_fade, numChildren – 1); mr_square_fade.x = 0 + mr_square_fade.width * px; mr_square_fade.y = 150 + mr_square_fade.height * py; addChild(mr_square_fade); stage.setChildIndex(mr_square_fade,0); mr_square_fade.alpha = 0; TweenMax.fromTo(mr_square_fade, 4, {autoAlpha:0, scaleX:0.1, scaleY:0.1, tint:0x063773/*, y:-300*/}, {autoAlpha:1, scaleX:1, scaleY:1, tint:0x0B1E3B, /*y:mr_square_fade.height * py + 150, */delay:delay}); delay += .01; } } }
  4. Perfect! That gets me on the right track. That alone has probably saved me hours of trial and error. Can't thank you enough.
  5. Just one more question. How could I also add a tween to the scale? Would I have to use insertMultiple or append?
  6. Wow, quick reply. It works, I'll just have to tweak to liking. But that was a great help. Many thanks.
  7. I'm trying to use TweenLite or TweenMax to animate squares in a grid form which are created dynamically with a for loop. I've tried various things to make the squares named to be able to tween them, but to no success. I'll just include the grid code. Basically, I'm trying to create a grid that fills up a portion of the screen and will either fade in or out with tweening. Meaning, it will start with one square and then sequentially affect the following squares (so not the entire grid at once, but each, individual square). Hope I'm clear in my explanation. Any help would be greatly appreciated. var rows:int = 50; var cols:int = 50; for (var py:int = 0; py for (var px:int = 0; px var mr_square_fade:mr_square = new mr_square(); mr_square_fade.x = 50 + mr_square_fade.width * px; mr_square_fade.y = 50 + mr_square_fade.height * py; addChild(mr_square_fade); } }