jbar6381's Forum Posts

  • Thanks R0j0hound. I'll have a look.

  • Hi R0j0hound,

    This is the background: I have an image set as Base64. The file size appears to affect the size I can accept through the browser. I require four images saved as Base64 and at some point I cannot save any more images because of the limit restriction of the browser's Local Storage.

  • Hi,

    I have a FileChooser object that selects images from the local directory. I then set the image chosen to a sprite.

    Rather than setting a limit to the image size that could be selected from the local directory, I would like to compress the image. Compressing the image doesn't limit the images that can be chosen. Is there a way to do this?

  • Thanks for the response Ashley!

  • Thanks for the reply TheRealDannyyy

  • Problem Description

    The project property is set to have the Configuration Setting 'Fullscreen in browser' to 'Scale outer'. However, I want to change the 'Fullscreen in browser' setting to 'Crop' when the keyboard is brought up. Using the browser object I set the action to 'Request fullscreen - Stretch (crop)' on Touch of a sprite button or touch of a Textbox field. The app does not appear switch to 'Crop' mode. If the project's property is set to 'Crop' from the beginning it behaves as expected, but I want to be able to switch from 'Scale outer' to 'Crop'.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/527 ... dTest.capx

    Description of Capx

    The capx displays a Textbox field and a sprite button as event triggers to "attempt" to change the mode to 'Crop'.

    Steps to Reproduce Bug

    • Export the project as a Mobile Cordova platform
    • Use Intel XDK to build the project as an Apple iPhone/iPad app.
    • Install the app on your iPhone/iPad
    • Click on either the Textbox field or the sprite button

    Observed Result

    Notice that the screen does not crop. Instead the screen narrows.

    Expected Result

    The screen should crop not narrow as the keyboard displays.

    Affected Browsers

    • Safari (the default browser on iPhone?)

    Operating System and Service Pack

    Windows 7 Home Premium service pack 1

    Construct 2 Version ID

    Construct 2 Version Release 233 (64 bit)

  • Wow! Impressive statement R0J0hound. It is looking hairy as a single statement. Thanks R0J0hound and realMantis!

  • Problem Description

    I aim to allow users to unlock features in my app via in-app-purchasing. The problem arises when I use Intel XDK to build the project. I get the following build log:

    • Building a Cordova 5.4.1 application.
    • Using platform cordova-android 5.0.0.
    • The application name is "TestIAP"
    • The package name is "com.jason.testiap"
    • Preference android-signed set to true. Application will be signed.
    • Using Crosswalk Embedded 16
    • Plugin "com.smartmobilesoftware.androidinappbilling" (3.0.2) installed.
    • Plugin "cordova-plugin-whitelist" (1.2.1) installed.
    • Error: Plugin cc.fovea.cordova.purchase failed to install.
    • Error: Plugin com.mcm.plugins.androidinappbilling failed to install.
    • Plugin "cordova-plugin-crosswalk-webview" (1.5.0) installed.

    I followed this tutorial https://www.scirra.com/tutorials/4848/h ... ge-6#h2a23 in particular the section on 'Our IAPs in Intel XDK', where I use https://github.com/poiuytrez/AndroidInAppBilling as the Git repo.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/527 ... _test.capx

    Description of Capx

    You have to click on Buy and the text will change from Locked = 1 to Locked = 0. IAP is used to ensure the app is purchased to get to a Locked value of 0 (false).

    Steps to Reproduce Bug

    • Open up Intel XDK
    • Set up the CORDOVA HYBRID MOBILE APP SETTINGS for Android; Plugin Management, and Build Settings.
    • Set up a Google Play Developer Console application and obtain the IN-APP BILLING Key to use in Intel XDK as mentioned in the tutorial.
    • Build the project and you will get the build errors.

    Observed Result

    Build Errors as mentioned in the Problem Description.

    Expected Result

    The build log to be error free and the Build to successful.

    Affected Browsers

    N/A

    Operating System and Service Pack

    • Intel XDK is running on Mac OSX Yosemite.
    • Construct 2 running on Windows 7 64 bit Home Premium. version 6.1 service pack 1.

    Construct 2 Version ID

    Release 227 (64-Bit)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi realMantis,

    I was hoping for a one line statement, but I guess that's not possible. Thanks for your alternative solution.

  • Hi,

    I want something like VarX1 (MathOpIndex = 1?*:/) VarX2, where MathOpIndex is either 0 or 1, and the value at 0 is *, and the value at 1 is /.

    So for example when VarX1 = 3, and VarX2 = 2, and MathOpIndex = 0 then the formula is 3 * 2.

    Is there a way to have a single statement to capture this?

    Kind Regards,

    Jason

  • Thank you very much! That does the trick.

  • Hi Korbaach,

    This looks like what I'm after. I didn't realise you can embed JavaScript into a Browser item. I'm just curious about the code in it. It accesses ""newfile"" and 'text' i.e. document.getElementById(""newFile"") and document.getElementById('text').

    My question is, where did you get these element IDs? I exported the project and viewed the JavaScript files and I couldn't find these IDs.

    Kind Regards,

    Jason

  • Hi,

    I have blank sprites that load an image from local directory. I have done this with the following:

    FileChooser On changed | System Set NewImage to FileChooser.FileURLAt(0)[/code:2a3tspib], where NewImage is a variable. 
    
    Then I did:
    
    [code:2a3tspib]
    System | Create object CustomImage1 on layer 0 at (0,0) 
    CustomImage1 | Load image from NewImage (Resize to image size)
    [/code:2a3tspib], where CustomImage1 is the name of the sprite. 
    
    I want to load the sprites with their respective images everytime I load the app. So I stored the CustomImage[1-5] variables into LocalStorage like so:
    
    [code:2a3tspib]
    LocalStorage | Set item "CustomImage1" to NewImage
    [/code:2a3tspib]
    
    I then try to restore the image like so when I reload the app:
    
    [code:2a3tspib]
    System On Start of layout | LocalStorage Check item "CustomImage1" exists
    LocalStorage on item "CustomImage1" exists | LocalStorage Get item "CustomImage1"
    LocalStorage on item "CustomImage1" is missing | LocalStorage Set item "CustomImage1" to ""
    LocalStorage on item "CustomImage1" get | System set "CustomImage1" to LocalStorage.ItemValue
    [/code:2a3tspib]
    
    However, I believe that I'm having problems reloading these images because  the URL is only retained in memory during a session and is not permanent. Is there a way I can achieve what I want to do which is to load images into sprites dynamically and make them persistent across reloads (sessions)?
  • HI TMsimonW, thank you very much for your reply! I didn't release there was a setting for the collision polygon. I assumed it was the bounding box. Thanks for letting me know about collision polygons.

  • Problem Description

    I’m using sprites as buttons, and would like them to toggle based on whether they are touched or not, which shows whether they are selected or not.

    Sprite buttons intermittently do not recognise the touch event.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/527 ... tShop.capx

    Description of Capx

    The capx file contains a few images of png format because they have transparent backgrounds. The shop and the sprite buttons.

    There are two types of sprite buttons, one is an animation and the other is just a single image that gets destroyed and created on touch.

    When a sprite button is clicked it toggles to the selected mode which is either animation frame 1, or a second image.

    I tried these two methods to see if it was the animation that was faulty.

    Steps to Reproduce Bug

    • Click on the glasses sprite button
    • Click on the no glasses button
    • Keep repeating this and you will notice that sometimes they do not toggle to selected Observed Result Sometimes the sprite button does not recognise the touch event and so does not toggle to selected. Expected Result When sprite button is touched, they toggle to selected, on every touch event. Affected Browsers
      • Chrome: (YES)
      • FireFox: (?)
      • Internet Explorer: (YES)

    Operating System and Service Pack

    Win 7 home premium sp 1

    Construct 2 Version ID

    Release 216