wmsgva's Forum Posts

  • 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)

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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?

  • Noticed after further researching this error that the problem is that when the js video plugin tries to set the

    video's current time, there's no control to ensure the video is ready (hence the HAVE_NOTHING status which is returned).

    C:\Program Files\Construct 2\exporters\html5\plugins\video\runtime.js :

    Acts.prototype.SetPlaybackTime = function (s)

    {

    this.video.currentTime = s; >> Need to add some control here to only set this property once video information is known

    };

  • Problem Description

    After using the Video.SetPlaybackTime method with the video object, the following error occurs:

    Javascript error

    Uncaught InvalidStateError: Failed to set the "CurrentTime" property on "HTMLMediaElement": The element's

    readyState is HAVE_NOTHING, line 686 (col 3)

    If this method is not used, the video object works fine and plays the video within my game.

    Attach a Capx

    Not needed

    Description of Capx

    N/A

    Steps to Reproduce Bug

    • Use the SetPlaybackTime method with the video object

    Observed Result

    Javascript error displayed (see error in first part of this template). Error doesn't occur if

    the video.setplaybacktime method is removed from the code (video plays normally after

    using video.play method).

    Expected Result

    Video should play back faster than normal (video lasts 2 minutes, but set playback time to 15 seconds for testing purposes)

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (Not Tested)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 7 Professional, latest service pack

    Construct 2 Version ID

    Construct 2, Release 178 (64 bit)

    OpenGL information: Rendering with OpenGL 4.4.0, with NVidia GTX 770 card (using latest NVidia driver, ver 340.52)

  • I am using a video object in my game which plays two different videos at different stages.

    I detect when the first video being played is finished using the "video.has ended" property. This works fine and allows the player to move

    to the next stage in the game.

    Later on, another video is to be played and there's an issue. Despite changing the video source (video.Set video source to...) to another

    mp4 file, the "video.has ended" property still seems to be set to True, meaning when I enter this part of my code, the program thinks the player

    has already viewed the second video and it moves onto the next stage.

    Do I need to use two different video objects (not convenient, as I call a function to play the video, as it does other things before executing

    the video.play method) or is there any way other than just changing the video object's source to reset its "has ended" property to false?