Aida

Members
  • Content count

    9
  • Joined

  • Last visited

  1. Hi, I am try to use particles in my code. so i have registered it like this "me.pool.register("droplet", game.dropletParticle, true);" and in my entity.js i have written "game.dropletParticle = me.SpriteObject.extend({ init: function(x, y) { // class constructor this.parent(x, y, me.loader.getImage("droplet")); }, game.startEmitter = function(x, y, count) { // add count particles in the game, all at once! for (var i = 0; i < count; i++) // add the particle in the game, using the mouse coordinates and game layer 5 // use the objects pool for better performance! me.game.world.addChild(me.pool.pull("droplet", x, y), 5); };" i have mentioned the image in resources.js as well but I am getting the following error ---me.Error: Cannot register object 'droplet', invalid class--- all my other images i have used tmx file. Can someone help me here!!!
  2. got it Do u have any example for panning as well??
  3. Thankyou so much.. Mousewheel event is working for me now . but is there a way to differentiate mouse scroll up and mouse scroll down. for example i am trying to zoom in and zoom out using mouse scroll.
  4. Should i just add the pointer.js file you have updated??? I cdnt find the latest melon.js file in the github .
  5. okay. I will be more descriptive with the title next time.!!! I am using melonjs 4.1 . Tried in both firefox and chrome, I am using Windows 8.1 this is my code me.input.registerPointerEvent("mousewheel", me.game.viewport, function (event) { me.event.publish("mousewheel", [ event ]); },false); this.mousewheel = me.event.subscribe("mousewheel", function (event) { var viewport = me.game.viewport; viewport.currentTransform.translate( viewport.width * viewport.anchorPoint.x, viewport.height * viewport.anchorPoint.y ); viewport.currentTransform.scale(0.995); viewport.currentTransform.translate( -viewport.width * viewport.anchorPoint.x, -viewport.height * viewport.anchorPoint.y ); });
  6. I wanted to use mouse scroll event . I tried " mousewheel " but its giving me an error " TypeError: eventTypes is undefined". Can smeone please help me here!!!!!!!
  7. Thank you so much. zooming is working for me!!!!!!
  8. thank you.. can you please give an example if possible!!!
  9. Can anyone please tell me whether zooming / panning is possible in melonjs???