00:00
00:00
Newgrounds Background Image Theme
Upgrade Your Account!

HO HO HOPE you become a Newgrounds Supporter this year!

We're working hard to give you the best site possible, but we have bills to pay and community support is vital to keep things going and growing. Thank you for considering!

Become a Supporter so NG can see another Christmas!

The Flash 'Reg' Lounge

3,084,236 Views | 60,186 Replies
New Topic Respond to this Topic

Response to The Flash 'Reg' Lounge 2014-02-08 05:00:22


At 2/8/14 04:07 AM, kkots wrote:
At 2/7/14 10:03 PM, slugrail wrote: Yes, but if I format the code in FD with my code indent settings it'd be squashed into one line.
Not sure if I understand this. What do you want to say by that? It's my code's fault or your settings are bad?

My point being: use XML, JSON or any human readable, widely know and parsable format. I'm sure you know the use for a programming language is to get human readable, written code and translate it into binary operations for the runtime. Why do you think all these game devs use config files for? You don't write human readable pieces in a file that will be translated into bytes for a machine... you write human readable pieces in a human readable file for humans. There's no reason why you shouldn't be using XML especially when XML is a part of AS3's syntax (I'm not saying you should do what you're doing at current but in XML.. just saying your compiled code should always be separated from config files). And JSON, nobody can forget about JSON, especially not in an ECMA language subset.

3) Is it OK to create anonymous functions like this?
No and no. Integrate what you'll be commonly using into the dialogue system.
No need for callbacks when you set the boundaries yourself.
So you mean that I should instead write large chains of if/else, where I check what phrase is currently displaying and run code depending on what phrase that is?

No I did not say what you're probably thinking of doing. If, for example your callbacks set within "onHide" are going to hide the dialogue box countless times then you've already broken the most important use for OOP languages, to eliminate ______. Your system should meet your needs for a usable dialogue system. If your dialogue system needs to be told what to do once a dialogue has opened/closed then that's a big case of re******cy you've got there *unnecessary censorship* and that's a great example of a flawed system. Your dialogue system needs to have a boundary; if your onShow callback can send a HTTP request to my site, then you're obviously doing something wrong.

If I use JSON, I will then be able to easily read the data using a program, and do operations with it, like overwriting the file with modified version of it? This is interesting, but it requires a dialogue editor, which I can't afford to produce.

JSON.parse(string) seems easy enough for me... and...
what are you trying to say?

Response to The Flash 'Reg' Lounge 2014-02-08 12:33:03


The way I plan on doing dialogue next time is to have a big array that has every possible dialogue option in the game (or maybe just in the current city). Each one will have a speaker, text, associated audio, and a next. Next will mostly be the current dialogue plus 1 or just -1 to end the dialogue sequence. For options to choose from, I would give those dialogue objects an array of options instead of a next: what the option button says and a new next if that option is selected. You can go further and add conditions to the option, like if you try to select one but you don't have enough money or experience or something then it goes to a different next.

Response to The Flash 'Reg' Lounge 2014-02-08 13:56:19


At 2/8/14 05:00 AM, slugrail wrote: My point being: use XML, JSON or any human readable, widely know and parsable format.

Yes, with the purpose of storing the database in a separate file which can be read in all three things: run-time, me (by human) and by the database editor.

translate it into binary operations for the runtime.

I hope you mean "compile to SWF" by this, because otherwise I'm thinking about generating some sort of bytecode from the database which is embedded into the application and used to access data from the database at run-time.

XML is a part of AS3's syntax

YES, I almost forgot about it! I think due to the amount of properties which every object is going to have, I think XML will simply have larger file size than a JSON file containing the same data just in different format.

your compiled code should always be separated from config files

Very good. Now I'm having difficulty with determining if what I am working on is a config file or compiled code? If I had an editor for this database, I'd use the compiled sort of format to parse it in the editor and output when saving changes. That same file which was output by the editor would then be used in run-time? And a config would be some side class file which controls, say, behavior of the system (the way the data is processed), and doesn't affect the data?

