1

After upgrading kineticjs from 4.0.5 to 4.5.1, I get

Uncaught TypeError: Object #<Object> has no method 'transitionTo'

Following code works with the previous version:

gameLayer.transitionTo({
        duration: '0.5',
        opacity: 1,
        callback: function() {
            intervalId = setInterval(reDraw, 33);
            isInteractive = true;

        }
    });

Whats the the alternative function for transitionTo in 4.5.1

UPDATE

I opened an issue over Github, according to the guy transitionTo has been removed and it is replaced by Tween

Regards,


Facebook SDK gives too many errors after importing the samples

I have followed the tutorial in facebook.com concerning how to integrate facebook into android applications. I have downloaded facebooksdk and imported the projects to a clean workspace on Eclipse. However after I have imported them , I got about 150 errors about "can not be resolved to a variable".

Among the samples there is also a FacebookSDK project that is imported. I assume that is the real library to be used for other samples ?. I have looked into the details. HEre is what I have found :

  • FacebookSDK project doesnt have any library path problems. However, all other sample projects tries to find facebooksdk.jar in the bin folder of facebook project. And there is no such file. Also, I have not found a single thing about a facebooksdk.jar in google.

-The errors concerning FacebookSDK project are as follows :

R can not be resolved to a variable.

-The errors concerning Other sample projects are as follows :

Some resolving issues with imported functions and classes.

I appreciate any advice. Thank you.

4

2 に答える 2

2

代替は TweenLite です。従来の Kinetic トランジションよりもはるかに多くの機能を備えているため、廃止され、TweenLite は KineticJS 形状に完全に適合しています。

これらのトランジションの使用方法を示すチュートリアルを次に示します。

http://www.html5canvastutorials.com/kineticjs/html5-canvas-linear-transition-tutorial-with-kineticjs/

  var stage = new Kinetic.Stage({
    container: 'container',
    width: 578,
    height: 200
  });
  var layer = new Kinetic.Layer();
  var rect = new Kinetic.Rect({
    x: 100,
    y: 100,
    width: 100,
    height: 50,
    fill: 'green',
    stroke: 'black',
    strokeWidth: 2,
    opacity: 0.2
  });

  layer.add(rect);
  stage.add(layer);

  var tween = new Kinetic.Tween({
    node: rect, 
    duration: 1,
    x: 400,
    y: 30,
    rotation: Math.PI * 2,
    opacity: 1,
    strokeWidth: 6,
    scaleX: 1.5
  });

  // start tween after 20 seconds
  setTimeout(function() {
    tween.play();
  }, 2000);
于 2013-05-20T12:17:33.443 に答える