html colour from flash choice

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

This entry was written by admin , posted on Thursday December 20 2007at 11:12 pm , filed under Web and tagged , , , . Bookmark the permalink . Post a comment below or leave a trackback: Trackback URL.

 

Trackbacks

(Trackback URL)

close Reblog this comment
blog comments powered by Disqus