3) Is it OK to create anonymous functions like this?
No and no. Integrate what you'll be commonly using into the dialogue system.
No need for callbacks when you set the boundaries yourself.
So you mean that I should ...
No I did not say what you're probably thinking of doing. If, for example your callbacks set within "onHide" are going to

...to run when that phrase in the dialogue finishes displaying...

hide the dialogue box countless times

The dialogue box will hide when there is no next phrase, that is determined automatically by the dialogue engine.
"onHide" and "onShow" are for miscellaneous stuff, like telling characters in the game to play animations or move to different positions, or spawn enemies, or initiate a battle, or start music, or tell the game to fade the screen and switch to another game level.

then you've already broken the most important use for OOP languages, to eliminate ______.

...to eliminate dependency?

If your dialogue system needs to be told what to do once a dialogue has opened/closed then that's a big case of re******cy

redundancy?

Your dialogue system needs to have a boundary;

By a boundary you mean limitation, encapsulation?

if your onShow callback can send a HTTP request to my site, then you're obviously doing something wrong.

So I need to create command objects instead of functions, and there would be a limited set of command types supported by the dialogue system? Instead of functions, I'd be specifying arrays of commands. That would require me to write a new command subclass for every action possible to happen in the game. So I need some sort of system which can be easily extended, and I assume Command behavioral pattern.
All I need is stuff to happen in the game when dialogues progress. It simply means that particular moments in the dialogue cause events to happen, and some of those are pretty complex and have many parameters. Using callbacks to handle this problem is wrong, it seems?

If I use JSON, it requires a dialogue editor, which I can't afford to produce.
JSON.parse(string) seems easy enough for me... and...
what are you trying to say?

I'm trying to say that currently this whole dialogue database is written in pure ActionScript code. It is already creating objects, which can be read. There is no need to parse anything. Why do I need to switch the format to JSON, if only I don't need to do something with it that wouldn't allow it to execute (#include) in an application right away, instead forcing me to load/embed it and parse it?

At 2/8/14 12:33 PM, MSGhero wrote: Next will mostly be the current dialogue plus 1 or just -1 to end the dialogue sequence.

How do I create loops in the dialogue or dialogue menus?

For options to choose from, I would give those dialogue objects an array of options instead of a next: what the option button says and a new next if that option is selected.

What if that option has an array of replies too, how to write that?

You can go further and add conditions to the option

How would I write this, in what format? And how can I control certain events in the game when certain dialogue options are displayed (sort of like in-game cutscenes with dialogues)?

Response to The Flash 'Reg' Lounge 2014-02-08 14:17:05


At 2/8/14 01:56 PM, kkots wrote: I'm trying to say that currently this whole dialogue database is written in pure ActionScript code. It is already creating objects, which can be read. There is no need to parse anything. Why do I need to switch the format to JSON, if only I don't need to do something with it that wouldn't allow it to execute (#include) in an application right away, instead forcing me to load/embed it and parse it?

It's about 10 times easier to edit a json file than to edit that mess of objects you posted earlier, especially with a json editor. What you had wasn't remotely human-readable and would probably suck if you wanted to change something.

How do I create loops in the dialogue or dialogue menus?

Set next equal to a previous dialogue node.

What if that option has an array of replies too, how to write that?

The option should lead to a new dialogue node, and you can put the next options there.

How would I write this, in what format? And how can I control certain events in the game when certain dialogue options are displayed (sort of like in-game cutscenes with dialogues)?

That's something you have to figure out for your project.

Response to The Flash 'Reg' Lounge 2014-02-08 14:42:26


At 2/8/14 02:17 PM, MSGhero wrote:
What if that option has an array of replies too, how to write that?
The option should lead to a new dialogue node, and you can put the next options there.

After reading this I'm starting to realize that I've become a bit obsessed with keeping all the data related to a dialogue message in one place (in its constructor), and with trying to represent the dialogues in a tree-like structure.
You made me realize that I really should not nest object constructor calls in each other.
That's.. really making me rethink this entire problem from scratch.

Response to The Flash 'Reg' Lounge 2014-02-08 20:14:58


