wmsgva's Recent Forum Activity

  • The browser close detection Nimos100 is asking for could be provided by extending the triggers for the Browser object with the "BeforeUnload" event. It works

    using javascript with window.onbeforeunload ...

    Another suggestion for the "Audio" Object:

    • Add the ability to play a sound stream, not just a sound file.

    I have currently managed to do this using the Browser.Execute javascript with the following parameter:

    "var audio = document.createElement('audio');audio.src='http://onefm.ice.infomaniak.ch:80/onefm-high.aac';audio.play();"

    (Replace the information under audio.src with the address of your stream and it should work fine)

    The only issue is I haven't found how to stop the audio from playing (I can't find a way to get the instance stored in the audio variable back to Construct to then call audio.pause() in the same way. If anyone has an idea, it would be great

  • Found the source of the problem. I had made the mistake of setting the compression for some of the sprites to JPEG.

    Those with transparent areas don't support this and must use png8 if they need to be compressed.

  • Thanks Zenox.

    This seems to point to a graphic card driver issue as several of us suspected. I recently updated to the latest drivers from NVidia.

    Are you also using an NVidia card and if so, with which driver version?

  • Ashley,

    Did you read my previous post before closing? I do have a Capx file and wanted to attach it to the message.

    I now understand you can't attach files directly, so I've copied to Dropbox. Here's the link:

    h*t*t*p*s://w*w*w.dropbox.com/sh/emg61edorqq15tz/AACMi2VoW7qZzuf7_U8iNq4Ga?dl=0

    Could you possibly review and reopen the case? Thanks.

    (P.S. Why don't you use a good captcha to prevent spam and allow all users to post links?)

  • Done some more tests:

    1) Tried exporting with WebGL disabled -> Problem still remains in executable

    2) Created a small Capx with one scene (layout) and one object (sprite) from the game and exported -> Problem persists around the sprite object (black box around it)

    I can provide this small Capx and the executable file for it if needed (not sure how to attach these files, as I don't seem to have the option in the editor)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Well Newt, the problem is I can't provide the entire Capx of my game (it's quite large and confidential). Furthermore, the issue doesn't occur for all objects, so providing a source file wouldn't provide any further insights.

    As you mention, the only element recently updated is the NVidia graphic driver, which is probably the source of the problem. Not sure however how I can solve for this? I could try to revert to older drivers to see if the problem is removed by doing so, but that's not a permanent solution.

    As I mention, the NW.js provided by Scirra is not the latest available either. Perhaps we could have version 12.1 for Construct 2 to see if this helps...

  • Problem Description

    I have been working on a game for several months and during the development, exported it a few times and tested without any problems.

    Tried an export again today and in some parts of the game, when a sprite uses animation, a black box appears next to the sprite. The problem

    doesn't occur when launching the game within Construct2 (all works perfectly), only when exporting using the NWJS and running the Windows

    64bit executable.

    Attach a Capx

    Not needed

    Steps to Reproduce Bug

    • Export your game from Construct2, select desktop NW.js
    • PNG compression set to Standard and minify script selected
    • Export options: Single instance, Windows frame

    Observed Result

    Black rectangles appear next to some sprites in the game (seems to be when sprites have several animation frames, but problem

    occurs without animation taking place)

    Operating System and Service Pack

    Windows 7 Ultimate SP1

    Construct 2 Version ID

    Construct 2 Release 200 (64 bit), Built at 2.47pm on March 16th 2015

    Open GL version

    Rendering with OpenGL 4.5.0 NVidia 350.12 (card is GeForce GTX770/PCIe/SSE2, shader language 4.50)

    NWjs version

    Using version 0.12.0 from Scirra web site (nwjs-for-c2-v0-12-0.exe published March 9th 2015).

    Noticed that this is not the latest version of NW.js available. A version 0.12.1 exists which corrects some bugs. Perhaps

    Scirra needs to release version 12.1 for Construct2? See:

  • You may use the HTML5 audio component and call it with javascript using the Browser plugin in Construct 2.

    See my post "Audio streaming issue" about this topic.

  • In the game I'm currently creating, players can click on a radio in some of the rooms and it then starts streaming from one of the local radios.

    This works fine when starting the streaming using the Browser plugin. When the player clicks on the radio object, the Browser object

    calls the following javascript code using the "Execute javascript" action:

    "var audio = new Audio('http://onefm.ice.infomaniak.ch:80/onefm-high.aac');audio.play();"

    My issue occurs when I want to stop the stream from playing. I did try to have the Browser object execute the following javascript:

    "audio.pause();audio.currentTime = 0;"

    This is the correct way to stop the stream playing, but I suspect the issue is that the "audio" object is not declared anymore (the browser

    forgets it when it has finished executing the first set of instructions, as the variable "audio" is local).

    In a conventional programming language, I wouldn't have a problem, as I would have stored the variable and just recalled it, but I don't

    know how to solve the problem in C2. Is there any way to call some javascript code that would allow me to reassign the current audio

    stream object back to a variable in order to then use this variable with the pause() method and to set the currentTime parameter to zero?

  • Have tried destroying the video object and creating a new instance and it now works. Thank you Nimos100

  • Thanks onurdogan07, this works fine.

  • Hi Nimos100,

    Thank you for your feedback, but I'm not sure my issue was clear.

    I am not trying to set the "has ended" property, but using it to detect when the player has finished viewing a video:

    Video Has ended Function Call HideVideoDecor()

    Basically, I have the video playing in a small TV graphic element which I want to hide once the video has finished playing. I also set

    a variable "SeenFilm" to 1, which I test later in my code to continue the game.

    This works fine in the first group of code in which it is used (it does detect the when the video ends), but then later, despite having

    set the video to a new source file, trying to read the Has ended property still seems to results in it returning a "True". Basically, why isn't

    this property reset to False when a new video file is selected for a given video object?

wmsgva's avatar

wmsgva

Member since 4 Sep, 2014

None one is following wmsgva yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies