Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Why won't Flash using XML file load images?

Why won't Flash using XML file load images?

Locked

Views: 17,726

Results 21 to 31 of 31
This thread is locked. New replies are disabled.
23 Mar 2009, 1:41 AM
#21
damiendlskinsolution avatar

damiendlskinsolution

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Why won't Flash using XML file load images?

davewest:

Sorry Damien, got me stumped on this one. Looks like you could hard code the script into tpl_header, just not sure what the php file is doing.

Flash 4 and above can do anything javascript could do. Just not sure why this gallery would require so much outside scripting. Also I don't see the normal calls for loading the xml list, so I'm assuming that's what all the extra scripting is doing. :wacko:

Dave,
Thank you for your help.
I guess i will go back to my source and try to get something from him.
I've spent days on this, read probably over 1000 posts on several forums and still don't get it.
Worst case scenario, i will go for an easier solution and an "all included" Flash animation instead of fancy XML... :D

Damien

23 Mar 2009, 1:46 AM
#22
damiendlskinsolution avatar

damiendlskinsolution

Zen Follower

Join Date:
Sep 2008
Posts:
97
Plugin Contributions:
0

Re: Why won't Flash using XML file load images?

misty:

Try placing xml file and swf file etc in zencart root folder...

Hi Misty,

Thank you for the advice. I tried already, and i didn't work. I had everything in the Root, i also had everything in a Flash folder in MY_TEMPLATE/images...
I guess i will just put that aside for now... Soooo many more things to work on. :D
Thank you though for trying.

Damien

23 Mar 2009, 5:39 AM
#23
misty avatar

misty

Inactive

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

Re: Why won't Flash using XML file load images?

DamienDLSkinSolution:

Hi Misty,

Thank you for the advice. I tried already, and i didn't work. I had everything in the Root, i also had everything in a Flash folder in MY_TEMPLATE/images...
I guess i will just put that aside for now... Soooo many more things to work on.
Thank you though for trying.

Damien
It should work...used method myself, BUT you have to
state exact paths to all files/xml file and swf file..i.e.

http://yourdomain.com/default.xml

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

8 Apr 2009, 9:08 PM
#24
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Why won't Flash using XML file load images?

ok, so i am having similar problems, thought i would revive this thread again. i have successfully loaded the FLShow flash carousel, and it is running on my main page (the only page i want it to show on)... however, it is not pulling the images, just showing [x] boxes... here is how i have it configured....

  1. i renamed the javascript file, and put it in the correct zencart javascript folder.... "catalogzen/includes/templates/darkness/jscript/jscript_swfobject.js"

  2. i used the provided code, and put the following into my "define_mainpage.php" file, thru zen cart define pages admin.

<div>
			<object height="600" width="800" id="Carousel" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
				<param value="Carousel.swf" name="movie" />
				<!--[if !IE]>-->
				<object height="600" width="585" data="http://customk9design.com/catalogzen/admin/Carousel.swf" type="application/x-shockwave-flash">
<param value="xmlfile=images/CarouselImages/default.xml" name="flashvars" />
				<!--<![endif]-->
					<a href="http://www.adobe.com/go/getflashplayer">
						<img alt="Get Adobe Flash player" src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" />
					</a>
				<!--[if !IE]>-->
				</object>
				<!--<![endif]-->
			</object>
		</div>
  1. per the above code (which was generated for me thru the swfobject code creator) i put the carousel.swf file in the above listed "catalogzen/admin/"

  2. because i wanted to keep all my images together, i created a new folder at "catalogzen/images/CarouselImages/" which currently contains the following:
    default.xml
    test1.jpg
    test2.jpg
    test3.jpg

  3. i added (per the instructions) a variable to the above string in the define_mainpage.php file to reference the correct folder for the images.

the code instructed was this:

<param name="flashvars" value="xmlfile=path/file.xml
&loadercolor=#00CCFF"/>

i put it in like this:

<param name="flashvars" value="xmlfile=images/CarouselImages
/default.xml" />

however, as you can see above, it changes it after saving to:

<param value="xmlfile=images/CarouselImages
/default.xml" name="flashvars" />

i do not know if this is part of the problem or not.

  1. my xml file is as below:
<?xml version="1.0" encoding="utf-8"?>

<!--
	fhShow Carousel 1.7 configuration file
	Please visit http://www.flshow.net/ for more info
-->

<slide_show>
	    <options>
        <debug>false</debug>                <!-- true, false -->
        <background>transparent</background>    <!-- #RRGGBB, transparent -->
        <friction>10</friction>              <!-- [1,100] -->
        <fullscreen>false</fullscreen>      <!-- true, false -->
 
        <margins>
            <top>0</top>                                <!-- [-1000,1000] pixels -->
            <left>0</left>                              <!-- [-1000,1000] pixels -->
            <bottom>0</bottom>                          <!-- [-1000,1000] pixels -->
            <right>0</right>                            <!-- [-1000,1000] pixels -->
            <horizontal_ratio>33%</horizontal_ratio>    <!-- [1,50] a photo may occupy at most horizontalRatio percent of the Carousel width -->
            <vertical_ratio>50%</vertical_ratio>        <!-- [1,100] a photo may occupy at most verticalRatio percent of the Carousel height -->
        </margins>
 
        <interaction>
            <rotation>mouse</rotation>            <!-- auto, mouse, keyboard -->
            <view_point>mouse</view_point>        <!-- none, mouse, keyboard -->
            <speed>75</speed>                     <!-- [-360,360] degrees per second -->
 
            <default_speed>35</default_speed>             <!-- [-360,360] degrees per second -->
            <default_view_point>20%</default_view_point>  <!-- [0,100] percentage -->
            <reset_delay>30</reset_delay>                 <!-- [0,600] seconds, 0 means never reset -->
        </interaction>
 
        <far_photos>
            <size>50%</size>                  <!-- [0,100] percentage -->
            <amount>50%</amount>              <!-- [0,100] percentage -->
            <blur>10</blur>                   <!-- [0,100] amount -->
            <blur_quality>3</blur_quality>    <!-- [1,3] 1=low - 3=high -->
        </far_photos>
 
        <reflection>
            <amount>100</amount>      <!-- [0,1000] pixels -->
            <blur>2</blur>            <!-- [0,100] blur amount -->
            <distance>0</distance>    <!-- [-1000,1000] pixels -->
            <alpha>50%</alpha>        <!-- [0,100] percentage -->
        </reflection>
 
        <titles>
            <default_style>font-size: 12px; font-family: Verdana, _serif; color: #333333;</default_style>
        </titles>
    </options>

