Flash button not working

8 posts by 2 authors in: Forums > CMS Builder
Last Post: October 18, 2011   (RSS)

Re: [shannonr] Flash button not working

By Jason - October 18, 2011

Hi,

What is the difference between the HTML and PHP versions? Do you receive any errors on the page? Are you outputting the flash button from CMS Builder?

One place you can start would be to view the source of the HTML and the PHP version and look for differences between them.

Hope this helps get you started. Let us know if you need anything else.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Flash button not working

By shannonr - October 18, 2011

Hi Jason
Thanks for getting back. The PHP version has the PHP header code (as output by CMSB), otherwise pretty much no difference. No errors on page. I created the flash myself and its just a simple "on (release) getURL etc..." the url is absolute (http://.. etc) and works fine on the html page... its very odd. Its like the getURL is being supressed by the PHP sode somehow... (here's the link: http://babyiq.com/default.php - its the button next to the slideshow..)
Thanks

Re: [shannonr] Flash button not working

By Jason - October 18, 2011

Hi,

I took a look at the page, and can't see anything obviously wrong. The Flash should be running on the client side, and since PHP is a server side technology, it should be interfering with it at all. Could you provide a link to your HTML version along with a copy of the PHP code?

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Flash button not working

By shannonr - October 18, 2011

Hi - here is the html version:
http://www.babyiq.com/default.htm
Here is the code:
<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php


// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('D:/Sites/babyiq.com/public_html/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

// load records
list($welcomeRecords, $welcomeMetaData) = getRecords(array(
'tableName' => 'welcome',
'allowSearch' => '0',
'limit' => '1',
));
$welcomeRecord = @$welcomeRecords[0]; // get first record

// show error message if no matching record is found
if (!$welcomeRecord) { dieWith404("Record not found!"); }

list($footerRecords, $footerMetaData) = getRecords(array(
'tableName' => 'footer',
'allowSearch' => '0',
'limit' => '1',
));
$footerRecord = @$footerRecords[0]; // get first record

?>

and all the main content loads with:
<h1><?php echo $welcomeRecord['title'] ?></h1>
<p>&nbsp;</p>
<?php echo $welcomeRecord['content'] ?>

Re: [shannonr] Flash button not working

By Jason - October 18, 2011

Hi,

I compared the output of these two pages and found there was a significant difference in how your flash was being output between the two.

In default.php you have this:

<object data="http://www.babyiq.com/demo_1.swf" type="application/x-shockwave-flash" height="209" width="500">
<param name="src" value="http://www.babyiq.com/demo_1.swf">
</object>


and in default.htm you have:

<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','500','height','209','src','demo_1','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','demo_1' ); //end AC code
</script><embed src="demo_1.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" height="209" width="500">
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="500" height="209">
<param name="movie" value="demo_1.swf" />
<param name="quality" value="high" />
<embed src="demo_1.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="500" height="209"></embed>
</object>
</noscript>


So in default.php you seem to be missing a javascript call to AC_FL_RunContent.

Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Flash button not working

By shannonr - October 18, 2011 - edited: October 18, 2011

Hi - but the flash works - the slideshow runs (and flash works on other pages which have the same PHP) it just doesn't want to do "getURL"

as I'm adding the flash through the CMSB editor the javascript should be added anyway?...

Re: [shannonr] Flash button not working

By Jason - October 18, 2011

Hi,

I see. The issue here then, is that the wysiwyg editor automatically strips out javascript, which is why it isn't showing up in the PHP version.

To stop the field from taking out the javascript, take a look at this post:
http://www.interactivetools.com/forum/gforum.cgi?post=77059#77059

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/