Help - Search - Members - Calendar
Full Version: Putting game code in div
Forums > Resource Center > Support Center > MySpace Support > Myspace Resolved Topics
madgamer
How do I put a game code in div such as this one ?


QUOTE
<br /><div><embed src="http://www.myspace-games.com/games/urinalgame.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="350" height="300"></embed></div><a href="http://www.myspace-games.com" title="Free Games for your MySpace profile." target="_blank"><b>Get your own Free MySpace Games</b></a></div><br /><br />
miiichellley
http://www.createblog.com/scripts/download.php?id=91

Try using that. put the game code where it says to put the text.
madgamer
I tried, doesnt work. The game doesnt show up .
freeflow
Use a regular div code except take out anything in your codes that looks like this:
embed{ blah blah blah}
madgamer
I checked the code theres no embed I know for sure also because my music player shows up. When I just put the code the game shows up but when I put it in a div it doesnt =S. Do you know what else I can do to.
freeflow
Post your codes.
madgamer
Heres the code in my aboutme section

QUOTE
<style type="text/css">
table table,table table table table,table table{background-color:transparent;width:;border:0px;}
div,table,tr,td,th{background-color:transparent;text-align:left;border:0px;}
a.navbar,font,.whitetext12,.btext,.orangetext15,.redbtext,.redtext,.blacktext12,
lightbluetext8,strong,.nametext,div b font font, div font font u,table table table table, table.contacttable{display:none;}
div table form tr td,td.text table,a.text, table div font a,table div div,{visibility:hidden;di-splay:none}
td.text table table {display:inline; visibility:visible;}
.comments{visibility:visible;width:450px; height: 400px;position:absolute;top:120px;left:0px;
overflow:auto;background-color:COLORHERE;
border:9B7E92;z-index:2px;}
</style><style>
{sets the default style for the body, table data, list data, divisions and text areas}
{ body, well you know what that is}
{ div, p, and xmp are classes}
{ table, tr, td, and th are table properties}
body,div,p,xmp,table,tr,td,th{
background-color:9B7E92;
scrollbar-arrow-color:9B7E92;
scrollbar-track-color:9B7E92;
scrollbar-shadow-color:9B7E92;
scrollbar-face-color:815A74;
scrollbar-highlight-color:9B7E92;
scrollbar-darkshadow-color:9B7E92;
scrollbar-3dlight-color:9B7E92;
font-family:georgia;
font-size:8pt;
color:64334D;
border:none;}

input, select, textarea, .textfield, .button {
font-family:georgia;
font-size:8pt;
color:FFFFFF;
border: 1px dashed 64334D;
background-color:transparent;
text-align:center;}

{ TEXT DEFAULTS }
{class for the basic font for the page}
.text {
font-family:georgia; font-size:8pt; line-height:10pt; color:64334D;text-align:justify;}

b,i,strong,em,u,s {
font-family:georgia; font-size:8pt;color:7F5973;font-weight:none;cursor:none;}

{style for the number of friends you have.}
.redbtext{font-family:georgia; font-size:8pt; line-height:10pt; color:64334D;border:0px solid 7F5973; }

{repeat of the style for how many comments you have}
.redbtext{font-family:georgia; font-size:8pt; line-height:10pt; color:64334D; border:0px solid 7F5973;}

{"Blurbs", "About Me", "Who I’d like to Meet", "Friend Space", and "Friend’s Comments" style}
.orangetext15{font-family:georgia; text-transform:uppercase; font-size:11px; color:FFFF00; font-weight:none;background:000000; border:0px solid FFFFFF;text-decoration:underline;}

{"General", "Music", "Movies", "Television", "Books", "Heros", "Status", "Here for", "Hometown", "Body Type", "Ethnicity", "Religion", "Sign", "Smoke/Drink", "Children", "Education", "Occupation", and "Income" title style}
.lightbluetext8{font-family:geogria; text-transform:uppercase; font-size:11px; color:FFFF00; font-weight:none;background:000000;border:0px solid FFFFFF;text-align:right;}

{"In your extended network" style}
.blacktext12{font-family:georgia; font-size:16px; color:FFFF00; font-weight:none;text-decoration: underline; text-transform:uppercase;}

{"Contacting", "Interests", "Details", and "Schools" title styling}
.whitetext12{font-family:georgia; font-size:16px; color:64334D; font-weight:none;text-decoration: underline; border:0px solid 64334D; text-transform:uppercase;}

{Stylizing of your name above your picture; appears you can’t change the color of your name from here. Suggestions?}
.nametext{font-family:georgia; font-size:16px; color:
64334D; font-weight:none;text-decoration:underline;border:none;text-transform:uppercase;}

