Centering HTML Games

This forum is meant for requesting technical support or reporting bugs.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Centering HTML Games

Postby Kyrano » Fri Aug 20, 2010 6:04 pm

I love the ability to produce an online html game with AM but have had no success in centering the game on the screen or embedding in a web page. Have tried using a wysiwyg web site builder to insert the entire game in a html box but the game always runs on the left side of the screen. Am currently using Web Easy 8 Pro for the experiments.
Has anybody got any tips or suggestions or a few lines of html code that will do the trick? :)
Kyrano
New Member
 
Posts: 2
Joined: Fri Aug 20, 2010 5:49 pm

Postby time-killer-games » Sat Mar 05, 2011 7:15 pm

Here's an example of how to do it. I have a zip attatched. rename your 'index.html' to 'index2.html'. Then make a new index.html with the following code...

Code: Select all
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<CENTER>
<BODY>
<OBJECT ID="WebBrowser1" WIDTH=661 HEIGHT=484
 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" CODEBASE="shdocvw.dll">
    <PARAM NAME="ExtentX" VALUE="7938">
    <PARAM NAME="ExtentY" VALUE="3969">
    <PARAM NAME="ViewMode" VALUE="0">
    <PARAM NAME="Offline" VALUE="0">
    <PARAM NAME="Silent" VALUE="0">
    <PARAM NAME="RegisterAsBrowser" VALUE="0">
    <PARAM NAME="RegisterAsDropTarget" VALUE="1">
    <PARAM NAME="AutoArrange" VALUE="0">
    <PARAM NAME="NoClientEdge" VALUE="0">
    <PARAM NAME="AlignLeft" VALUE="0">
    <PARAM NAME="NoWebView" VALUE="0">
    <PARAM NAME="HideFileNames" VALUE="0">
    <PARAM NAME="SingleClick" VALUE="0">
    <PARAM NAME="SingleSelection" VALUE="0">
    <PARAM NAME="NoFolders" VALUE="0">
    <PARAM NAME="Transparent" VALUE="0">
    <PARAM NAME="ViewID" VALUE="{0057D0E0-3573-11CF-AE69-08002B2E1262}">
    <PARAM NAME="Location" VALUE="http://members.cox.net/time-killer-games/index2.html">
</OBJECT>
</BODY>
</CENTER>
</HTML>


edit the location parameter to be the absolute path of your index2.html Also you may want to edit the height and width in the object tag so that it'll set your game container as the right size.
Attachments
example.zip
(595.42 KiB) Downloaded 397 times
User avatar
time-killer-games
Expert Member
 
Posts: 400
Joined: Fri Dec 24, 2010 6:10 pm
Location: Virginia Beach, VA

Postby reneuend » Sat Mar 05, 2011 10:23 pm

It looks good time killer, my only suggestion would be to replace <CENTER> </CENTER> with <DIV Align="Center"> </DIV>. The <center> tag has been deprecated for some time now and may not be supported by all browsers. Also the <DIV> and <CENTER> tags should be inside the <BODY> tag.

<BODY>
<DIV Align="Center">

........

</DIV>
</BODY>
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Well done!!

Postby Kyrano » Sun Jun 12, 2011 7:45 pm

I finally made it back. So there is a solution. Many thanks time killer, have downloaded your code and will do some experimenting.


:D
Kyrano
New Member
 
Posts: 2
Joined: Fri Aug 20, 2010 5:49 pm


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron