Page and category dropdowns

<ul id="sub-nav" class="span-38">
<? drop_down_menu('Get Fit', '3'); ?>
<? drop_down_menu('Eat Smart', '4'); ?>
<? drop_down_menu('Dine Healthy', '5'); ?>
<? drop_down_menu('Calm Stress', '6'); ?>
<? drop_down_menu('Look Beautiful', '7'); ?>
<? drop_down_menu('Get Personal', '231'); ?>
<? drop_down_menu('Empower Yourself', '234'); ?>
<? drop_down_menu('Shop Local', '42'); ?>
<? drop_down_menu('Give Back', '252'); ?>
<? drop_down_menu('Books, Videos & More', '254'); ?>
</ul>

<!-- this alternative allows you to intermix page and categories in the nav -->
<ul id="sub-nav" class="span-38">
<?php wp_list_pages('include=2&title_li='); ?>
<? drop_down_menu('Get Fit', '3'); ?>
<?php wp_list_pages('include=6&title_li='); ?>
</ul>

<?php
//This is the function for functions.php
function drop_down_menu($title, $cat) {
?>
<li><a href="#"><? echo $title; ?></a>
<ul>
<? $categories = get_categories('child_of=' . $cat . '&hide_empty=0');
foreach ($categories as $cat) { ?>
<li><a href="/topics/<? echo $cat->slug; ?>/"><? echo $cat->name; ?></a></li>
<? } ?>
</ul>
</li>
<? } ?>

External Interface

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Javascript - Actionscript Com</title>

<script> function getFlashMovie(movieName) {
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window[movieName] : document[movieName];
}

function formSend() {
var text = document.htmlForm.sendField.value;
getFlashMovie("ExternalInterfaceExample").sendTextToFlash(text);
}

function getTextFromFlash(str) {
document.htmlForm.receivedField.value = "From Flash: " + str;
return str + " received";
}
</script>
</head>
<body>

<form name="htmlForm" method="POST" action="javascript:formSend();">
Send to ActionScript:<br />
<input type="text" name="sendField" value="" />
<br />
<input type="submit" value="Send" />
<br />
<br />
Received from ActionScript:<br />
<input type="text" name="receivedField">
</form>

<div style="margin-top:30px;">
<object id="ExternalInterfaceExample" type="application/x-shockwave-flash" data="http://testing.hyperspatial.com/ExternalInterfaceExample.swf" width="550" height="400">
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="swfversion" value="6.0.65.0" />
<param name="expressinstall" value="scripts/expressInstall.swf" />
<param name="movie" value="http://testing.hyperspatial.com/ExternalInterfaceExample.swf" />
</object>
</div>

</body>
</html>

Swf Resize

import flash.display.StageScaleMode;
import flash.display.StageAlign;
import flash.events.Event;

stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, resizeHandler);

var ratio = movieclip.width / movieclip.height;
var defaultWidth:Number = 550;
var defaultHeight:Number = defaultWidth / ratio;

movieclip.height = defaultWidth;
movieclip.width = defaultHeight;

// initialize sizing
resizeHandler(null);

function resizeHandler(event:Event):void {
var sw:Number = stage.stageWidth;
var sh:Number = stage.stageHeight;

//Set Minimum Width
if (sw < 550) { sw = 550; } else movieclip.width = sw; movieclip.height = sw / ratio;// change (sw / ratio) to sw if you want the mc to fit horizontal }

Swf Object dynamic resize

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<style type="text/css" media="screen">
html, body, #swf_container { height:100%; }
body { margin:0; padding:0; overflow:hidden; }
</style>
<div id="swf_container">
<object type="application/x-shockwave-flash" data="http://womensprorodeotoday.madwirebuild.com/flash/video player/dynamic_swf_resize.swf" width="100%" height="100%">
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="swfversion" value="6.0.65.0" />
<param name="expressinstall" value="scripts/expressInstall.swf" />
<param name="movie" value="http://womensprorodeotoday.madwirebuild.com/flash/video player/dynamic_swf_resize.swf" />
</object>
</div>
</body>
</html>

Enclosure custom field

// To use the enclosure custom field and get the url of the uploaded video
$string_to_divide = get_post_meta(44, 'enclosure', true);

$accepted_file_types = array('.flv','.f4v');

foreach($accepted_file_types as $type){
$char_pos = strpos($string_to_divide, $type);
if ($char_pos != ''){
$divided_string = substr_replace($string_to_divide, "", ($char_pos +4));
echo "Divided String = $divided_string" . '<br>';
}
}

Divide a string

$string_to_divide = "This is the part of the string to keep: This is the part to be removed";
$dividing_character = ':';
$pos = strpos($string_to_divide, $dividing_character);
$divided_string = substr_replace($string_to_divide, "", $pos);

echo "Divided String = $divided_string";