Play BG Music on iOS 6(Safari) and use Fullscreen?

0 favourites
  • 4 posts
From the Asset Store
Casual Gameplay Music is a royalty free collection of background music tracks and loops.
  • Hi! The manual says you need a manual input before sound is played so I created a "Touch to begin" overlay above my title screen. But I have to touch the display of my iPod twice to make the music play. <img src="smileys/smiley5.gif" border="0" align="middle" />

    I have the following events (added trigger once but does not seem to change anything):

    Touch: Is touching [T]Launch

    > System Trigger once:     Audio Play Title looping

                  ?[T]Launch Set Invisible

                  ?TiledBG Set Invisible (black overlay hiding the title screen)

    The overlay (text and black tiledbg) disappears on first touch but sound only starts after a second touch. Does anyone know why or how to fix this?

    And I tried to add a Request Browser Fullscreen Centered and Scale Outer as well and set project options to "Landscape" but it does not seem to do anything on Safari on iOS 6 (7 not working on my iPod 4th Gen.). After the first tests it was filling the screen properly even without the fullscreen request working (as far as I can tell) but now it has an empty bar on the bottom. I did not change the size of the canvas and don't know where it comes from. <img src="smileys/smiley5.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Regarding Scaling I just found something in the example "Fullscreen - scaling to window size". It uses "Scale" as scale setting which is not in the dropdown list, only Scale inner/outer are listed there. And I cant seem to enter text in the field.

    I changed "Unbounded scrolling" which seems to fix the aligment, its centered now (but still having this black bar I didnt have before). :)

    But is there no way to automatically use landscape/fullscreen mode on Safari on iPod/iPhone?

    /UPDATE:

    I changed the code a bit because the music was playing everytime I touched the display despite using "do once" (object was only invisible not removed). I changed it to "Destroy" and it does not play multiple times anymore but it is still not playing after the first touch. I have to touch the display a second time and then it plays (but the object starting the music is already destroyed).

    <img src="http://img5.fotos-hochladen.net/uploads/audioprob8ulqvy3ht6.jpg" border="0" />

    <font size="4">Or is there no way to do this in Safari and I have to use CocoonJS?</font>

  • I think there might be a bug in the Audio plugin where it still queues music for the next touch in a touch event. You can just play music on the start of layout and the Audio plugin will actually start playback automatically upon the first touch - you don't need a specific event to handle it. I'll update the manual to clarify this.

    'Trigger once' doesn't trigger once ever, it just means 'only run if the event did not run last tick' and therefore makes no sense to use in a subevent to a trigger. Use a global variable for that kind of thing instead.

  • Ok, I will try to add it to "on start" of the layout.

    Thanks for pointing that out.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)