How do I include a project file

Just started using Construct 2? Post your questions here

Post » Fri Sep 30, 2016 6:48 pm

I've got a .pptx file in my project bar and a button in the activity itself I want the user to be able to click and have the .pptx open. I've got the AJAX function to request the .pptx, but I can't figure out how to get it to open in a different window. Is there a specific line(s) of code I need to use?
B
6
S
1
Posts: 16
Reputation: 384

Post » Fri Sep 30, 2016 7:07 pm

You can go with the NW.js object, and add the "Run file" action.
Though that would mean that you would have to:
1) export the project as an NW.js application
2) store the .pptx file on a temporary local location to be able to run it via the NW.js action
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091

Post » Fri Sep 30, 2016 8:54 pm

Export the ppt file as images and display them as a c2 sprite.
A big fan of JavaScript.
B
74
S
20
G
71
Posts: 2,229
Reputation: 44,890

Post » Sat Oct 01, 2016 1:16 am

I was hoping it the powerpoint (or I could convert it to a PDF it'd be easier) would open in a new window/tab. Is this possible with an AJAX or local storage object? Or something they can open on their desktop. If it isn't doable I'm sure I could have the files for them to download on my webpage and it wouldn't be the end of the world. Just for flow and appearance's sake I want them to open directly from the activity so they're not clicking back and forth.
B
6
S
1
Posts: 16
Reputation: 384

Post » Sat Oct 01, 2016 7:39 am

Image

Browser : Open URL in new window

Image

EDIT> for PPTX file

Displaying files on your site

pptxFileTest.capx

you can also check

[PLUGIN] iFrame & InsertHTML
&
[Plugins] Pode HTML Pack
B
66
S
24
G
7
Posts: 1,514
Reputation: 11,039


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests