Jump to content

valentinaCom

Members
  • Content Count

    25
  • Joined

  • Last visited

  1. valentinaCom

    sound

    Hi I'm trying to change the currentTime of a phaser's sound. When user press the fastForword or rewing btns I need the currentTime of the sound playing to change. I tried "this._currentSound.currentTime -= 10.0;" however it's not working. any solution? thank you
  2. valentinaCom

    mask

    Hi I have in my game a sound playing and I did a progress bar that reprecent the sound duration. The bar and buttons (play/stop) are all in a group. My problem is that when I put a mask to the progress bar, it put it to all the group. how can I do to put the mask only to one object of the group? here's the code: (the image "full_music_bar" is ina a group called "_soundGroup"). durationAnim:function(){ var maskGraphics = new Phaser.Graphics(); maskGraphics.beginFill(); maskGraphics.drawRect(this.full_music_bar.x, this.full_music_bar.y, 245, 11); this.full_music
  3. valentinaCom

    scale

    Hi So I have in my phaser game a text element (DOM). When I set the scale mode of my game to SHOW_ALL and set it to fit the screen size, my canvas changes perfectly but the html element doesn't. I am trying for a while now to change the element scale according to my phaser canvas scale so the text will always stay at the position I want it to be and it's size to fit too, however, I can't find how to do it. Of course, I need to the font size to change too. any help? Thank you
  4. thank you! That's realy simple!
  5. Hi I have in my game a Phaser.Text object and the player need to highlight/select part of it. The problem is that when I add a text to the canvas, I can't select it. It's acting as an image. I tried to use an Html element but then I need to fix the scale problem (resolution) and I want to avoid it. any solution? thank you
  6. valentinaCom

    webcam

    hi I need to add in my game an option of taking a picture using the player webcam. I have a btn that when pressed, the camera needs to open so the player can take a picture and then add the pic to my canvas. any idea? thnx
  7. Hi I have a button that when I press on it, it duplicate (I add a new button) and I want it to automaticly start dragging the new one. right now I need to press again in the new btn to start the drag. here's my code: addItemsToMenu:function(){ var btn = game.add.button(50,50, 'obg'); btn.anchor.set(0.5); btn.onInputDown.add(this.duplicatePic,this); }, duplicatePic:function(e){ var newBtn = game.add.button(e.x, e.y, e.key); newBtn.anchor.set(0.5); newBtn.input.enableDrag(true); newBtn.events.onDragStart.add(this.dragItem,this);
  8. Hi, How can I use Fabric.js with phaser? I need some of my images in game to be fabric js images and I want them to be over phaser canvas. I don't want to create a fabric js canvas as well.. It's possible?
  9. There is a way to duplicate a group? I need 2 groups in my game, that contains the same objects (if I add something to one of them, it's need to be added to the other group too)
  10. hi Larzan can u plz show me (the code) how did you render the contents of game.world to a render texture instance used as the texture for a Sprite (and add it to canvas)?
  11. ok the rander idea sounds good.. but can you show me how to use it? I new in phaser and js and I'm searching for a solution for a lot of time now and found nothing..
  12. hi I'm trying to take a screenshot of my canvas and adding it (as an image) to my game. actually, I have in my game an image in the corner that keep chenging according to what I have in the canvas (like a picture of the canvas that update everytime something change in it) I thought of checking everytime for a change, and if there is one to take a screenshot of canvas and adding it as an image. I tried with "game.canvas.toDataURL();" but all I got is a black image. help? thanks
  13. hi I'm trying to upload a file from local disk to my project: js: function showMyImage(fileInput) { var files = fileInput.files; for (var i = 0; i < files.length; i++) { var file = files; var imageType = /image.*/; if (!file.type.match(imageType)) { continue; } var img= document.getElementById("thumbnil"); img.file = file; var reader = new FileReader(); reader.onload = (function(aImg) { return function(e) { aImg.src = e.target.result; }; })(img); reader.readAsData
  14. hi, there is a way to convert a specific frame from a spritsheet to an image? I have a lag problem caused by the weight of the spritesheet so I thought of getting the the last frame from the sprite and convert it to an image so it will be less havy (I don't need the animation anymore, just the graphic). If someone have another solution I will be greatful fot that. thank you and have a great day
×
×
  • Create New...