{This is how all anchor points will be displayed; anchor points appear before all links.}
a, a:link,a:active,a:visited{font-family:georgia; font-size:8pt; line-height:10pt; color:7F5973;text-decoration:none}
a:hover{border-bottom:1px dashed 64334D; font-family:tahoma; font-size:8pt; line-height:10pt; color:7F5973;}

{not used on profile}
a.readmail,a.readmail:link,a.readmail:active,a.readmail:visited{font-family:tahoma; font-size:8pt; line-height:10pt; text-decoration:none;color: 64334D;}
a.readmail:hover{font-family:georgia; font-size:8pt; line-height:10pt; color:FFFF00;border-bottom:1px dashed 7F5973; }

{ "View all friends" and "invite more" link style}
a.redlink,a.redlink:link,a.redlink:active,a.redlink:visited{font-family:georgia; font-size:8pt;font-weight:none;color:363532;text-decoration:none}
a.redlink:hover{font-family:tahoma; font-size:8pt; line-height:10pt; color:363532 ;border-bottom:1px dashed 363532;}

{2 links in very top on the left, and the 13 links above your picture with make the navigation bar}
a.navbar,a.navbar:link,a.navbar:active,a.navbar:visited{font-family:363532; font-size:8pt;color:363532;text-decoration:none}
a.navbar:hover{font-family:tahoma; font-size:8pt; line-height:10pt; color:7F5973; border-bottom:1px dashed
64334D;}

{ TEXT FORMATTING
DEFAULT FONT, SIZE 8, BLACK }
{ btext used for "latest blog entry" and "USERNAME has * friends"}
.btext, .itext{font-family:tahoma; font-size:8pt; line-height:10pt; color:64334D;border:0px solid 64334D;}

{ DEFAULT FONT, SIZE 8, COLORS }
{unused on profile}
.bwtext, .rtext, .rbtext, .subhead{font-family:tahoma; color:
64334D;font-size:8pt;font-weight:none;}

{ DEFAULT FONT, SIZE 8 }
{unused on profile}
.stext, .sbtext, .swtext{font-family:tahoma; color:
64334D;font-size:8pt;}

{ DEFAULT FONT, SIZE 11 }
{unused on profile}
.head11, .text11{font-family:tahoma; color:64334D;font-size:8pt;}

{ TABLE COLORS }
{apparently unused?}
table.grey, tr.grey, td.grey{font-family:tahoma;
font-size:8pt;background:transparent;border:0px solid 64334D;}
table.white, tr.white, td.white{font-family:tahoma;
font-size:8pt;background:transparent;border:0px solid 7F5973;}
table.accent_light, tr.accent_light,
td.accent_light{font-family:tahoma;
font-size:8pt;background:transparent;border:0px solid 7F5973;}
table.accent_dark, tr.accent_dark,
td.accent_dark{font-family:tahoma;
font-size:8pt;background:transparent;border:0px solid 363532;}
table.action, tr.action, td.action{font-family:tahoma;
font-size:8pt;background:transparent;border:0px solid 363532; }
table.blue_light, tr.blue_light,
td.blue_light{font-family:tahoma;
font-size:8pt;background:transparent;border:0px solid 64334D;}
table.blue_dark, tr.blue_dark, td.blue_dark{font-family:tahoma;
font-size:8pt;background:transparent;border:0px solid
7F5973;}


{"Help" and "Signout" in very top in right corner}
a.man,a:link,a:active,a:visited{font-family:tahoma; font-size:8pt;color: 7F5973; text-decoration:none;}
a:hover{font-family:tahoma;
font-size:8pt;color:64334D; text-decoration:none;border-bottom:1px dashed 363532;}
</style>

</div><style type="text/css">
table table,table table table table,table table{background-color:transparent;width:;border:0px;}
div,table,tr,td,th{background-color:transparent;text-align:left;border:0px;}
a.navbar,font,.whitetext12,.btext,.orangetext15,.redbtext,.redtext,.blacktext12,
lightbluetext8,strong,.nametext,div b font font, div font font u,table table table table, table.contacttable{display:none;}
div table form tr td,td.text table,a.text, table div font a,table div div,{visibility:hidden;di-splay:none}
td.text table table {display:inline; visibility:visible;}
.comments{visibility:visible;width:314px; height: 223px;position:absolute;top:238px;left:111px;
overflow:auto;background-color:000000;
border:9B7E92 1px solid;z-index:2px;}
</style><style type="text/css">
td.text td.text table table table,
td.text td.text table br,
td.text td.text table .orangetext15,
td.text td.text .redlink,
td.text td.text span.btext
{display:none;}
td.text td.text table {background-color:transparent;}
td.text td.text table td, td.text td.text table {height:0;padding:0;border:0;}
td.text td.text table table td {padding:3;}
td.text td.text table table br {display:inline;}
td.text td.text table td {font-size:0pt;}
td.text td.text {height:0;}
td.text td.text table b, td.text td.text table table td {font-size:8pt;}
</style><style>td td object {position:absolute; left:1px; top:1px; display:block; width:1px; height:1px;}</style><style>
div table tr td form{display:none;}
</style>
<style>.r{}</style>

