Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17105

Problem with actions: Too much recursion

$
0
0

@alxlozano wrote:

Hi,

I am getting an error after running a series of actions and it seems that something it is going on with the Skew that causes an error from the simulator: too much recursion.

If I comment the skew actions the code runs. Anybody with a similar situation. Is Skew now ready yet to use?

  var actionFadeOut = cc.fadeOut(0.4);
  this.questionImage.node.runAction(actionFadeOut);

  var durationFlip = 0.25; 
  var scaleXaction = cc.scaleTo(durationFlip, 0.03, this.questionImage.node.scaleY);
  var skewAction = cc.skewBy(durationFlip,0,20);
  var waitAction = cc.delayTime(durationFlip);

  var callbackFunction = function() {
    console.log('inside callback');

    var actionFadeIn = cc.FadeIn(0.1);   
    this.blockImage.runAction(actionFadeIn);

    // skew and flipping effect
    var unskewAction = cc.skewBy(0.25,0,-20);
    var restoreWidthAction = cc.scaleTo(0.25,1.0,this.blockImage.node.scaleY);
    var flipAction = cc.spawn(restoreWidthAction,unskewAction);

    this.blockImage.runAction(flipAction);
  }

  var invokeCallback = cc.CallFunc.create(callbackFunction);
  var completeFlipAction = cc.sequence(waitAction,invokeCallback);
  var flipAgainAction = cc.spawn(scaleXaction,skewAction,completeFlipAction);

  this.node.runAction(flipAgainAction);

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 17105

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>