<!-- Photo list -->

<photo>
  <href>http://customk9design.com/catalogzen/index.php?main_page=product_info&cPath=1_10&products_id=2/</href>
  <target>_blank</target>
  <src>../images/CarouselImages/test1.jpg</src>
  <title>This photo title has <i>italic</i> and <b>bold</b> text.<br/>There is also a second line here!</title>
</photo>

<photo>
  <href>http://customk9design.com/catalogzen/index.php?main_page=product_info&cPath=1_10&products_id=1</href>
  <target>_blank</target>
  <src>../images/CarouselImages/test2.jpg</src>
  <title>This photo title has <i>italic</i> and <b>bold</b> text.<br/>There is also a second line here!</title>
</photo>

<photo>
  <href>http://customk9design.com/catalogzen/index.php?main_page=product_info&cPath=1_11&products_id=3</href>
  <target>_blank</target>
  <src>../images/CarouselImages/test3.jpg</src>
  <title>This photo title has <i>italic</i> and <b>bold</b> text.<br/>There is also a second line here!</title>
</photo>
	
</slide_show>

soooooo.... my guess is that it is one of the following issues, but i do not know enough to know which one, or how to fix.. so whatever the issue may be, please spell out specifically what to do, i follow instructions well!! :D

  1. the locations of the swf and or xml files are wrong... and need to be moved.... somewhere....

  2. the calling of the images in the xml file is wrong, and i just need to change the path somehow

  3. the changing of the variable (as described in #5) is in some way affecting things...

anyone want to break this down for me??

ohh.. almost forgot the important part!
website is https://www.customk9design.com/catalogzen

THANKS TO ALL!

"Be the Change you wish to see in the World..." -Gandhi

8 Apr 2009, 9:12 PM
#25
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Why won't Flash using XML file load images?

ok, im too stupid for my own good... lol

i had one too many periods here:

<src>../images/CarouselImages/test1.jpg</src>

i changed one to "." one to "..." and one to "...." to see if it would work, and the one with "." worked...

ANYWAYS... i would still appreciate a quick once-over to make sure there are no other critical issues or other improvements i should make?

"Be the Change you wish to see in the World..." -Gandhi

9 Apr 2009, 5:36 AM
#26
misty avatar

misty

Inactive

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

Re: Why won't Flash using XML file load images?

Visited site at
http://customk9design.com/catalogzen/
Firefox...working fine, IE7 shows white blank space..

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

9 Apr 2009, 2:10 PM
#27
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Why won't Flash using XML file load images?

misty,
fixing this for IE is.... #5 to do on my list today.. lol...

any suggestions? (i have NOT researched it or searched the forums YET, just replying to your comment in thread)

"Be the Change you wish to see in the World..." -Gandhi

9 Apr 2009, 2:31 PM
#28
misty avatar

misty

Inactive

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

Re: Why won't Flash using XML file load images?

customk1:

misty,
any suggestions? (i have NOT researched it or searched the forums YET, just replying to your comment in thread)
Visit my demo site below, similar carousel...
view browser source to see coding..
apply to your own...
http://www.dezinashop.com/demo/
HTH
:smile:

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

9 Apr 2009, 2:37 PM
#29
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Why won't Flash using XML file load images?

misty, i will review your site... thanks!

i am also having an issue with the carousel showing/not showing in firefox (latest version)? case in point, you and i can both see the show in firefox, but i have two friends who loaded it today (and confirmed were on latest ff version) who see red script coding instead of the images....

are these things related?

(running out for a bit, will tackle comparing code as soon as i get back)

thanks for your input, it is appreciated!!

"Be the Change you wish to see in the World..." -Gandhi

27 Sep 2010, 10:38 PM
#30
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: Why won't Flash using XML file load images?

One way to embed flash quickly is to set it up as an html page like in your demo package and then embed an iframe into your define page.

2 Dec 2010, 6:13 PM
#31
rdayan avatar

rdayan

New Zenner

Join Date:
Jul 2007
Posts:
18
Plugin Contributions:
0

Re: Why won't Flash using XML file load images?

wasana:

If I can get flash swf to display, why can't I get images called from an XML file to load?

DrByte:

You most likely haven't set the correct path for the images.
I believe flash generally treats the image path as relative to the folder where your swf is located.

I had the exact same issue and read thru this thread when DrByte just had it right all along. It is a path issue.

Example of a solution in flash AS2
Create a folder located in the root of your site and call it flash
In the folder will be your xml file (images.xml), your swf (slideshow.swf) and a folder with pictures (swf_pix).
You need to change the path in 2 files:
1- in your fla file look for
xmlData.load("/RelativePathTo XMLfile");
Example below
xmlData.load("/flash/images.xml");
Then publish your swf.
2 - in your xml file
it is the relative path to your pictures.
<image>/flash/swf_pix/pic1.jpg</image>
<image>/flash/swf_pix/pic2.jpg</image>
Then upload the folder to the server. Voila!

Peace-