<div class="comments"><table><tr><td><table><tr><td>
<style>body div table tbody tr td font {visibility:hidden;}
body div table tbody tr td a font, .navbar {visibility:visible;}</style>
freeflow
When I put it in a div it works just fine. You just need to put it above.

<div class="comments"><table><tr><td><table><tr><td>
<style>body div table tbody tr td font {visibility:hidden;}
body div table tbody tr td a font, .navbar {visibility:visible;}</style>

or just move that part to I'd like to meet where it belongs. And put this at the top of about me:
<style>body div table tbody tr td font {visibility:hidden;}
body div table tbody tr td a font, .navbar {visibility:visible;}</style>

what I used:
CODE
<div class="game" style="position: absolute; left:150px; top:300px; width:100px; height:120px; overflow: hidden;">
<br /><div><embed allowScriptAccess="never" allowNetworking="internal" enableJSURL="false" enableHREF="false" saveEmbedTags="true" src="http://www.myspace-games.com/games/urinalgame.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="350" height="300"></embed></div><a href="http://www.myspace-games.com" title="Free Games for your MySpace profile." target="_blank"><b>Get your own Free MySpace Games</b></a></div><br /><br />
</div>
WHIMSICAL 0NE
From the bottom of the code, find the stuff in red and remove it
QUOTE
<style>td td object {position:absolute; left:1px; top:1px; display:block; width:1px; height:1px;}</style> <style>
div table tr td form{display:none;}
</style>
<style>.r{}</style>

<div class="comments"><table><tr><td><table><tr><td>
<style>body div table tbody tr td font {visibility:hidden;}
body div table tbody tr td a font, .navbar {visibility:visible;}</style>
madgamer
Even if I remove it it doesnt show up and my myspace player shows up which I dont want.I had tried to put <div class="comments"><table><tr><td><table><tr><td>
<style>body div table tbody tr td font {visibility:hidden;}
body div table tbody tr td a font, .navbar {visibility:visible;}</style> at where I like to meet still the div doesnt show up.=/.

Putting <style>body div table tbody tr td font {visibility:hidden;}
body div table tbody tr td a font, .navbar {visibility:visible;}</style> at the top does nothing .

>.<

edit. btw my layout is a div if that will help
freeflow
Post your entire code then. Because doing exactly what I did showed the game. I mean all your divs and everything.


Its odd how it works perfect for me and not you. http://myspace.com/poopietest
madgamer
I just clicked on your myspace it doesnt show up.

Is there something wrong with my comp? =S It only shows your comment

http://img130.imageshack.us/img130/9338/lfo8.png
freeflow
We use different browsers. I'm assuming you use internet explorer? I don't . I use safari.

This works in FF so it should work in IE too.
CODE
<style type="text/css">
table table,table table table table,table table{background-color:transparent;width:;border:0px;}
div,table,tr,td,th{background-color:transparent;text-align:left;border:0px;}
a.navbar,font,.whitetext12,.btext,.orangetext15,.redbtext,.redtext,.blacktext12,
lightbluetext8,strong,.nametext,div b font font, div font font u,table table table table, table.contacttable{display:none;}
div table form tr td,td.text table,a.text, table div font a,table div div,{visibility:hidden;di-splay:none}
td.text table table {display:inline; visibility:visible;}
.comments{visibility:visible;width:500px; height: 400px;position:absolute;top:120px;left:0px; border:black 1px solid;z-index:2px}
</style>
<style type="text/css">
{sets the default style for the body, table data, list data, divisions and text areas}
{ body, well you know what that is}
{ div, p, and xmp are classes}
{ table, tr, td, and th are table properties}
body,div,p,xmp,table,tr,td,th{
background-color:9B7E92;
scrollbar-arrow-color:9B7E92;
scrollbar-track-color:9B7E92;
scrollbar-shadow-color:9B7E92;
scrollbar-face-color:815A74;
scrollbar-highlight-color:9B7E92;
scrollbar-darkshadow-color:9B7E92;
scrollbar-3dlight-color:9B7E92;
font-family:georgia;
font-size:8pt;
color:64334D;
border:none;}

