[Solved]Encode string with base64

Get help using Construct 2

Post » Sun Jun 02, 2013 11:58 am

Hello everybody,

I want to encode a string using base64

like base64_encode() in php.

But after few days of searhing, I don't found the solution.

Thanx in advance for your help TheMax980002013-08-10 07:50:31
B
4
Posts: 24
Reputation: 240

Post » Fri Aug 09, 2013 11:30 am

Up please, i need it :/

P.S: Please don't tell me to use Ajax GET/POST to encode my string using PHP.
I very need to encode directly in Construct 2.
B
4
Posts: 24
Reputation: 240

Post » Fri Aug 09, 2013 4:26 pm

With the Browser object and the javascript btoa() function:
base64encode.capx (r140)






I'm pretty sure there's a 3rd party plugin that does it as well.
B
55
S
28
G
18
Posts: 1,520
Reputation: 25,305

Post » Sat Aug 10, 2013 7:49 am

Thanx man :D
B
4
Posts: 24
Reputation: 240

Post » Tue Sep 03, 2013 5:45 pm

Does this work from an iPhone?

this is what i get

TypeError: 'undefined' is not a function (evaluating 'window.btoa(

ypeError: 'undefined' is not a function (evaluating 'btoa(


where is the btoa object? how do i access this from? Don't understand why it works in C2 and chrome but iPhone spits out the i don't know this object error
B
7
S
2
G
1
Posts: 24
Reputation: 1,277

Post » Tue Sep 03, 2013 6:41 pm

@darkstar It depends on the browser. Are you using CocoonJS? It might not be supported...
B
55
S
28
G
18
Posts: 1,520
Reputation: 25,305

Post » Wed Sep 04, 2013 5:59 pm

Wrote a plugin to extend the functionality to a expression that could be evaluated and return.

This ended up being the least painful way to do this. I was using Cocoon, but have just recoded everything around Ejecta.
B
7
S
2
G
1
Posts: 24
Reputation: 1,277


Return to How do I....?

Who is online

Users browsing this forum: Congrats2u, Iftikhar555, smlyldz and 12 guests