At 2/8/14 01:56 PM, kkots wrote: Yes, with the purpose of storing the database in a separate file which can be read in all three things: run-time, me (by human) and by the database editor.

I don't know what you're trying to say here...

I hope you mean "compile to SWF" by this, because otherwise I'm thinking about generating some sort of bytecode from the database which is embedded into the application and used to access data from the database at run-time.

What? SWF is a container format, you don't "compile" anything, you simply pack and compress. AS is compiled to ABC code if that's what you're trying to say, either way your statement is out of context and has nothing to do with your dialogue system.

YES, I almost forgot about it! I think due to the amount of properties which every object is going to have, I think XML will simply have larger file size than a JSON file containing the same data just in different format.

There's nothing wrong with using XML OR JSON. This is what I'm trying to tell you. Use a parsable format to load your dialogues. Anything but what you have atm. A couple of bytes is nothing when you can load and unload them at will to and from memory.

your compiled code should always be separated from config files
Very good. Now I'm having difficulty with determining if what I am working on is a config file or compiled code? If I had an editor for this database, I'd use the compiled sort of format to parse it in the editor and output when saving changes. That same file which was output by the editor would then be used in run-time? And a config would be some side class file which controls, say, behavior of the system (the way the data is processed), and doesn't affect the data?

I couldn't understand what you're trying to ask here either, but to answer your first question ANY sort of data should be stored externally, meaning it should NOT be compiled with your program. If you still don't know what I'm saying: your program is the brain that loads and manages the data, the data is simply an input for your program. Your input should not rely on the program, but your program should rely on the input and its content. Creates nice & resuable code. You have callbacks; so your input relies on the program and your program relies on the input. If I drew a DFD of what you've made in an exam that would be 10 easy marks gone down the drain.

...to eliminate dependency?

redundancy*

So I need to create command objects instead of functions, and there would be a limited set of command types supported by the dialogue system? Instead of functions, I'd be specifying arrays of commands. That would require me to write a new command subclass for every action possible to happen in the game. So I need some sort of system which can be easily extended, and I assume Command behavioral pattern.

Yes even a tokenized approach to this would be better than what you have. There are many RPG developers who use a tokenized approach for cutscenes and dialogues. There are other ways but that works too.

All I need is stuff to happen in the game when dialogues progress. It simply means that particular moments in the dialogue cause events to happen, and some of those are pretty complex and have many parameters. Using callbacks to handle this problem is wrong, it seems?

In fact it is. There are so many ways I can think of implementing this. Why not dispatch an event once your dialogue is hidden/shown, then let your OTHER systems deal with it? Say, your inventory system would be able to add items if an "additem" token was attached to the event. Not only would you be working within your system's boundary but it would cut a large amount of redundancy from your code.

This is how many component-based systems work (including mine). The system has specialised and interdependent managers that work independently (interdependent != independent, not sure if I worded that properly), if one is broken the others stay in tact.

I'm trying to say that currently this whole dialogue database is written in pure ActionScript code. It is already creating objects, which can be read. There is no need to parse anything.
Why do I need to switch the format to JSON, if only I don't need to do something with it that wouldn't allow it to execute (#include) in an application right away, instead forcing me to load/embed it and parse it?

Not sure why you have an #include there and what it has to do with JSON but...
I'm just answering your question:

4) How can this be improved to be more maintainable and more following good OOP standards?

So your entire post was you waffling just for the sake of replying? Nobody's forcing you to change anything, you asked for advice, here it is. Do what you want with it or ignore it completely.

Response to The Flash 'Reg' Lounge 2014-02-08 21:17:03


At 2/8/14 08:14 PM, slugrail wrote: I couldn't understand what you're trying to ask here either, but to answer your first question ANY sort of data should be stored externally, meaning it should NOT be compiled with your program. If you still don't know what I'm saying: your program is the brain that loads and manages the data, the data is simply an input for your program. Your input should not rely on the program, but your program should rely on the input and its content. Creates nice & resuable code. You have callbacks; so your input relies on the program and your program relies on the input. If I drew a DFD of what you've made in an exam that would be 10 easy marks gone down the drain.