input, select, textarea, .textfield, .button {
font-family:georgia;
font-size:8pt;
color:FFFFFF;
border: 1px dashed 64334D;
background-color:transparent;
text-align:center;}

{ TEXT DEFAULTS }
{class for the basic font for the page}
.text {
font-family:georgia; font-size:8pt; line-height:10pt; color:64334D;text-align:justify;}

b,i,strong,em,u,s {
font-family:georgia; font-size:8pt;color:7F5973;font-weight:none;cursor:none;}

{style for the number of friends you have.}
.redbtext{font-family:georgia; font-size:8pt; line-height:10pt; color:64334D;border:0px solid 7F5973; }

{repeat of the style for how many comments you have}
.redbtext{font-family:georgia; font-size:8pt; line-height:10pt; color:64334D; border:0px solid 7F5973;}

{"Blurbs", "About Me", "Who I’d like to Meet", "Friend Space", and "Friend’s Comments" style}
.orangetext15{font-family:georgia; text-transform:uppercase; font-size:11px; color:FFFF00; font-weight:none;background:000000; border:0px solid FFFFFF;text-decoration:underline;}

{"General", "Music", "Movies", "Television", "Books", "Heros", "Status", "Here for", "Hometown", "Body Type", "Ethnicity", "Religion", "Sign", "Smoke/Drink", "Children", "Education", "Occupation", and "Income" title style}
.lightbluetext8{font-family:geogria; text-transform:uppercase; font-size:11px; color:FFFF00; font-weight:none;background:000000;border:0px solid FFFFFF;text-align:right;}

{"In your extended network" style}
.blacktext12{font-family:georgia; font-size:16px; color:FFFF00; font-weight:none;text-decoration: underline; text-transform:uppercase;}

{"Contacting", "Interests", "Details", and "Schools" title styling}
.whitetext12{font-family:georgia; font-size:16px; color:64334D; font-weight:none;text-decoration: underline; border:0px solid 64334D; text-transform:uppercase;}

{Stylizing of your name above your picture; appears you can’t change the color of your name from here. Suggestions?}
.nametext{font-family:georgia; font-size:16px; color:
64334D; font-weight:none;text-decoration:underline;border:none;text-transform:uppercase;}

{This is how all anchor points will be displayed; anchor points appear before all links.}
a, a:link,a:active,a:visited{font-family:georgia; font-size:8pt; line-height:10pt; color:7F5973;text-decoration:none}
a:hover{border-bottom:1px dashed 64334D; font-family:tahoma; font-size:8pt; line-height:10pt; color:7F5973;}

{not used on profile}
a.readmail,a.readmail:link,a.readmail:active,a.readmail:visited{font-family:tahoma; font-size:8pt; line-height:10pt; text-decoration:none;color: 64334D;}
a.readmail:hover{font-family:georgia; font-size:8pt; line-height:10pt; color:FFFF00;border-bottom:1px dashed 7F5973; }

{ "View all friends" and "invite more" link style}
a.redlink,a.redlink:link,a.redlink:active,a.redlink:visited{font-family:georgia; font-size:8pt;font-weight:none;color:363532;text-decoration:none}
a.redlink:hover{font-family:tahoma; font-size:8pt; line-height:10pt; color:363532;border-bottom:1px dashed 363532;}

{2 links in very top on the left, and the 13 links above your picture with make the navigation bar}
a.navbar,a.navbar:link,a.navbar:active,a.navbar:visited{font-family:363532; font-size:8pt;color:363532;text-decoration:none}
a.navbar:hover{font-family:tahoma; font-size:8pt; line-height:10pt; color:7F5973; border-bottom:1px dashed
64334D;}

{ TEXT FORMATTING
DEFAULT FONT, SIZE 8, BLACK }
{ btext used for "latest blog entry" and "USERNAME has * friends"}
.btext, .itext{font-family:tahoma; font-size:8pt; line-height:10pt; color:64334D;border:0px solid 64334D;}

{ DEFAULT FONT, SIZE 8, COLORS }
{unused on profile}
.bwtext, .rtext, .rbtext, .subhead{font-family:tahoma; color:
64334D;font-size:8pt;font-weight:none;}

{ DEFAULT FONT, SIZE 8 }
{unused on profile}
.stext, .sbtext, .swtext{font-family:tahoma; color:
64334D;font-size:8pt;}

