Posts Tagged ‘php’

Home server

Saturday, March 15th, 2008

Duane got a PS3 today, doesn’t seem overly impressed at this stage. it might be interesting to try out the home media serving capabilities.

(more…)

html colour from flash choice

Thursday, December 20th, 2007

After making my flash navigation multicoloured (randomly on run-time), I thought it would be cool to have the selected tab determine the colour of the title element of the page, or for any other CSS element for that matter. After a bit of tinkering this is what I got:

Each of the tabs generate a random color value from hex and
this is passed to the page as a decimal value which php  converts to hex again so it can be used
inline css style attributes as below:

Here is the php code

<?php
$temp=’#';
$col = $_GET['col'];
$col1 = dechex($col);
$color = $temp.$col1;
?>

And then the code to receive the values and use it as the background colour of the element <p class=”title” style=”background-color:<? echo “$color”;?>;”>ABOUT</p>

I will post the actionscript here shortly