Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Emedding flash into define_main_page.php

Emedding flash into define_main_page.php

Locked

Views: 4,091

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
13 Jan 2009, 7:08 AM
#1
bettsaj avatar

bettsaj

New Zenner

Join Date:
Dec 2008
Posts:
82
Plugin Contributions:
0

Emedding flash into define_main_page.php

I'm trying to embed a 600px x 600px flash object into the define_main_page.php page.

The flash object is actually a carousel, which my client wants as a form of navigation on the home page. The problem I'm having is a pure file path issue, but I just can't seem to find the correct solution.

The swf file path is located at:
http://www.christinafrench.com/sienna/includes/templates/cherry_zen/carousel/MainFile.swf

If you go to that link the carousel will load as it should.

The define_main_page.php file path is located at:
http://www.christinafrench.com/sienna/includes/languages/english/html_includes/define_main_page.php

I know the code in the xml and swf file are correct as the carousel loads ok when you just visit the link above. But I can't get it to load into the define_main_page.php page when loading the home page.

If you go to http://www.christinafrench.com/sienna you will be taken to the home page of the site and will notice that there is a huge space where the flash carousel should be loading.

I've tried putting the carousel directory in the root of the site with no luck, I've tried putting it into the sienna directory which is the root of the zen-cart with no joy. I've also tried putting it in the same directory as the define_main_page.php file with no luck.

This has to be a simple file path issue but I can't for the life of me get my head round why it's not working. i've checked with the developer of the carousel and all the code being used in the flash files is correct.

Please please help me.... Any guidance would be greatly appreciated as I've been stuck on this issue for the last week and am getting nowhere fast. i was hoping to get this project turned around within 3 weeks but as it stands I've wasted the last week on just this off and on.

Best regards,

andy

13 Jan 2009, 7:15 AM
#2
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Emedding flash into define_main_page.php

http://www.zen-cart.com/forum/showthread.php?t=64057
Plus posting url where you have attempted to insert code will
help..can then view source coding.
:wink:

13 Jan 2009, 7:29 AM
#3
bettsaj avatar

bettsaj

New Zenner

Join Date:
Dec 2008
Posts:
82
Plugin Contributions:
0

Re: Emedding flash into define_main_page.php

misty:

http://www.zen-cart.com/forum/showthread.php?t=64057
Plus posting url where you have attempted to insert code will
help..can then view source coding.
:wink:

Do you mean the xml file coding, or the coding on the actual define_main_page.php??

13 Jan 2009, 8:14 AM
#4
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Emedding flash into define_main_page.php

I coded similar carousel file for another zencart member several months ago, for define main page..
Code is below...use, and alter paths to suit ..

<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<body bgcolor="#000000">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<center>
<script language="javascript">
 if (AC_FL_RunContent == 0) {
  alert("This page requires AC_RunActiveContent.js.");
 } else {
  AC_FL_RunContent(
   'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0',
   'width', '336',
   'height', '251',
   'src', 'caraosel',
   'quality', 'high',
   'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
   'align', 'middle',
   'play', 'true',
   'loop', 'true',
   'scale', 'showall',
   'wmode', 'window',
   'devicefont', 'false',
   'id', 'caraosel',
   'bgcolor', '#000000',
   'name', 'caraosel',
   'menu', 'true',
   'allowFullScreen', 'false',
   'allowScriptAccess','sameDomain',
   'movie', 'caraosel',
   'salign', ''
   ); //end AC code
 }
</script>
<noscript>
 <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="[URL]http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0[/URL]" width="336" height="251" id="caraosel" align="middle">
 <param name="allowScriptAccess" value="sameDomain" />
 <param name="allowFullScreen" value="false" />
 <param name="movie" value="caraosel.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /> <embed src="caraosel.swf" quality="high" bgcolor="#000000" width="336" height="251" name="caraosel" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="[URL]http://www.macromedia.com/go/getflashplayer[/URL]" />
 </object>
</noscript>
</center>

:wink:

