[Behavior] Inject base64 string as Sprite Image Forum Home > Construct 2 Development > Plugins for Construct 2 |
Post Reply
|
Page 123 4> |
| Author | |
Post Options
Quote Reply
Topic: [Behavior] Inject base64 string as Sprite ImagePosted: 28 Mar 2012 at 1:41pm |
|
|
New build : You can now specify the width/height of the container when loading the image. The refresh should also work better. The demo is updated !
Plugin : http://dl.dropbox.com/u/1412774/InjectImage/pode_injectImage.0.2.zip .capx : http://dl.dropbox.com/u/1412774/InjectImage/InjectImage.0.2.capx Edit : added this info : you can also directly inject the URL of an image, instead of a base64 string ! Since you can extract current Image (http://www.scirra.com/forum/behavior-extract-sprite-to-base64-string_topic50577.html), why not inject Image ? ![]() ![]() http://dl.dropbox.com/u/1412774/InjectImage/index.html For the moment, you can inject base64 string, and it's going to replace the current Sprite image's texture. .capx : http://dl.dropbox.com/u/1412774/InjectImage/InjectImage.capx Plugin : http://dl.dropbox.com/u/1412774/InjectImage/pode_injectImage.0.1.zip BEWARE !! The collision polygon used is stilll the one from the first Sprite ! So for the moment, if you use collisions, and want that everything goes smooth, keep injecting images of roughly the same shape ! If you don't use collisions, you don't care about that anyway ![]() I'm going to provide a way to specify a new polygon in a new release... Edited by Pode - 16 Apr 2012 at 2:06pm |
|
![]() |
|
Post Options
Quote Reply
Posted: 28 Mar 2012 at 4:01pm |
|
|
Very cool. Now it's propable possible to save and load images in simple textfiles..
|
|
![]() |
|
Post Options
Quote Reply
Posted: 28 Mar 2012 at 4:59pm |
|
|
There ya go, encapsulation. Ha ha, take that flash!
Just need a way to do that with sound, which I think is in the works. Might see if @Ashley could add a way to change the poly from the ide tho... |
|
![]() |
|
Post Options
Quote Reply
Posted: 29 Mar 2012 at 9:51pm |
|
|
@Poda thanks for pointing me to this plugin, it does what i need!!
Edited by Lord - 30 Mar 2012 at 1:32am |
|
![]() |
|
Post Options
Quote Reply
Posted: 01 Apr 2012 at 9:22am |
|
|
Unable to load plugin in XXX: Found 'GetPluginSettings' global, but it is not a function.
This plugin will not be available in the editor. EDIT: Disregard my ignorance.. I leave this in case somebody has the same problem. This is a Behavior not a plugin, so it goes in the behaviors folder! Edited by 0plus1 - 01 Apr 2012 at 9:27am |
|
![]() |
|
Post Options
Quote Reply
Posted: 04 Apr 2012 at 10:05am |
|
|
I would like to say that this is the single most useful plugin for c2.
The way Pode handled this is pure genius and simply works. If you have a large application, especially for mobile this can turn c2 into a professional tool because it adds resource managment. I offered a reward to Pode because it saved my project that I was about to throw away and convert to another framework, he's such a nice guy that he didn't accept anything. Seriously guys this tools is a lifesaver, until Ashley write some sort of resource managment if you are developing for mobile this tools is compulsory for large projects and can drastically increase fps in slower phones. Kudos! |
|
![]() |
|
Post Options
Quote Reply
Posted: 08 Apr 2012 at 8:52pm |
|
|
@Pode could you take a look at this ?
http://www.scirra.com/forum/base64-bugs_topic50978.html |
|
![]() |
|
Post Options
Quote Reply
Posted: 09 Apr 2012 at 9:04am |
|
|
@Wishy : I answered your post, and added the info to the original post of this thread.
|
|
![]() |
|
Post Options
Quote Reply
Posted: 09 Apr 2012 at 12:37pm |
|
|
Awesome man, thnx for the help !!!
|
|
![]() |
|
Post Options
Quote Reply
Posted: 10 Apr 2012 at 1:50am |
|
|
Hi Pode,
When you get a moment, can you give an example capx of how to inject the URL of an image? |
|
![]() |
|
Post Reply
|
Page 123 4> |
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |