Be a Supporter!

If you know answer your a genius!

  • 464 Views
  • 14 Replies
New Topic Respond to this Topic
Hero101
Hero101
  • Member since: Dec. 13, 2005
  • Offline.
Forum Stats
Supporter
Level 22
Game Developer
If you know answer your a genius! 2008-04-24 23:55:56 Reply

Not sure if I should ask it here or the programming/scripting forum but oh well.

You know how when you go File > Publish Preview > Defaul (Html) it shows your animation in a new web browser and it displays it in the upper left hand corner of the page. Is there a way to make it appear in the center of the web page?

Not that it really matters, it just bugs me that it's in the top left >_< and I'm curious if such a thing is even possible.

Thanks guys!


BBS Signature
Onion-fusioN
Onion-fusioN
  • Member since: Jan. 10, 2006
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to If you know answer your a genius! 2008-04-25 02:19:27 Reply

It is possible! Open the published HTML file in notepad/wordpad, find the long line of code which embeds the swf, which looks like this:

<param name="movie" value="ff.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="ff.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="ff" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"/>

and above it copy these 3 lines:

<table width="100%" border=0 height=100%>
<tr>
<td valign="middle" align="center">

AND AT THE END OF THE HTML CODE where it says
</object>
</body>
</html>

copy this:

</td>
</tr>
</table>


Know Your Onion!

Hero101
Hero101
  • Member since: Dec. 13, 2005
  • Offline.
Forum Stats
Supporter
Level 22
Game Developer
Response to If you know answer your a genius! 2008-04-25 02:26:39 Reply

Wow you're a fucking genius! Thanks a lot dude!


BBS Signature
Hoeloe
Hoeloe
  • Member since: Apr. 29, 2004
  • Offline.
Forum Stats
Member
Level 37
Game Developer
Response to If you know answer your a genius! 2008-04-25 02:48:21 Reply

At 4/25/08 02:26 AM, Hero101 wrote: Wow you're a fucking genius!

Not really, you just need to know basic HTML...


Song of the Firefly is on Steam Greenlight and Kickstarter. Give them a look and support the project!
------------------------------

BBS Signature
TheTriangle
TheTriangle
  • Member since: Sep. 8, 2007
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to If you know answer your a genius! 2008-04-25 03:35:07 Reply

At 4/25/08 02:48 AM, Hoeloe wrote:
At 4/25/08 02:26 AM, Hero101 wrote: Wow you're a fucking genius!
Not really, you just need to know basic HTML...

Shut up.


-------------------------------

Cojones893
Cojones893
  • Member since: Mar. 9, 2003
  • Offline.
Forum Stats
Member
Level 22
Blank Slate
Response to If you know answer your a genius! 2008-04-25 08:26:56 Reply

If I'm super lazy and want to center my swf file I use.

<center>
SWF CODE
</center>

Onion-fusioN
Onion-fusioN
  • Member since: Jan. 10, 2006
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to If you know answer your a genius! 2008-04-25 08:41:53 Reply

At 4/25/08 08:26 AM, Cojones893 wrote: If I'm super lazy and want to center my swf file I use.

<center>
SWF CODE
</center>

Didn't work for me :3
tried it first


Know Your Onion!

GuyWithHisComp
GuyWithHisComp
  • Member since: Nov. 10, 2005
  • Offline.
Forum Stats
Member
Level 28
Blank Slate
Response to If you know answer your a genius! 2008-04-25 08:53:09 Reply

At 4/25/08 02:19 AM, Onion-fusioN wrote: AND AT THE END OF THE HTML CODE where it says
</object>
</body>
</html>

copy this:

</td>
</tr>
</table>

HAHA! It's obvious that you don't know html well because you should NEVER put html after the /body /html tags. :P And using tables is ugly bad for anyone who knows their css.

Sorry for laughing...

Anyway, to the original poster, you should put this before your flash embed html:

<div style='width: 100%; text-align: center;'>

and this after your flash embed html:

</div>

(I hope NG doesn't mess up the html...)


BBS Signature
KaynSlamdyke
KaynSlamdyke
  • Member since: Jun. 25, 2004
  • Offline.
Forum Stats
Member
Level 16
Melancholy
Response to If you know answer your a genius! 2008-04-25 09:08:03 Reply

At 4/25/08 08:53 AM, GuyWithHisComp wrote: Anyway, to the original poster, you should put this before your flash embed html:
<div style='width: 100%; text-align: center;'>

Inline styles? Neanderthal.

<3

...

BBS Signature
GuyWithHisComp
GuyWithHisComp
  • Member since: Nov. 10, 2005
  • Offline.
Forum Stats
Member
Level 28
Blank Slate
Response to If you know answer your a genius! 2008-04-25 09:35:28 Reply

At 4/25/08 09:08 AM, KaynSlamdyke wrote:
At 4/25/08 08:53 AM, GuyWithHisComp wrote: Anyway, to the original poster, you should put this before your flash embed html:
<div style='width: 100%; text-align: center;'>
Inline styles? Neanderthal.
<3

Lol. Yeah, I didn't want to mess his head up by putting css in the header. I normally don't use inline styling. :P

It beats tables anytime, though.


BBS Signature
Assios
Assios
  • Member since: Nov. 10, 2007
  • Offline.
Forum Stats
Member
Level 26
Programmer
Response to If you know answer your a genius! 2008-04-25 09:57:15 Reply

At 4/25/08 08:26 AM, Cojones893 wrote: If I'm super lazy and want to center my swf file I use.

<center>
SWF CODE
</center>

No, that doesn't work.. You have to do it like Onion Fusion:

<td valign="middle" align="center">

GuyWithHisComp
GuyWithHisComp
  • Member since: Nov. 10, 2005
  • Offline.
Forum Stats
Member
Level 28
Blank Slate
Response to If you know answer your a genius! 2008-04-25 10:02:54 Reply

At 4/25/08 09:57 AM, GlowingMonkey wrote: <td valign="middle" align="center">

Gah, stop using tables! Seriously!


BBS Signature
ShirkDeio
ShirkDeio
  • Member since: Mar. 29, 2007
  • Offline.
Forum Stats
Member
Level 16
Programmer
Response to If you know answer your a genius! 2008-04-25 10:23:24 Reply

At 4/25/08 09:57 AM, GlowingMonkey wrote:
At 4/25/08 08:26 AM, Cojones893 wrote: If I'm super lazy and want to center my swf file I use.

<center>
SWF CODE
</center>
No, that doesn't work.. You have to do it like Onion Fusion:

<td valign="middle" align="center">

It depends on your browser. I used <center> for a long time until I started using Safari instead of IE7. Now I use CSS styles. I don't recommend <center>, but it does work for IE users (at least in IE7 it worked for me).


I am a servant of the Most High God
The Hanging Collab || The Legend of Newgrounds (Game) || Crystal Rays (Song)

Hero101
Hero101
  • Member since: Dec. 13, 2005
  • Offline.
Forum Stats
Supporter
Level 22
Game Developer
Response to If you know answer your a genius! 2008-04-28 22:41:01 Reply

Wooooooowww........ I've never had so many replies to a Flash related question on here before!

Thanks a lot guys!!!


BBS Signature
xWELSHxDRAGONx
xWELSHxDRAGONx
  • Member since: Apr. 13, 2006
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
Response to If you know answer your a genius! 2008-04-28 23:23:15 Reply

At 4/28/08 10:41 PM, Hero101 wrote: Wooooooowww........ I've never had so many replies to a Flash related question on here before!

Thanks a lot guys!!!

You stroked thier e-peen with your title.... what can i say.