{ DEFAULT FONT, SIZE 11 }
{unused on profile}
.head11, .text11{font-family:tahoma; color:64334D;font-size:8pt;}

{ TABLE COLORS }
{apparently unused?}
table.grey, tr.grey, td.grey{font-family:tahoma;
font-size:8pt;background:transparent;border:0px solid 64334D;}
table.white, tr.white, td.white{font-family:tahoma;
font-size:8pt;background:transparent;border:0px solid 7F5973;}
table.accent_light, tr.accent_light,
td.accent_light{font-family:tahoma;
font-size:8pt;background:transparent;border:0px solid 7F5973;}
table.accent_dark, tr.accent_dark,
td.accent_dark{font-family:tahoma;
font-size:8pt;background:transparent;border:0px solid 363532;}
table.action, tr.action, td.action{font-family:tahoma;
font-size:8pt;background:transparent;border:0px solid 363532; }
table.blue_light, tr.blue_light,
td.blue_light{font-family:tahoma;
font-size:8pt;background:transparent;border:0px solid 64334D;}
table.blue_dark, tr.blue_dark, td.blue_dark{font-family:tahoma;
font-size:8pt;background:transparent;border:0px solid
7F5973;}


{"Help" and "Signout" in very top in right corner}
a.man,a:link,a:active,a:visited{font-family:tahoma; font-size:8pt;color: 7F5973; text-decoration:none;}
a:hover{font-family:tahoma;
font-size:8pt;color:64334D; text-decoration:none;border-bottom:1px dashed 363532;}

td.text td.text table table table,
td.text td.text table br,
td.text td.text table .orangetext15,
td.text td.text .redlink,
td.text td.text span.btext
{display:none;}
td.text td.text table {background-color:transparent;}
td.text td.text table td, td.text td.text table {height:0;padding:0;border:0;}
td.text td.text table table td {padding:3;}
td.text td.text table table br {display:inline;}
td.text td.text table td {font-size:0pt;}
td.text td.text {height:0;}
td.text td.text table b, td.text td.text table table td {font-size:8pt;}
</style>
<div class="game" style="position: absolute; left:150px; top:300px; width:100px; height:120px;">
<embed allowScriptAccess="never" allowNetworking="internal" enableJSURL="false" enableHREF="false" saveEmbedTags="true" src="http://www.myspace-games.com/games/urinalgame.swf"                         quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="350" height="300"></embed></div><a href="http://www.myspace-games.com" title="Free Games for your MySpace profile." target="_blank"><b>Get your own Free MySpace Games</b></a></div>


I'd like to meet:
CODE
<div class="comments"><table><tr><td><table><tr><td>


Just position your comments and the player.
madgamer
Woot the second game code worked. THANKS A LOT TOYA:) your the best<3

Last question, do you know how to make it a scrollbar on there
freeflow
For the game div? Add overflow: auto; . Example:
QUOTE
<div class="game" style="position: absolute; left:150px; top:300px; width:100px; height:120px;overflow:auto;">
<embed allowScriptAccess="never" allowNetworking="internal" enableJSURL="false" enableHREF="false" saveEmbedTags="true" src="http://www.myspace-games.com/games/urinalgame.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="350" height="300"></embed></div><a href="http://www.myspace-games.com" title="Free Games for your MySpace profile." target="_blank"><b>Get your own Free MySpace Games</b></a></div>
madgamer
Scrollbar doesnt show up :S

This is the code I have now that works.

QUOTE
<div class="game" style="position: absolute; left: 89px; top:500px; width:500px; height:390px;">
<embed allowScriptAccess="never" allowNetworking="internal" enableJSURL="false" enableHREF="false" saveEmbedTags="true" src="http://www.myspace-games.com/games/pooljam.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="390"></embed></div>


But when I put overflow a scrollbar doesnt appear.
freeflow
The code should be
CODE
<div class="game" style="position: absolute; left: 89px; top:500px; width:500px; height:390px; overflow: auto;">
<embed allowScriptAccess="never" allowNetworking="internal" enableJSURL="false" enableHREF="false" saveEmbedTags="true" src="http://www.myspace-games.com/games/pooljam.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="390"></embed></div>


Make the height smaller than the height of the player and it should scroll.
madgamer
Doesnt work:(. It just make blank spaces. Like the scrollbar for it doesnt appear.
freeflow
Eh.. You might not be able to then. Overflow auto does it. If it doesn't work its probably because of the game.
madgamer
Ok thanks a lot for all your help.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.