Is possible to load external HTML5 canvas?

Get help using Construct 2

Post » Fri May 25, 2012 4:49 am

There a 2 types of canvas are:

1- The Game: It's typical C2 canvas. It doesn't require to update the game, also it can be played on offline.

2- The Updated Random Content: like news, ads, extras, bonus, etc. that can be changed content while is connecting the internet, otherwise if there no internet connected, it will be ignored.


When you play as platformer, when you enter next layout or a store building, then it starts to download an external HTML5 canvas, it may be an pop up window or inside of The Game canvas.

Is that possible?
B
95
S
25
G
20
Posts: 3,052
Reputation: 22,613

Post » Fri May 25, 2012 5:14 am

I don't know of a way to include another html5 canvas.

But for what you described why couldn't you use the Ajax object, to tell the game what ad to display, news, and so on.

For ads (depending on the type) you could load them into a sprite object as animations (for multiple ads) (One frame per animation, unless animated) then you'd have the ajax get an id or name for the ad to display, and what page it would link too. Then you would just need an event to display the information when you wanted it to.

News would be the same way, just use the Ajax object to get the text from a webpage (php or asp) and set the data to display inside a text area.

B
6
G
1
Posts: 23
Reputation: 921

Post » Fri May 25, 2012 7:13 am

@Sandcrawler, thanks for reply, according your idea... i never used Ajax object over the canvas, but i'm going to make one and i will upload them on my shared hosting server.
B
95
S
25
G
20
Posts: 3,052
Reputation: 22,613


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 16 guests