Jump to content
GreenSock

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

Jbassking

Members
  • Posts

    3
  • Joined

  • Last visited

Jbassking's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I have an AS3 project that was done in Flash Builder. It makes use of the TweenLite and TweenMax functionality. I want to use the same code in a Flex mobile app but it seems that all the objects that get tweened are actually scaled larger than their original size and will not scale down to the app size for nothing. Here's one example of how we're using it: introTimeline = new TimelineLite(); introTimeline.append( TweenMax.from(logo, 1, {transformAroundCenter:{scaleX:0, scaleY:0}, ease:Elastic.easeOut, onstart:SoundManager.playBubblePop}), 0.25 ); Is there a Flex call or setting I need to use?
  2. Thanks for your response. I added the trace as you suggested and the tweenComplete is only getting called once per call. So if times = 1 then it's called 2 - once for each shell. The third param I since removed
  3. I'm working on creating a simple shell game but it's turning out to not be so simple. I want to shuffle the 3 shells swapping position with 2 at a time. For the first couple of shuffles it's fine but after that they seem to get confused and it looks like more than 2 are being shuffled at once. function initShuffle(event:MouseEvent):void{ running = 0; shuffle(Globals.ShuffleCount); } function shuffle(times:int):void{ Globals.IsShuffling = true; this.times = times; var s1:int = Globals.getRandomShellIndex(-1, Globals.Shells.length); var s2:int = Globals.getRandomShellIndex(s1, Globals.Shells.length); shellTmp1 = Globals.Shells[s1]; shellTmp2 = Globals.Shells[s2]; shellTmp2.parent.setChildIndex(shellTmp2, shellTmp2.parent.numChildren - 1); var x1 = shellTmp1.x; var x2 = shellTmp2.x; finishX1 = x2; finishX2 = x1; ss2(shellTmp1, finishX1, true); ss2(shellTmp2, finishX2, false); } function ss2(shellObj:MovieClip, finishX:Number, use1:Boolean){ TweenLite.to(shellObj, Globals.speed, {x: finishX, onComplete:tweenComplete} ); } function tweenComplete():void{ if (--this.times > 0){ shuffle(this.times); } Globals.IsShuffling = false; } Ideally I would love it if I could get the Z to change as it moves on the X and than go back to it's original Z before it reaches the final X position. This would make it look like the shell in front is closer and the shell moving the opposite way is further. Thanks for any help, Joe
×