Preload sound in preview problem

Bugs will be moved here once resolved.

Post » Tue Jan 29, 2013 10:04 pm

Link to .capx file (required!):
http://dev.intiva.ws/preload_test/preloadSound_onPreview.capx

Steps to reproduce:
1. Run preview with provided capx.

Observed result:
    Doesn't change layouts

Expected result:
    Change layout on "preloads complete"

Browsers affected:
    Chrome: yes
    Firefox: yes


Operating system & service pack:
    WinXP SP3
Construct 2 version:
    r114 (also tested in r116)


I've spent several hours with this and perhaps I'm missing something, but I've read through the forum and manual and didn't find anything.

The capx consists in two layouts: one splash and the other mimicking a game. One sound is preloaded on start of splash for it to be played on user input in second layout. Also music is streamed in start of splashscreen.


-If I disable just "All preloads complete" condition it works as it should. But how do I know when it was preloaded?
-The strange thing is if I disable only the preload the game also gets stuck in the splashscreen as waiting for the music to download (this is just mere speculation).intiva2013-01-29 22:05:44
B
34
S
8
G
5
Posts: 32
Reputation: 5,385

Post » Wed Jan 30, 2013 2:07 pm

Closing as not a bug: your event says "On loading finished AND all preloads complete". 'On loading finished' only ever fires once, and if all sounds have not preloaded already by that specific time, the event will never run.

You probably just want to replace "On loading finished" with a compare two values: loadingprogress = 1
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,508

Post » Wed Jan 30, 2013 3:21 pm

[QUOTE=Ashley] Closing as not a bug: your event says "On loading finished AND all preloads complete". 'On loading finished' only ever fires once, and if all sounds have not preloaded already by that specific time, the event will never run.

You probably just want to replace "On loading finished" with a compare two values: loadingprogress = 1[/QUOTE]

You are very right! I completed overlooked that "on loading finished" is in fact a trigger.

Just for the sake of completeness: "All preloads complete" remains FALSE even if there aren't any preloads going on?

EDIT (addendum)
I had to also add a "Trigger once ..." because it was firing a second time.intiva2013-01-30 19:09:04
B
34
S
8
G
5
Posts: 32
Reputation: 5,385

Post » Sat May 30, 2015 11:36 pm

Sorry to bump up an old post but , I can only find it here , my prloader is firing the "on loader complete" trigger twice . loading progress becomes 1 and then goes back to 0.5 or so after loading few images. Any ideas what might be happening.

Edit: I just saw that I was not supposed to reply to a closed bug. I am sorry pls don't ban.
B
4
Posts: 5
Reputation: 217


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests