How do I get value from c2 project's v on an html web page

Get help using Construct 2

Post » Mon Dec 19, 2016 1:33 pm

Hello everybody. I am making a project of an online tv for android where I use iFrame with a flash player on my hosting. I got everything ready, but player which I use (uppod) ask me to put manualy aspect ratio " <param name="flashvars" value="file=http://...&aspect=1.7" />" in a page code. So what I dream to do is to get OriginalWindowWidth & OriginalWindowHeight and put them in var A & Var B, then A/B = Var C and give to page &aspect="C"
Have anybody idea how to? Thanks for your time.
---------------------------

Here is full page code

<object id="videoplayer299" type="application/x-shockwave-flash" data="http://supremetvbox.byethost4.com/uppod-hls.swf" width="500" height="375"><param name="bgcolor" value="#ffffff" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="wmode" value="direct" /><param name="movie" value="http://supremetvbox.byethost4.com/uppod-hls.swf" /><param name="flashvars" value="comment=Россия 1&amp;m=video&amp;file=http://testlivestream.rfn.ru/live/smil:r1.smil/chunklist_b1600000.m3u8&aspect=1.7" /></object>
B
9
S
1
Posts: 65
Reputation: 861

Post » Mon Dec 19, 2016 4:13 pm

Are you trying to output some data from the C2 game and use that in the webpage's code? If so, I'd recommend using LocalStorage to store the value from the game and load it with custom JS in the webpage.
B
135
S
33
G
17
Posts: 1,558
Reputation: 20,723

Post » Mon Dec 19, 2016 4:45 pm

I dont know js at all. C2 is loading that page in iFrame. I would like to give to loaded page a variable from c2, or just find a way to set in html current monitor resolution
B
9
S
1
Posts: 65
Reputation: 861

Post » Tue Dec 20, 2016 9:34 am

Then you'll have to use JS. Like that one example: http://stackoverflow.com/questions/2242 ... javascript
B
135
S
33
G
17
Posts: 1,558
Reputation: 20,723


Return to How do I....?

Who is online

Users browsing this forum: Artcadev and 44 guests