AaronSmithUK's Recent Forum Activity

  • Regarding your problem with Visual Studio crashing when not in "test" mode basically the call to IAP fails and takes out the runtime. I fixed this by altering my non-compressed c2runtime.js so that the calls to the windows IAP are wrapped in try catch statements. Not ideal, but got me through the problem!

    Windows8Store.prototype.purchaseProduct = function (product_) {

    if (product_ === "app") {

    this.purchaseApp();

    return;

    }

    var self = this;

    try {

    var productLicenses = this.currentApp["licenseInformation"]["productLicenses"];

    this.currentApp["requestProductPurchaseAsync"](product_, false).then(

    function () {

    if (productLicenses["hasKey"](product_) && productLicenses["lookup"](product_)["isActive"]) {

    console.log("[Construct 2] Product '" + product_ + "' purchased OK");

    if (self.onpurchasesuccess)

    self.onpurchasesuccess(product_);

    }

    else {

    console.log("[Construct 2] Product '" + product_ + "' purchase failed (cancelled?)");

    if (self.onpurchasefail)

    self.onpurchasefail(product_, "failed");

    }

    },

    function (msg) {

    console.log("[Construct 2] Product '" + product_ + "' purchase failed: " + msg);

    if (self.onpurchasefail)

    self.onpurchasefail(product_, msg);

    });

    } catch (e) {

    console.log("[Construct 2] Product '" + product_ + "' purchase failed - server not available");

    if (self.onpurchasefail)

    self.onpurchasefail(product_, "purchase failed - server not available");

    }

    };

    Windows8Store.prototype.restorePurchases = function () {

    };

    Windows8Store.prototype.requestStoreListing = function () {

    var self = this;

    try {

    this.currentApp["loadListingInformationAsync"]().then(

    function (listing) {

    console.log("[Construct 2] Listing information loaded");

    self.appName = listing["name"];

    self.appFormattedPrice = listing["formattedPrice"];

    self.lastProductListings = listing["productListings"];

    if (self.onstorelistingsuccess)

    self.onstorelistingsuccess();

    });

    } catch (e) {

    if (self.onstorelistingfail)

    self.onstorelistingfail();

    }

    };

  • Thanks. In the end I've dumped the IAP for the Amazon App version for now.

  • Alternatively you can use Visual Studio Community with Tools for Apache Cordova (all for free).

    https://www.visualstudio.com/vs/community/

    https://taco.visualstudio.com/en-us/doc ... e-cordova/

    Create a Javascript Cordova project in VS, paste the file output from Construct 2 into the www folder in the new project - and you're pretty much there.

    I've used this setup to launch on Google Play, Amazon App Store, App Store (Apple), and Windows Store (for what it's worth!)

    IOS 10 now supports playing video inline, on iPhone. The changes also incorporate auto-playing video without user interaction (muted videos only).

    https://webkit.org/blog/6784/new-video- ... s-for-ios/

    Plus, there is support for painting a video onto canvas, so potentially allowing background video in construct 2 on IOS!

    "These new policies mean that more advanced uses of the <video> element are now possible, such as painting a playing <video> to a <canvas> without taking that <video> into fullscreen mode."

    Someones cooked up a polyfill for IOS 8 and 9 as well:

    https://github.com/bfred-it/iphone-inline-video

  • I'd happily use a construct 2 amazon plugin, if such a thing exists! Do you know of one?

  • Hi

    I've managed to get IAP working for my apps for the Windows Store (Construct 2 native IAP plugin), Google Play and IOS (Cranberry IAP plugin) but I can't get either plugin working on the Amazon App store (as a compiled apk file via Cordova).

    Basically, I request the store listing, but nothing ever comes back. The exact same apk works with the Google Play store but on Amazon Apps, no response. I've tested using both native IAP and cranberry.

    Native IAP never responds after requesting store listing.

    Cranberry responds with "failed to list store".

    Does the native IAP plugin support Amazon Apps, or is it only for HTML5 hosted apps? I can't find a working example anywhere.

    Has anyone achieved this??

    Just to be clear this is in the context of a project exported as Cordova app, compiled as apk (Android), and uploaded to the Amazon App marketplace (for distribution on Kindle Fire tablets).

    Hope someone out there can help!

    Aaron

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In answer to your question about the location of WindowsStoreProxy.xml in Windows 10 apps - it is now dynamically built and available in the packages path.

    C:\Users\<username>\AppData\Local\Packages\<app package folder>\LocalState\Microsoft\Windows Store\ApiData\WindowsStoreProxy.xml

    After export make sure you build/run visual studio at least once to so the <app package folder> is created. Browse in file explorer to C:\Users\<username>\AppData\Local\Packages\, sort by "Date created" and there it is!

    You can then copy that file to the root of your Windows 10 project and it's editable from there.

    https://msdn.microsoft.com/en-gb/window ... -purchases

    Hope this helps!

  • Thanks, always good to have options!

  • I found another way to do it. I used the paster plugin instead.

    https://www.scirra.com/forum/plugin-paster_t88750

    Paster allows you to create instances of an object with unique image sources.

    Big thanks to R0J0hound!

  • I've now realised that this behaviour is by design. The sprite object instances all share the same image source, so if I change it, it changes on all instances.

    So my question is now: how do I load different images into an undetermined number of sprite object instances? Or is this the wrong approach?

  • I've created a simple gallery that loads an image into instances of an image placeholder sprite on creation of the sprite.

    I use a random image url with a cache breaking value on the end to ensure a fresh image every time.

    Problem is that when the image placeholder sprite is created, the call to load the image from the url reloads ALL the placeholders rather than just the one just created.

    Here's a demo capx:

    https://drive.google.com/file/d/0BxrnHlX5UrYYTk5yRXJNU2V3RTg/view?usp=sharing

    This might be a bug, but it's more likely me doing it wrong.

    Please someone point me in the right direction!

  • Great, that's much better. Thanks.

AaronSmithUK's avatar

AaronSmithUK

Member since 26 Apr, 2016

None one is following AaronSmithUK yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies