Ainxty's Recent Forum Activity

  • I'm not exactly sure what to report. How is the Silent command in C2 executed in JS?

    I thought maybe tacking on a comment on your bug (280161) would suffice.

    I've gotten around this for now by turning the music into audio since they're theoretically the same thing on a mobile device.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It seems to be a Chromium bug I guess more so than C2's audio plugin. It's buggy when using Intel XDK or CocoonJS too. Works just fine in Firefox on all my devices running various versions of Android.

  • Link to .capx file (required! If link is blocked remove the http and www parts):

    dl.dropboxusercontent.com/u/29061450/construct2/audio_mobile_chrome.capx

    hosted to test: ainxty.com/temp/audiobug

    Steps to reproduce:

    1. Load page in mobile chrome

    2. Press play to initiate music

    3. Try to mute music with button

    Observed result:

    Music does not become muted. Sound does become muted.

    Expected result:

    Mute music and sound.

    Browsers affected:

    Chrome: yes, 32.0.1700.99 (or any previous version dating back a couple months)

    Firefox: no

    Internet Explorer: no idea

    Operating system & service pack:

    Android 4.4.2, Nexus 5, Nexus 10

    Android 4.3, Samsung Galaxy S2

    Construct 2 version:

    r158

  • After a bit more tinkering I was able to import the json into an array without Construct 2 exploding. However, now I have this:

    <img src="https://dl.dropboxusercontent.com/u/29061450/construct2/array_data.jpg" border="0">

    Here's the capx.

    Almost there I think...

  • Hi,

    I've been working with C2 for a couple weeks now. Yesterday I ran into an issue trying to parse a JSON file into an array. It works fine with the Dictionary object, but I don't seem to be able to get the formatting right with an Array. Now, I already read through this thread:

    scirra.com/forum/use-custom-jsOn-to-array_topic66542.html

    But I'm not trying to parse "pure" JSON and I have access and ability to modify the JSON file. Here's the code I'm using (with some irrelevant data):

    <?php
    header("Access-Control-Allow-Origin: *");
    
    $name = 'Ainx';
    $level = 3;
    $experience = 56;
    $gold = 244;
    
    //Build 2nd dimension
    $arr_names = array('name' => $name);
    $arr_levels = array('level' => $level);
    $arr_experiences = array('experience' => $experience);
    $arr_golds = array('gold' => $gold);
    
    //Build 1st dimension
    $arr_data = array($arr_names, $arr_levels, $arr_experiences, $arr_golds);
    
    //Build c2array
    $arr = array('c2array' => TRUE, 'size' => array(4, 2, 1), 'data' => $arr7);
    
    echo json_encode($arr);
    ?>
    

    The code prints fine and I can parse and retrieve it with .getAjax and so on... I can also retrieve that in C2, but when I try to put it into a C2 array, it does nothing. Am I building this array incorrectly? I included C2 specific tags.

    Here's the example php file above.

    Using a dictionary works:

    $dic_data = array('name' => $name, 'level' => $level, 'experience' => $experience, 'gold' => $gold);
    $dic = array('c2dictionary' => TRUE, 'data' => $dic_data);
    

    I'm able to import that into a dictionary in C2 without a hitch, but I'd like to be able to use arrays, because Dictionary is a tad too primitive for what I need. I thought about using two Dictionaries instead when I couldn't get the array to work, but that's a bit silly...

    I'm using the AJAX Request, AJAX On completed and Array Load events; all the basic AJAX/Array stuff covered in the tutorials and the manual on the site. I think the issue is with how I'm formatting PHP which now that I think about it might not be for this forum :<

    Any help would be appreciated.

Ainxty's avatar

Ainxty

Member since 9 Jan, 2014

None one is following Ainxty yet!

Connect with Ainxty

Trophy Case

  • 10-Year Club

Progress

10/44
How to earn trophies