[Behavior] Inject base64 string as Sprite Image

0 favourites
From the Asset Store
Elevate your games with our AI Chatbot Integration! Seamlessly connect your Construct 3 projects with GPT-4 for dynamic,
  • Pode, this is a very useful plugin! Thank you. How well does this currently work with AppMobi's DirectCanvas? I am wondering if I can use this for my mobile application. If it doesn't yet work, how soon can we expect a DirectCanvas compatible release? Thanks!

  • Dalal : I don't think it's compatible with DirectCanvas, since AppMobi's backend is OpenGL, not HTML (and base64 strings are HTML-world only).

    If AppMobi's object is intelligent enough to parse the base64 string before passing it to the directCanvas, you can have the image. Else, there's no possibility to inject images.

    Since I'm not using AppMobi for the moment, somebody needs to do the test and report it back here, sorry.

  • Ah, that makes sense. I tested it and yep, it doesn't seem to be compatible :(

    Oh well, I'll find another way.

  • Pode I initially overlooked this plugin, because I had no idea it could load images from URLs directly too

    This could be the ultimate solution to the eternal cross domain images problem, but...

    Mulkaccino : it doesn't work with WebGL for the moment (as a lot of behaviors/plugins here) because I don't know how to force C2 to load an image as a WebGL texture after the framework was loaded...

    Any chance this may have changed in the meantime?

    Edit: Btw your DIV plugin in the html pack seems to work with webgl, and loads cross domain just fine with <img> innerHtml

    But I need to use all the sprite properties, so a cross domain image loading behavior would be the best if it can work with webgl

  • This and WebGl

    Would be gold for my app!

    So please Pode when u get the magic done, please notify me <img src="smileys/smiley20.gif" border="0" align="middle" />

  • I get javascript error when using the plugin.

    copied the folder to the plugins folder

    restart construct 2

    add object to object explorer

    add object to layout

    add event

    Run > js error

  • I get javascript error when using the plugin.

    copied the folder to the plugins folder

    restart construct 2

    add object to object explorer

    add object to layout

    add event

    Run > js error

    I think the "Load from URL"action from the sprite object will work the same way

  • I was having a problem where you would inject the image and then it wouldnt update until you went to a different layout and came back....

    I just spent about 3 days trying to figure this shit out!!!

    Apparently you have to disable WebGL for this plugin to work... now i guess i have to take a performance hit for this

    ;/

  • I was having a problem where you would inject the image and then it wouldnt update until you went to a different layout and came back....

    I just spent about 3 days trying to figure this shit out!!!

    Apparently you have to disable WebGL for this plugin to work... now i guess i have to take a performance hit for this

    ;/

    you can use the sprite load from url option. put the base64 string in as the url, and you are done

  • I've been trying to paste a url image into a sprite for over a month. Having not found a way, I used the HTML_Div_Pode plugin to load url images. The problem is that it must be on top of all other objects.

    Today I realized that turning webgl off finally makes it work!

    [quote:3olyr2a2]you can use the sprite load from url option. put the base64 string in as the url, and you are done

    Can you provide a sample capx file?

  • hmott I do not have one handle, but its pretty easy:

    simply select the sprite you want

    use load from URL

    enter the BASE64 string as the URL

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Pode can you re-upload the plugin? Or anyone does have it?

  • Pode's addons can be downloaded from his repository:

    github.com/Pseudopode/construct2_plugins_behaviors

  • Pode's addons can be downloaded from his repository:

    https://github.com/Pseudopode/construct2_plugins_behaviors

    The post above his tells you how to use base64 without the plug.

  • newt Yeah, but is there a similarly easy way to extract Base64 from image, without plugins?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)