13 Jan 2009, 8:49 AM
#5
bettsaj avatar

bettsaj

New Zenner

Join Date:
Dec 2008
Posts:
82
Plugin Contributions:
0

Re: Emedding flash into define_main_page.php

this is the code from the define_main_page.php page:

<script src="../../../../../Scripts/AC_RunActiveContent.js" type="text/javascript"></script> <script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','600','height','600','src','carousel/MainFile','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','carousel/MainFile' ); //end AC code </script><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="600" height="600"> <param name="movie" value="../../../templates/cherry_zen/carousel/MainFile.swf" /> <param name="quality" value="high" /> <embed src="../../../templates/cherry_zen/carousel/MainFile.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="600" height="600"></embed> </object></noscript> <p>This content is located in the file at: <code> /languages/english/html_includes/YOUR_TEMPLATE/define_main_page.php</code></p> <p>You can quickly edit this content via Admin->Tools->Define Pages Editor, and select define_main_page from the pulldown.</p> <p><strong>NOTE: Always backup the files in<code> /languages/english/html_includes/your_template</code></strong></p>
13 Jan 2009, 9:22 AM
#6
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Emedding flash into define_main_page.php

Without having your actual files, difficult to comment, but
from coding you have posted...check paths to files
i.e.
all files for my code are in zencart root folder NOT
template folder...

13 Jan 2009, 9:34 AM
#7
bettsaj avatar

bettsaj

New Zenner

Join Date:
Dec 2008
Posts:
82
Plugin Contributions:
0

Re: Emedding flash into define_main_page.php

I've tried putting the carousel drectory in the root of the zen-cart and it didn't work.... Do you think I should try putting just the files in the zen root folder??

The files in the carousel directory are:

xmlMenu.xml
MainFile.swf
images folder

13 Jan 2009, 9:37 AM
#8
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Emedding flash into define_main_page.php

bettsaj:

I've tried putting the carousel drectory in the root of the zen-cart and it didn't work.... Do you think I should try putting just the files in the zen root folder??

The files in the carousel directory are:

xmlMenu.xml
MainFile.swf
images folder
Yes, but if you do not set paths correctly in coding, then
that wont work either...as stated in my last post, without
having actual files. difficult to advise..

13 Jan 2009, 10:21 AM
#9
bettsaj avatar

bettsaj

New Zenner

Join Date:
Dec 2008
Posts:
82
Plugin Contributions:
0

Re: Emedding flash into define_main_page.php

I shall have to check it tonight.... I'm at work at the moment and can't work on it. i'll check it and report back.

13 Jan 2009, 7:05 PM
#10
bettsaj avatar

bettsaj

New Zenner

Join Date:
Dec 2008
Posts:
82
Plugin Contributions:
0

Re: Emedding flash into define_main_page.php

I got it sorted.... It was a file path issue in the actual actionscript of the swf file.

you can now see the carousel by going to http://www.christinafrench.com/sienna

One thing i'd like to know is how do I centre the swf file on the page??

that's centred side to side horizontally NOT virtically.

:smile:

13 Jan 2009, 7:13 PM
#11
sartor avatar

sartor

New Zenner

Join Date:
Dec 2008
Posts:
56
Plugin Contributions:
0

Re: Emedding flash into define_main_page.php

it may not be the most practical way to do it, but you could always chuck a <p align="center"> in the code. or of course you could use divs, and align the div.

11 Nov 2009, 1:15 PM
#12
scottsimsa avatar

scottsimsa

New Zenner

Join Date:
Nov 2009
Posts:
1
Plugin Contributions:
0

Re: Emedding flash into define_main_page.php

Here's the thing... I have the same type of carousel flash component except I need to put it in another flash document... So instead of embeding it onto an html web page I need to embed it into a flash web page... How would I go about doing this??

I figured I could put the whole thing into a movie clip and stop on that and the carousel animation would work fine but all it does is loop my animation... Even with the "stop();" at the end... Can anyone help me out with this??