John Cutter's Forum Posts

  • Thanks a lot dsminor. I really appreciate you taking the time to do that for me!

  • I have a 2 dimensional array with a width of 4 and a height of 438. (If I'm using those terms correctly, and I believe I am.) Imagine it looks something like this:

    [100,text,text,0]

    [124,text,text,1]

    [198,text,text,2]

    [113,text,text,3]

    [256,text,text,4]

    ...

    I have two variables called "over_100" and "under_100". How do I iterate through my array, row by row, and increment those two variables based on the data in the first column? (100, 124, 198, etc.)

    Another quick question: I've written a lot of stuff in Excel VBA over the years. Do C2's arrays work the same way? To iterate through a spreadsheet I use: "cells(row,col)" but I think that makes the height "x" and the width "y" which is backwards compared to C2, right?

  • Problem Description

    I'm working on a web app that uses speech synthesis. Unfortunately, the UserMedia function to add voices to a listbox does not work reliably on my iPad Plus or my iPhone 6+. (It only populates the list about 20% of the time.)

    Please not that this feature seems to work every time on my PC. I'm only having issues with my iOS devices.

    Attach a Capx

    To make sure it wasn't MY code causing the problem, I was using the "Speech Synthesis.capx" file in the Examples folder that comes with C2.

    Description of Capx

    The capx grabs a list of voices available on the device/browser and adds them to a listbox.

    Steps to Reproduce Bug

    • Go to my website using an iPhone 6+ or an iPad Plus (http://www.jmcdesign.orgfree.com).
    • Look at the voices in the listbox
    • Refresh the page over and over again (the listbox will frequently be empty)

    Observed Result

    The listbox is frequently empty when I reload the page. (About 75-80 percent of the time.)

    Expected Result

    The listbox should ALWAYS contain voices, so my users can choose an appropriate voice for their device.

    Affected Browsers

    I have seen similar results on both Safari and Chrome

    Operating System and Service Pack

    9.2.1

    Construct 2 Version ID

    r221 (64-bit)

  • My browser app includes speech synthesis which requires me to pick different "voices" depending on whether the user has a PC, an iPhone, an iPad, etc. The Browser object allows me to test for the platform ("Win32", "iPhone", or "iPad"), but I don't know what to use for Android. Does anyone know?

    NOTE: In a perfect world I would fill a list box with the voices available on the user's device, but this feature only seems to work reliably on PC. I'll enter a bug on that when I get some extra time.

  • I've been trying to wrap my head around the Local Storage object, but many of the tutorials only show how to save and retrieve a single value. But the asynchronous nature of this feature is the main thing throwing me for a loop -- at first I thought I had to request and retrieve values in sequence. Fortunately, last night I think it finally "clicked".

    This works, right? (I also need to check if the items exist and create them if they are missing, but I know how to do that.)

    [START GROUP]

    On start of layout:

      get item "player" get item "score" get item "sound"

    Set group "START GROUP" Deactivated

    [OPTIONS GROUP]

    On item "player" get

      System -> Set item global_player to localstorage.itemvalue

    On item "score" get

      System -> Set item global_score to localstorage.itemvalue

    On item "sound" get

      System -> Set item global_sound to localstorage.itemvalue

    I think I can even deactivate OPTIONS GROUP using "On All Gets Complete" right?

  • Nice game! Love the screen transition between levels. Very professional!

  • I apparently changed something and lost the event! Thanks for catching that ramones! It doesn't seem to be in perpetual "loading..." mode now! Will have to look at it some more tomorrow.

  • Well, Local Storage is working fine in Edge and Firefox, but still broken in Chrome. Unfortunately, those other two browsers don't support speech recognition OR speech synthesis... and I need those for my app so I have to get Chrome working again.

    Will try uninstalling Chrome and reinstalling it. Hopefully, that will work.

    UPDATE: Reinstalling Chrome was a failure. And to make matters worse Chrome is now ignoring the voice I picked for speech synthesis. It's trying to use an American voice for all my French words and phrases. (That feature has been working perfectly since day one -- not sure what changed.)

    I've been working on this app night and day for two solid weeks and I was just wrapping up the last few details today. Instead of taking a few small steps across the finish line I've taken two HUGE steps backward. Kind of frustrated at the moment...

    I'm pretty sure this is only a problem on MY computer, but here's my .capx file:

    http://jmcdesign.orgfree.com/BuggedStorage.capx

  • Thanks, Paradox. Tried renaming the app but that didn't work. In fact, I tried loading a version from a week ago and that isn't working now either.

    Went into Preferences and changed the Preview Browser to "Edge" but it's still using Google. (Finally got "Edge" working from the Project Properties. That's kind of confusing...)

    My Local Storage is fixed in "Edge"! Unfortunately, that browser doesn't support Speech Synthesis or Recognition... which I need. Downloading Firefox. Man, I hope I'm not locked out of Google for my previews. Seems like it's not going to work for *any* app or game I try to create... (Would uninstalling Chrome and re-installing it help? Guess there's one way to find out...)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • My online app has been coming along well but today I added a button to reset Local Storage and now I can't seem to access it anymore. (At least when previewing with LocalHost.) I may have caused the problem by clearing storage and then immediately trying to save to it. (Unfortunately, I didn't find the "On Storage Cleared" condition until later.)

    When I look at Local Storage in the debugger I see "(loading...)" in both the Key and Value fields. Pressing the Reset button has no effect. I tried doing a Reset in my "Start of layout" event. That didn't help either, nor did rebooting my computer.

    I found out how to manually delete my Local Storage (using "F12" in Google and going to the Resources tab) and it was instantly removed, but my game still seems to think the data is there and is locked up trying to load it.

    Any suggestions on how to fix this?

  • Thank you, thank you, thank you! My sprite is a simple rectangle so I assumed the collision polygon would automatically match the shape. Nope, my poly looked like a Picasso painting. Appreciate the help, guys!

  • I am making a web app and I have several rectangular sprites that I use as buttons. ALL of my buttons work great... except one. At first it seemed to fire off randomly when I tapped it, but there are certain places -- near the middle of the button -- that will never register a tap or click. But there are other spots on the sprite that will register a Touch event every single time. The buttons are all the same so I can't figure out why one of them only works part of the time...

    I'm sure this is an issue with my code but I don't know even know where to begin to start looking. Any suggestions? I have some invisible text objects in the same area, but they are all on the same layer so clicks should pass through, right? I made my button opaque in case it was a transparency problem, but that didn't help either...

  • It's my understanding that, in order to host an HTML5 game on Dropbox, you need access to Public Folders. As of 2012 this feature is no longer available unless you pay for a Dropbox account. (I think anyone who started using Dropbox before 2012 will still have access.)

    Just FYI.

  • Good to know, Ashley! It's possible that I was looking at a subforum when I saw that there were only about 30 people online. Sorry about that. (I don't want people to see my thread title and get the wrong idea, so feel free to delete this thread!)

  • UPDATE (and a few final questions): I finally tracked down my array/dictionary issue above. Due to an export error from Excel there was a leading space in front of all my IDs. SUE (stupid user error).

    Okay, a few more questions: For my Flashcard app to be truly useful to the other people in my French class *THEY* need to be able to enter their own words and phrases. Sounds like that might be pretty tricky, since I'm already using Local Storage to track "scores". I'm also concerned about someone losing all their entries if they ever have to clear their web cache. (That would happen, right?)

    Is there any [easy] way for me to do this? There are only a few people in the class so I'd be willing to upload their vocabulary .json files to my server. In my flashcard program is there a way for me to bring up a directory of filenames? (Then they could simply choose their own vocabulary word and use that.)

    Special thanks to blackhornet for his help, so far. It's much appreciated!