This is great advice! Thank you. Really affecting the way I see my problem. I definitely should separate data from the engines.

So I need to create command objects instead of functions ..blablabla... Command behavioral pattern.
There are other ways but that works too.

Um, can you approximately point to those methods? They might actually be better than what I suggested, I need to know.

.....using callbacks to handle this problem is wrong, it seems?
In fact it is. There are so many ways I can think of implementing this. Why not dispatch an event once your dialogue is hidden/shown, then let your OTHER systems deal with it?

That's of no use to me. Nothing special should happen when dialogue is hidden or shown. I may have not explained my situation clear enough. I need help tying events to particular dialogue phrases. Say, when some character says some particular phrase (one particular dialogue message) I want to dispatch an event with parameters for other systems to deal with it. What would be the most comfortable way of managing dispatching of such events (not handling of them, I'm interesting in dispatching)? Phrases are written in the dialogue database, but I need to somehow also write an event (or no event) for each phrase in the dialogue database, there are many ways to do this, but what way do you think is the best?

I'm just answering your question:
4) How can this be improved to be more maintainable and more following good OOP standards?

Thanks for taking the time to help me out. I promise it's not happening in vain.

So your entire post was you waffling just for the sake of replying?

I apologize, I feel extremely uncomfortable talking to an experienced programmer (especially when I don't understand most of details), so I don't know how to present myself or my problem and I start spouting utter nonsense. It's not because I don't speak English fluently, but more like I don't speak your programming terminology as well as you, I did not receive any programming education yet and I do not have enough experience to do any serious programming talk

Response to The Flash 'Reg' Lounge 2014-02-08 23:18:21


Started playing deus ex: hr. I got about 5 mins in before my brain exploded. I've never played a fps before, I've played some CoD but I had it in 3rd person mode. I think I just hate 1st person in general cuz I have no idea where my character is at. I want to be able to turn around quickly but I also want to be able to precisely move the mouse for shooting and stuff. Dynamic mouse sensitivity I guess, not like that can be a real thing without doing it manually.

Brb, turning the difficultly down to easy

Response to The Flash 'Reg' Lounge 2014-02-09 00:39:26


At 2/8/14 11:18 PM, MSGhero wrote: Brb, turning the difficultly down to easy

I played Guitar Hero on the hardest difficulty once for an entire day. Never picked the game up before that. By the end of the night, I was rocking every song on hard :P


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2014-02-09 02:16:48


Hey guys. I was messing with AngularJS, Express, node.js, and Bootstrap. I made this thing to try to ensure I could do it. I can take any feedback.

http://54.83.0.182:3000/

I am also still working on http://www.civillains.com with some awesome people. I am trying to implement the core gameplay right now with AS3 (Starling), and Java (SmartFox). It's not that bad. Mostly just pretty tedious, because we have been spending an enormous amount of time on tools development.

I hope to open source some of it. At least the tool I have built to convert SWFs to SpriteSheets (In a way better than Adobe tried to do too).

Response to The Flash 'Reg' Lounge 2014-02-09 13:29:46


At 2/5/14 01:20 AM, swishcheese wrote: Do you by any chance have a hp Pavilion Laptop??? My roommate had the same problem. The noisy fan became apart of the apartment family and I called him Greg. He always had something to say, until my roommate would flick him with his finger. Then he would be quite for a little while.

Did greg ever make the laptop show an error at the start "HP has detected that the fan isn't working properly" or something? Wish the replacement part would hurry up so I can get this fixed. I can't tap the noise away anymore, getting worse I guess.

Response to The Flash 'Reg' Lounge 2014-02-09 15:29:59


I believe he may have. but he still was working even tho message would pop up at lower bottom right. My best advice is to just monitor his temperature and to wear ear plugs. Just hope that the part comes soon. Hang in there Greg parts are a coming.

At 2/9/14 01:29 PM, MSGhero wrote:
At 2/5/14 01:20 AM, swishcheese wrote: Do you by any chance have a hp Pavilion Laptop??? My roommate had the same problem. The noisy fan became apart of the apartment family and I called him Greg. He always had something to say, until my roommate would flick him with his finger. Then he would be quite for a little while.
Did greg ever make the laptop show an error at the start "HP has detected that the fan isn't working properly" or something? Wish the replacement part would hurry up so I can get this fixed. I can't tap the noise away anymore, getting worse I guess.

BBS Signature

Response to The Flash 'Reg' Lounge 2014-02-10 19:05:13


Greg fixed. Power won't come on. Fml.

Response to The Flash 'Reg' Lounge 2014-02-11 13:41:01


At 2/10/14 07:05 PM, MSGhero wrote: Greg fixed. Power won't come on. Fml.

Ohhh. noo. I hope replacing the motherboard along with the fan is not the standard to fix that sorta problem. And the power supply should be fine if it was turning on while Greg was broke. Idk, Goodluck Man. It must be frustrating, Hang in there Hero.


BBS Signature

Response to The Flash 'Reg' Lounge 2014-02-11 16:37:47


At 2/11/14 01:41 PM, swishcheese wrote:
At 2/10/14 07:05 PM, MSGhero wrote: Greg fixed. Power won't come on. Fml.
Ohhh. noo. I hope replacing the motherboard along with the fan is not the standard to fix that sorta problem. And the power supply should be fine if it was turning on while Greg was broke. Idk, Goodluck Man. It must be frustrating, Hang in there Hero.

Back in business. They mispositioned the fingerprint scanner's zif cable, so it was shorting the computer or something idc.

Response to The Flash 'Reg' Lounge 2014-02-11 19:35:04


At 2/11/14 04:37 PM, MSGhero wrote: Back in business. They mispositioned the fingerprint scanner's zif cable, so it was shorting the computer or something idc.

Sweeeet! good too hear. The useless finger print scanner messing everything up. Does anyone even use that thing? I put a sticker over my. It goes well with the others around it.

The Flash 'Reg' Lounge


BBS Signature

Response to The Flash 'Reg' Lounge 2014-02-11 20:38:37


At 2/11/14 07:35 PM, swishcheese wrote: Sweeeet! good too hear. The useless finger print scanner messing everything up. Does anyone even use that thing? I put a sticker over my. It goes well with the others around it.

The keyboard zif cable is bent, so half the keys don't work. If I don't have my ext keyboard, then I need it. I also have it set to open a browser tab with a certain finger cuz my trackpad wasn't working at some point.

In other words, I'm not buying hp again. Possibly not another gaming laptop (pc + tiny laptop/modded chromebook)

Response to The Flash 'Reg' Lounge 2014-02-11 21:12:55


At 2/11/14 08:38 PM, MSGhero wrote: In other words, I'm not buying hp again. Possibly not another gaming laptop (pc + tiny laptop/modded chromebook)

Ohh I see. That is rough. My computer working fine for me so far. So I don't hate Hp just yet. That was happening to my roommates laptop too after he took it apart. Some keys on keyboard didnt work. I guess the Keyboard (or Zif cable) just to flimsy.


BBS Signature

Response to The Flash 'Reg' Lounge 2014-02-11 21:18:38


At 2/11/14 09:12 PM, swishcheese wrote: Ohh I see. That is rough. My computer working fine for me so far. So I don't hate Hp just yet. That was happening to my roommates laptop too after he took it apart. Some keys on keyboard didnt work. I guess the Keyboard (or Zif cable) just to flimsy.

The dual graphics cards didn't work out for them. I have to update my drivers via a 3rd party guy, but they're buggy as hell. In order to play opengl games, I have to switch the bios to FIXED graphics (manually choose which gpu you want) instead of DYNAMIC (default, auto switches). And I'm lucky if I don't get a BSOD in fixed mode.

Response to The Flash 'Reg' Lounge 2014-02-11 23:40:00


At 2/11/14 09:18 PM, MSGhero wrote: The dual graphics cards

In a laptop? Wait, what? Am I missing something?


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2014-02-11 23:46:23


At 2/11/14 11:40 PM, egg82 wrote: In a laptop? Wait, what? Am I missing something?

You haven't heard of it because it was a pretty big failure due to the driver updates. HP needed to stitch the intel drivers to the AMD drivers each time AMD came out with a new set, and they did that once. It was made that way so it would use the intel during facebook browsing and AMD during dota. That part works fine and keeps the comp as cool as a dvX can be. But the drivers, yeah.

Response to The Flash 'Reg' Lounge 2014-02-12 00:24:35


At 2/11/14 11:46 PM, MSGhero wrote:
At 2/11/14 11:40 PM, egg82 wrote: In a laptop? Wait, what? Am I missing something?
You haven't heard of it because it was a pretty big failure due to the driver updates. HP needed to stitch the intel drivers to the AMD drivers each time AMD came out with a new set, and they did that once. It was made that way so it would use the intel during facebook browsing and AMD during dota. That part works fine and keeps the comp as cool as a dvX can be. But the drivers, yeah.

The Nividia counterpart is somewhat similar minus the Optimus marketing. Only problem is I can't overclock my once overclockable GT 540m with the latest drivers and the dynamic graphics switching doesn't work as intended. I can run some games fine on the HD 3000 at 720p low-mid settings but the 540 is always on even when I've "disabled" it. PhysX is probably the cause since the laptop runs so much cooler when I'm using the 540m than the 3000 in Batman Arkham Asylum.
~70 degrees on CPU/HD 3000 and ~55 when I'm using the 540m alone... and there's no option to turn off the 540 in the BIOS at all, you can only configure when it should turn on/off using Nvidia's control panel :/

The original adapter died off so I've been using a weaker one (90W vs 65W) so the fan will never go above 50% speed.The fan also doesn't kick in unless there's a loading screen or GPU usage drops down a significant amount so this thing runs extremely hot.

It's a better idea to invest in a mid range gaming rig rather than risk burning yourself resting a 90 degree furnace on your lap.. happens often actually.

Response to The Flash 'Reg' Lounge 2014-02-12 04:54:01


At 2/11/14 09:18 PM, MSGhero wrote:
At 2/11/14 09:12 PM, swishcheese wrote: Ohh I see. That is rough. My computer working fine for me so far. So I don't hate Hp just yet. That was happening to my roommates laptop too after he took it apart. Some keys on keyboard didnt work. I guess the Keyboard (or Zif cable) just to flimsy.
The dual graphics cards didn't work out for them. I have to update my drivers via a 3rd party guy, but they're buggy as hell. In order to play opengl games, I have to switch the bios to FIXED graphics (manually choose which gpu you want) instead of DYNAMIC (default, auto switches). And I'm lucky if I don't get a BSOD in fixed mode.

Yeahh, I see that it tells me to update my drivers when I play some games. (but there are no driver updates, expect for the third party thing). But I mostly play Smite, TF2, CSGO, MineCraft, and Terraria. So Its not the biggest deal. What does suck is I installed Lubuntu on a usb to boot from for my Operating System Class. And because of the dual graphics I cant boot from it using this laptop (well I can boot, but can't see shit). So I using my old Compaq laptop for that.


BBS Signature

Response to The Flash 'Reg' Lounge 2014-02-12 11:01:09


At 2/12/14 04:54 AM, swishcheese wrote: Yeahh, I see that it tells me to update my drivers when I play some games.

I wouldn't be able to tolerate that. I play wayyyyy too many games.

I just use a desktop PC for gaming

Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2014-02-12 14:08:19


Ok, so why isn't the green bar at the bottom going across the whole page?

http://pestoforce.com/contact.php

Response to The Flash 'Reg' Lounge 2014-02-12 14:10:08


At 2/12/14 02:08 PM, PestoForce wrote: Ok, so why isn't the green bar at the bottom going across the whole page?

http://pestoforce.com/contact.php

Also, on mobile, the pink header bar and green footer bar don't go all the way across the page...

Response to The Flash 'Reg' Lounge 2014-02-12 15:20:26


Where is jvm.config in your flex sdk (flashdevelop/tools/path to sdk)? It seems like it's supposed to be in /bin, but I don't have "jvm" anywhere in my FD files. I'm getting a java heap space FD error, and that was solved last time by increasing the number in that file.

Response to The Flash 'Reg' Lounge 2014-02-12 16:16:29


At 2/12/14 03:20 PM, MSGhero wrote: Where is jvm.config in your flex sdk (flashdevelop/tools/path to sdk)? It seems like it's supposed to be in /bin, but I don't have "jvm" anywhere in my FD files. I'm getting a java heap space FD error, and that was solved last time by increasing the number in that file.

With flex 4.11, I found the params inside of all the batch files in /bin, but that didn't solve anything. Had to redownload flex 4.6 (FD default) and I guess I'm sticking with it. It's strange how I got 4.11 to work without issue before.

Response to The Flash 'Reg' Lounge 2014-02-12 18:15:57


At 2/12/14 02:08 PM, PestoForce wrote: Ok, so why isn't the green bar at the bottom going across the whole page?

http://pestoforce.com/contact.php

It's not on the bottom because something slipped my mind that is required for bottom alignment in a scenario such as that. It's a pretty simple fix, though. First you need create two new <div> elements: one that containers everything inside your <body>, and one inside that <div> that contains everything except for the footer. You can view this page to see what I mean. The "wrapper" element contains everything, and the "footerAligner" element is inside of "wrapper" and contains everything except for the footer.

And then just plop in this CSS, making sure to replace bottomOfPage with the new CSS:

html,body { margin: 0; padding: 0; height: 100%; } .wrapper { position: relative; min-height: 100%; } .footerAligner { padding-bottom: 14px; } .bottomOfPage { position: absolute; bottom: 0; width: 100%; height: 14px; text-align: center; font-size: 10px; font-weight: bold; color: #774EB1; border-top: 5px solid #ABDD6F; }

And the green bar is not stretching across the page because you have a <section> element open that isn't closed (and it's also not required). Just get rid of the <section> element here:

<section> <header class="favoritePastas"><span class="contentName">Contact PestoForce:</span></header> <form method="POST" action="contactp.php"> <table border="0" cellpadding="4" cellspacing="0" align="center">

You also really do not need tables for that. Like before you're just overcomplicating your HTML. Here's how I would have done that contact form:

HTML

<form class="contact" method="POST" action="contactp.php"> <div class="center"> Your Email Address: <input type="text" name="daemail"> </div><br> Your Message:<br> <textarea class="contactMessage" name="datxt"></textarea><br> <div class="center"> <input class="contactSubmit" type="submit" value="Send Message"> </div><br> </form>

CSS

.center { text-align: center; } .contact { width: 400px; margin: 36px auto 0 auto; } .contactMessage { width: 400px; height: 220px; }

Which you can view here.

At 2/12/14 02:10 PM, PestoForce wrote: Also, on mobile, the pink header bar and green footer bar don't go all the way across the page...

That's weird. I'll need to play around with the HTML/CSS to see what is causing that.

Response to The Flash 'Reg' Lounge 2014-02-12 18:40:18


At 2/12/14 02:10 PM, PestoForce wrote: Also, on mobile, the pink header bar and green footer bar don't go all the way across the page...

Well it was a simple fix. You just need to add overflow: hidden to the "topofPage" CSS definition. However, there's also the problem that the layout was not designed for mobile, so it's too wide. If you want it to look proper on both desktops and mobile devices then you'll need to detect when a mobile device is viewing the page, and serve a CSS file that sets a different width for the content. A 900 pixel width seems to work good; I tested it here. I also wasn't aware you wanted this to work on mobile, so you'll need to tweak the HTML slightly if you want to change how the links to games appear, which should only be done for the page that is displayed for mobile. I recommend making two entirely different templates for both desktop and mobile (and if you're not using templates you should be).

I also just noticed that you did this:

<div class="topOfPageInner"> <span>&nbsp;</span>

I can tell you did that because you wanted to change the alignment of your slogan, but that's not a good way to do it. If you want to change how far "right" the slogan is relative to the logo just go into the CSS and change this line in the ".slogan" definition:

padding: 19px 0 0 12px;

The 12px part is the space between the logo and slogan. Just make that number larger if you want more space.