"cr_" instead of "cr." in index.html breaks export

Bugs will be moved here once resolved.

Post » Sat Apr 20, 2013 4:20 pm

I include a solution

Link to .capx file (required!):
http://apagada.com/varios/jigsawpuzzle/puzzle_approach_3.capx
(any other capx would work)

Steps to reproduce:
1. export file. Minified or unminified script.
2. try to run it

Observed result:

black screen in browser it does not run. "cr_createruntime" not found

Solution:

Manually search and replace "cr_" for "cr." in index.html.

Expected result:


Browsers affected:
ALL

Operating system & service pack:

Construct 2 version:
    r126
B
39
S
11
G
5
Posts: 132
Reputation: 8,228

Post » Sat Apr 20, 2013 4:24 pm

Please notice this applies to Chrome export also, and maybe to other exporters (I've tried node export and that does not work for me, but I can't see debug messages).
B
39
S
11
G
5
Posts: 132
Reputation: 8,228

Post » Sat Apr 20, 2013 4:25 pm

Can't reproduce, every project works fine for me. cr_createRuntime is defined in c2runtime.js so no change is necessary. Please read the bug submission guidelines (don't submit .capx files using third party plugins - yours uses Canvas)Ashley2013-04-20 16:26:01
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Sat Apr 20, 2013 11:58 pm

OK, I've searched again my sources and I found a definition of window["cr_getC2runtime"]. I guess something in the plugin stop that line from being interpreted. I wonder why the substitution of cr_ for cr. in the source made my project work, not only as standard html5 but as chrome extension, too.

I have checked with another project I had exported in the past and it seems to work with just 4 typeset exceptions, so the wrong part should be in the plugin. In the new project, I see no functions defined as "cr.getC2runtime", so I guess they do nothing and return null. How could my hand-edited project work?

I used many nested "Pick all" conditions. Could it mix something?


Just in case you want to compare how they run, here they are:

1) my "Jigsaw Puzzle", as originally compiled: http://www.apagada.com/varios/jigsawpuzzle/index2.html

2) my "Jigsaw Puzzle", cr_ substituted by cr. http://www.apagada.com/varios/jigsawpuzzle/index.html

I just tested both and now both of them run. I wonder how or why.arcalaus2013-04-21 00:11:21
B
39
S
11
G
5
Posts: 132
Reputation: 8,228


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests