Home Tutorials Download Beta Store Forum Documentation KnowledgeBase Wiki Blog

ShiVa3D

Return to Adobe Flash 11

Full Screen Mode

Alternative to ShiVa's Web Player

Full Screen Mode

Postby Oby » 17 Aug 2012, 11:21

Hi,

I've discovered the UAT Flash export recently and I'm wondering if it's currently possible to get the game exported in full screen mode (i.e., change the screen mode during the game, by pressing a key or clicking a button).

I saw no options concerning this in the UAT so I managed to resolve the problem by myself :
- call "system.callClientFunction ( "onEngineEvent" )" when a special button is clicked.
- export the outcome stk with UAT, selecting "Authoring Type" : Project
- edit the Main.as file, adding simply "stage.displayState = StageDisplayState.FULL_SCREEN;" in the onEngineEvent handler
- launch the .bat to get swf files (obviously)
- azoth the main swf

Unfortunatly, it doesn't work. Moreover, the code which is after "callClientFunction" isn't even processed.

Could anyone tell me, firstly if what I'm trying to do is possible, and secondly if that is, where am I doing wrong ?

Thank you :) (and sorry for my speak broken English)
Oby
Fresh Boarder
Fresh Boarder
 
Posts: 19

Re: Full Screen Mode

Postby broozar » 19 Aug 2012, 22:48

hey,

when trying to access flash functionality with an html/js button, you should think about a callback:
http://www.shivaengine.com/developer/2157-shiva-flash-javascript-to-as3-to-shiva
but it seems to me that you want to have a ShiVa full-screen button instead of an html one? so in that case, syste.callClientFunction is the right choice. you still will need more than one parameter though, what about "system.callClientFunction ( "onEngineEvent", "screenmode", "full" )"?
then, the parameter getting (arguments in pairs) thing might be a little confusing at first: http://www.shivaengine.com/developer/2087-shiva-flash-actionscript-3-interaction

try putting "stage.displayState = StageDisplayState.FULL_SCREEN;" in its own public function.

that said, i have not been able to make it work myself yet, the code is sound but it does not switch to full screen. i will keep investigating.

PS: if the code after onClientEvent is not processed, there's probably a mistake in that call. really try with at least one more argument.
User avatar
broozar
Platinum Boarder
Platinum Boarder
 
Posts: 3514
Location: Berlin - Germany

Re: Full Screen Mode

Postby Oby » 20 Aug 2012, 08:37

Hello,

Thank you for your answer :)

Indeed, what I want is a Shiva button.

I'll try what you suggest (2 arguments and a separated public function) and keep you informed. Unfortunately, I'll not be able to test it before a few days, so don't worry if I don't reply quickly : what you said didn't fall on deaf ears : )

I'll give news asap
Oby
Fresh Boarder
Fresh Boarder
 
Posts: 19


Return to Adobe Flash 11

cron