Jump to content

Need help please! flash btn's not working with script.


defecto

Recommended Posts

So the site is using a flash section to control navigation. when I click the button pages are not loaded only the flash

 

here is url:

 

Script to control flash generated url

<?php


function fudgePage(){

$url = trim(strtolower(preg_replace('([^[:alnum:]\|\/\:\.\_\-])', '', "http://".$_SERVER['SERVER_NAME'].'/'.$_SERVER['REQUEST_URI']))); 

$parts = parse_url($url,PHP_URL_PATH);

$sections = explode('/',trim($parts,'/'));

$section = @ trim(substr(ereg_replace('([^[:alnum:]\-])','',$sections[0]),0,50));

$subsection = @ trim(substr(ereg_replace('([^[:alnum:]\-])','',$sections[1]),0,50));

$pages = array();
$pages[''] = "sections/homeContent.php";
$pages['residential'] = "sections/residentialContent.php";
$pages['residential-virtual-tours'] = "sections/virtualTours.php";
$pages['residential-features'] = "sections/featuresContent.php";
$pages['residential-floorplans'] = "sections/floorPlansContent.php";
$pages['residential-site-key-plan'] = "sections/siteKeyContent.php";
$pages['retail'] = "sections/retailContent.php";
$pages['interest'] = "sections/emailContent.php";
$pages['location'] = "sections/locationContent.php";
$pages['contact'] = "sections/contactContent.php";
$pages['news'] = "sections/newsContent.php";
$pages['icon-gallery'] = "sections/galleryContent.php";

$key = @ (!empty($subsection) && $section != 'interest') ? $section.'-'.$subsection : $section ;

$page = @ $pages[$key];

return array('subsection' => $subsection, 'section' => $section, 'page' => $page);

}

?>

 

INDEX PAGE

 

<?php

$baseurl = 'http://SomDomain.com/';

$baseinc = dirname(realpath(__FILE__));

include('dirty-hack.php');

$params = fudgePage();

$swf = (!empty($params['section'])) ? $params['section'].'.swf' : 'home.swf' ;

$include = (!empty($params['page'])) ? $params['page'] : "sections/homeContent.php" ;

?>
<!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>

<link rel="stylesheet" href="<?php echo $baseurl ?>css/styles.css" type="text/css" media="all" charset="utf-8" />
<!--[if IE]>
	<link rel="stylesheet" href="<?php echo $baseurl ?>css/ie-styles.css" type="text/css" media="all" charset="utf-8" />
<![endif]-->	
<script type="text/javascript" language="javascript" src="<?php echo $baseurl ?>js/prototype.js" charset="utf-8"></script>
<script type="text/javascript" language="javascript" src="<?php echo $baseurl ?>js/scriptaculous.js" charset="utf-8"></script>
<script type="text/javascript" language="javascript" src="<?php echo $baseurl ?>js/effects.js" charset="utf-8"></script>
<script type="text/javascript" language="javascript" src="<?php echo $baseurl ?>js/scripts.js" charset="utf-8"></script>
<script type="text/javascript" language="javascript" src="<?php echo $baseurl ?>js/fo.js" charset="utf-8"></script>
    
    <style type="text/css">
	#slideshow { position: relative; width: 310px; height: 422px; }
	#slideshow div { position: absolute; left: 0; top: 0; }
</style>
  <base href="<?php echo $baseinc ?>" />
  

    

</head>

<body>



  
   <?php /*<script type="text/javascript" language="javascript" src="<?php echo $baseurl ?>js/slideshow.js" charset="utf-8"></script>
   <script type="text/javascript">new Slideshow('slideshow', 5000);</script> */ ?>
<div id="top">
<div id="click-hack" style="float:left; position:absolute; top:250px; z-index:5; width:150px; height:75px; cursor:pointer;" onclick="window.location='<?php echo $baseurl ?>';"><img src="<?php echo $baseurl ?>images/blank.gif" height="75" width="150"></div>
	<div id="flash">
	  <div id="flashObject"> </div>
	  <script type="text/javascript" language="javascript" charset="utf-8">
	  	// <![CDATA[
			var fo = new FlashObject("<?php echo $baseurl . $swf ?>", "ICONsite", "782", "325", "7", "#0f0f0f",wmode="transparent");
			fo.addParam("menu", "false");
			fo.addParam("scale", "exactfit");
			fo.addParam("wmode", "transparent");
			fo.addParam("quality", "high");
			fo.addParam("allowScriptAccess", "sameDomain");
			fo.write("flashObject");
  		// ]]>
	  </script>
	</div>
	<iframe src="ticker/index.html" width="100%" height="34" frameborder="0" scrolling="no"></iframe>
	<div id="container">
		<?php include($baseinc. $include); ?>

	</div>
	<div id="footer" class="clear">
		<div id="footerAddress">
			<a href="http://www.somedomain.com/" target="_blank"> <img src="images/footer.jpg" alt="" style="overflow: hidden;" />	</a>
		</div>
	</div>
	<div id="footer-nav" class="clear">
		<!--img src="images/icon-sm.gif" alt="" /-->
		<br />
		<ul>
			<li class="none"><a href="<?php echo $baseurl ?>">Home</a></li>
			<li class="none"><a href="<?php echo $baseurl ?>residential">Residential</a></li>
			<li class="none"><a href="<?php echo $baseurl ?>residential/virtual-tours">Virtual Tours</a></li>
			<li class="none"><a href="<?php echo $baseurl ?>residential/features">Features</a></li>
			<li class="none"><a href="<?php echo $baseurl ?>residential/floorplans">Floorplans</a></li>
			<li class="none"><a href="<?php echo $baseurl ?>residential/site-key-plan">Site Key Plan</a></li>
			<li class="none"><a href="<?php echo $baseurl ?>retail">Retail</a></li>
			<li class="none"><a href="<?php echo $baseurl ?>interest">Available Units</a></li>
			<li class="none"><a href="<?php echo $baseurl ?>location">Location</a></li>
			<li class="none"><a href="<?php echo $baseurl ?>contact">Contact</a></li>
			<li class="none"><a href="<?php echo $baseurl ?>news">News</a></li>
			<li class="none"><a href="<?php echo $baseurl ?>icon-gallery">Gallery</a></li>
			<li class="none"><a href="<?php echo $baseurl ?>privacypolicy.php" onclick="oWin('privacypolicy.php', '', '512', '380'); return false;">Privacy Policy</a></li>
		</ul>
		<br />
		<br />
	</div>
</div>
    
<script type="text/javascript">
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
	var pageTracker = _gat._getTracker("UA-1188345-10");
	pageTracker._initData();
	pageTracker._trackPageview();
</script>




</body>
</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.