Flash game works locally, not from server!

Filed Under (Graphics and Design) by admin on 25-02-2009

Hi guys, I’m pretty good with HTML and CSS. My company paid a developer to make us a flash game. If i open his directory and run the html file locally from my computer, the game runs fine. However, Once I upload them to the server, the loader counts to 100% and then nothing on the screen.

I’ve tried from Dreamweaver, FTP Voyager and Ipswitch. I tried both Binary and ASCII. I tried switching some links in the html file. Nothing has worked.

It’s entirely possible the linking is incorrect, or that the Flash uses class files that aren’t properly linking? Some Flash requires class files, which is a bit burgeonsome but is a trait of ActionScript 2/3.0.

Look through your code, both HTML and ActionScript, for any of this:

file:\C:my documentsflashsomefile.swf

Use absolute relative linking, in both the Flash and your files,

/flash/somefile.swf

Not with the CWD syntax:

../flash/somefile.swf

Should work! Read the rest of this entry »

How to capture HTTP Response headers of the same page using PHP

Filed Under (Software Development) by admin on 24-02-2009

Hi All, I have a requirement of displaying HTTP Response headers in the same page being redered using PHP.
This is to track various responses sent by the Apache Server for same page on different scenarios (like 200, 304, 503)
Read the rest of this entry »

Java inside Java

Filed Under (Software Development) by admin on 17-02-2009

I have a client that wants to run a .js file inside a .js file because of the registration form. *(

if (notes2 == “yes”) {
document.write(‘<fieldset><legend>’);

document.write(‘Notes Area<br></legend>’);

document.write(‘<center>Blurb Text Here that shows up on webpage<br><br><script type=”text/javascript” src=”http://forms.example.com/form/XX/4#*$!#*$!xx.js”></script><br>More blurb text that shows up after the reg. box</center>’);

document.write(‘</fieldset>’);
document.write(‘<br><br>’);
}
)*

This code places the box where it should be in Firebox but in IE 7 the registration box is at the bottom of the table, not between the two text blurbs. Any idea how I can get this to show up in IE? if it’s “just not rendering” try breaking up the code. Weird things sometimes happen with Javascript within document.write.

document.write(‘<scr’+'ipt type=”text/jav’+'ascr’+'ipt” src=”http://forms.example.com/form/XX/4#*$!#*$!xx.js”></scr’+ipt>’);

Second, your formatting is likely a result of a combination of Quirks mode and deprecated tags/discouraged approaches to formatting. Use a valid document type and validate your pages, this will make 90% of your formatting problems go away, Javascript or not.

To solve that, here is how I’d handle this (but move inline styles to external style sheets.) You may have to insert text-align:center and width:400px (or some valid value) to get the effects you want:

document.write(‘<fieldset style=”margin:auto;”>’);
document.write(<legend>’Notes Area<br></legend>’);
document.write(‘<p style=”text-align:center”>Blurb Text Here that shows up on webpage</p>’);

document.write(‘<div style=”margin:auto;”>’);
document.write(‘<scr’+'ipt type=”text/jav’+'ascr’+'ipt” src=”http://forms.example.com/form/XX/4#*$!#*$!xx.js”></scr’+ipt>’);
document.write(‘</div>’);

<!–
if you still have problems
add document.write(‘<div style=”clear:both;”></div>’);
right here
–>

document.write(‘<p style=”text-align:center”>More blurb text that shows up after the reg. box</p>’);
document.write(‘</fieldset>’);

Note the clearing div, you probably won’t need it, or can set the last p to clear, or overflow: none on the div containing the script – but overall, Standards Mode and semantic output should help you.

Site Graphics and Multimedia Design Overview

Filed Under (Graphics and Design) by admin on 04-02-2009

I am putting some product images on my website.So what is the best way of resizing jpegs to get them all the same size (roughly)?

Irfanview in batch mode. Takes a few clicks to resize any number of images.
And the best part….. It’s free. :) It has many other features as well. Irfanview is one of the best image utility programs around. For basic image manipulation that most of the population is doing it’s really all that is needed.

If you have it, use Photoshop. You can automate a batch to get everything done very quickly. Or, if the images are already compressed well for the web and similar in size, just not exact, you can just use CSS on your page.In my view the very best software for this is … smart saver pro by ulead.

You can set up a batch very easily and set the resize to a max width and/or height, thus all your pics of whatever size will be resized to the same height or width.

There is a free 30 trial, i don’t know if it’s been updated recently but my copy is several years old and works like a dream. The compression is better than photoshop/image ready and easier to use. eg better images with smaller file size.

The best batch processing software is and has been for many years DeBabelizer.
There is a bit of a learning curve, but it does exactly what you are looking for and much, much more.
Read the rest of this entry »