ChesVCF's Forum Posts

  • Anybody??

  • I personally use PhoneGap Build, and it works fine

  • Hello, I am having a weird problem when swiping over an HTML object. It is difficult to explain what is happening, so I prepared a sample capx and I will give you some steps to reproduce the "bug":

    Sample capx

    You will need Nandynho 's HTML|IFrame Plugin (same version as mine)

    Steps to reproduce:

    This "bug" only happens when you run the app on mobile, but you can simulate a mobile device with Chrome:

    • Run the project with Google Chrome
    • Open the Chrome DevTools (hit F12)
    • Toggle the device toolbar (Ctrl + Shift + M)
    • In the HTML code (right), open the <body> tag and select the second <div> (the one with the id="c2canvasdiv")
    • Under the HTML code, you can see the (css) style settings of that element, add the property "overflow: auto;" just as in the capture:

    Now it behaves the same way it behaves on mobile (exporting via cordova):

    • Try to swipe to the right over the black text (inside the HTML element)
    • You will swipe to a black "page" with red text, this isn't expected to happen
    • Notice that the black area is scrollable, you can scroll both in the x and y axis; the project is in the top left fourth (not expected to happen)

    There is only one way to successfully swipe: swiping over non-HTML content (for example, at the bottom of the layout). This is how it is expected to work. Of course, if you don't do all the steps above, it will also work as expected, but the steps above reproduce the project's behaviour on mobile.

    Does anybody know how to solve this issue? Thank you for your help!

  • gumshoe2029 Thank you for your answer!

    I'm not really an expert in CORS, does this mean I have to add

    Access-Control-Allow-Origin: *[/code:1bzjodyy] to my index.html's header? And if it was a header problem, why doesn't it affect to the C2 logo? (For example, icon-114.png loads as expected, while any other image does not).
    
    I could integrate the image(s) in a sprite, but what I really want this for is to be able to access that image(s) from HTML code, like [code:1bzjodyy]<img src="image.png" ... />[/code:1bzjodyy] I am starting to consider whether this is a bug, and if it is not, this isn't documented at all! Maybe Scirra could throw a bit of light on this...
  • Ok I found a bad and dirty workaround (not a solution yet):

    AJAX Request project file ("image.png")
    On AJAX Request completed --> Sprite Load image from "image.png"
    [/code:84w8ia35]
    BUT I will have to do an AJAX Request every single time I want to load a new image and this solution doesn't work for html code
    For example:
    [code:84w8ia35]<img src="image.png" height="100px" />[/code:84w8ia35]
  • Guizmus Yes, I export to Cordova and run my app on Android. I did preview over LAN in my mobile phone (yes, being on the same WiFi) and there was no problem at all. As I said, problem comes only when you run the APK file. I made a test capx where I can trigger the "Load image from URL" action in different ways and with different images, and it only worked with the C2 icons. This makes me suspect that it is either a bug that has to be reported or that project files have to be somehow preloaded before being shown (and for some reason C2 icons are automatically preloaded, I guess). What do you think?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, now I'm really clueless: when I export, "Load image from url Project File" only works if that image is one of the C2 icons that come by default in every capx (by the way, they are undeletable, they reappear if you try to remove them!). If you try to load any other image, it simply doesn't work. Please any kind of help would be truly appreciated.

  • gumshoe2029

    the manual says that any project file's url looks like "image.png" - and this works, but ony when previewing.

    As I said, there is no problem testing in a browser. Does anybody know where the problem is? Do I have to report it as a bug??

  • Anybody?

  • Hi! I use the Sprite's "Load image from url" action, but I have a problem with the file's url: the manual says that any project file's url looks like "image.png" - and this works, but ony when previewing. When I export it (PhoneGap) it doesn't work at all. I guess this is because I locate project files in subfolders (e.g. Files/Images/subfolder/image.png), do I have to link project files with the full subfolder-path? For example "Images/subfolder/image.png". And if this is the problem, why does it affect only the exported version?

    Thank you for your help.

  • I also use Nandynho's version and I love it! However, on mobile it has some bugs (eg. no cancel button displayed and confirm button text is always "Ok") but I think this is due to the minified script after exporting. Anyway, amazing and very useful Plugin! Totally recommendable

    EDIT: It definitely is because of the minified script - simply uncheck this option before exporting and it will work perfectly.

  • I don't think it's possible to keep a C2 app running in the background. If you only need a timer, take a look at rexrainbow's timer plugin.

  • You do not have permission to view this post

  • You do not have permission to view this post