Jump to content
Search Community

jdfinch3

Members
  • Posts

    6
  • Joined

  • Last visited

jdfinch3's Achievements

0

Reputation

  1. I found a work around by using an if statement that checks for the final coords of dot2, but I'm still curious to find an actual solution as opposed to a work around.
  2. I'm drawing a large shape using an array of points in a for loop and tweenlite as found at http://www.flashperfection.com/tutorials/Animated-line-drawing-using-TweenLite-in-AS3-22013.html for(var i:uint = 0; i < pointsArray.length; i++){ TweenLite.to(dot2, .05, {x:pointsArray[i].x, y:pointsArray[i].y, delay:i*.05, overwrite:false, onUpdate:updateHandler}); } function updateHandler():void{ lineAnim.graphics.lineTo(dot2.x, dot2.y); lineAnim.graphics.moveTo(dot2.x, dot2.y); } I would like the animation to complete before continuing, but I'm unable to find a way to be notified when the full animation is complete. onComplete does not work as it triggers on the first set of coords. I also tried triggering when i == pointsArray.length but the loop finishes multiple seconds before the animation completes. I would like to avoid using a timer.
  3. SplitTextField looks like it will do exactly what I need - thank you! --added-- Doh, members only Hopefully soon...
  4. I'm trying to create a line of text that slowly fades into view from left to right (or top to bottom, whatever). I see the very simple process of fading the entire text field in or out, but is there a way to fade vertically or horizontally? Thanks!
  5. I'd still like to find a proper way to call an array element in tweenlite, but I found a work around by changing the following 2 lines of code. public var tileList:Array = new Array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); TweenLite.to(this["tile"+tileList[count1]], 5, {y:700, alpha:0});
  6. The code is below. When Tweenlite is called it treats "tileList[count1]" as a string instead of a variable name. However the trace seems to return what I would expect (tile1, tile2, tile3...). If I remove "tileList[count1]" from the tween and replace it with a direct call to the MovieClip (tile1, tile2, etc) the code works perfectly... Things I've tried: Using a vector instead of an array. Setting tileList[count1] to a public and local variable and then calling that variable. Removing the randomSort. Removing count1 and calling the array element directly (ie, tileList[5]). public class wtpMain extends MovieClip { public var tileList:Array = new Array(tile1,tile2,tile3,tile4,tile5,tile6,tile7,tile8,tile9,tile10,tile11,tile12,tile13,tile14,tile15 ,tile16); public var count1:int = 0; public function wtpMain() { nextButton.buttonMode = true; nextDis.mouseEnabled=false; nextButton.addEventListener(MouseEvent.CLICK, nextButtonClickh); tileList.sort(randomSort); } public function nextButtonClickh(event:MouseEvent):void { nextButtonClick(); } public function nextButtonClick():void{ TweenLite.to(tileList[count1], 5, {y:700, alpha:0}); trace(tileList[count1]); count1++; } public function randomSort(objA:Object, objB:Object):int{ return Math.round(Math.random() * 2) - 1; } } }
×
×
  • Create New...