Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Using a Flash Movie whose content is derived from a XML file

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-27-2003, 08:51 PM
 
dealsondeals dealsondeals is offline
 

eXpert
  
Join Date: Dec 2002
Location: Dallas, Texas, USA
Posts: 231
 

Default Using a Flash Movie whose content is derived from a XML file

I am having a problem Using a Flash Movie(I am using this for my menu) whose content is derived from a XML file. It causes the browser to hang as it attempts to load to the Flash movie. I believe that the Smarty engine is "eating" it. I have tried placing the flash file and .xml file in the "{$ImagesDir}" as you can see below, and numerous other places, i.e. xcart/skin1/customer, xcart/customer and finally at the root of my public_html directory for my domain. Any ideas where I can place these files that will work? It works fine when you go straight to it: http://www.deals-on-deals.com/xcart/skin1/customer/ss_nested_tree_mx.swf

-------------------------------------------------------------------------------
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="150" height="455">
<param name=movie value="{$ImagesDir}/ss_nested_tree_mx.swf">
<param name=quality value=high>
<embed src=" {$ImagesDir}/ss_nested_tree_mx.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="150" height="455">
</embed>
</object>
-----------------------------------------------------------------------------------

Thanks,

Glen
__________________
Never understimate stupidity.
--------
X-Cart Version: 3.5.2
Hosting:mind-in-design.net
Configuration: Virtual Dedicated Server || Intel Pentium 4 2.4 GHZ CPU || 1024MB PC2100 DDR RAM || Linux || PHP 4.3.2 || MySQL server 4.0.14
Reply With Quote
  #2  
Old 02-28-2003, 04:44 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default

try

"../skin1/customer/ss_nested_tree_mx.swf"

failing that, use an absolute URL
Reply With Quote
  #3  
Old 02-28-2003, 05:18 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

heres my code for a flash file that i added


Code:
<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="150" height="50"> <param name=movie value="../{ImagesDir}/flashmovie.swf"> <param name=quality value=high> <embed src="../{ImagesDir}/flashmovie.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="150" height="50"> </embed> </object></td>

so it looks like you just need to add the ../
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #4  
Old 02-28-2003, 08:34 PM
 
dealsondeals dealsondeals is offline
 

eXpert
  
Join Date: Dec 2002
Location: Dallas, Texas, USA
Posts: 231
 

Default

Thanks for your suggestions, I am able to display other flash files just fine which reside in {$ImageDir}. It is just this one which utilizes an .xml file. To be more clear, if I was to place my cursor where the flash movie is supposed to be on the screen and right-click my mouse, I would get the macromedia options associated with a flash file. So the flash movie is loaded with its plain white background, but the .xml file which provides it content is somehow not being passed through. It is this that I believe Smarty is interfering with. See for yourself, the menu should be loading on the left-side of the screen:

http://www.deals-on-deals.com/xcart

Any suggestions are appreciated.

Thanks,

Glen
__________________
Never understimate stupidity.
--------
X-Cart Version: 3.5.2
Hosting:mind-in-design.net
Configuration: Virtual Dedicated Server || Intel Pentium 4 2.4 GHZ CPU || 1024MB PC2100 DDR RAM || Linux || PHP 4.3.2 || MySQL server 4.0.14
Reply With Quote
  #5  
Old 02-28-2003, 09:05 PM
 
FishBookStore FishBookStore is offline
 

Advanced Member
  
Join Date: Oct 2002
Posts: 58
 

Default XML Error

I looked at your SWF file, and to see the name of your XML file

xmlfile = "tree_nested.xml";

You have it in the images directory but if you look at the XML file, you appear to have a problem

Required white space was missing. Error processing resource 'http://www.deals-on-deals.com/xcart/skin1/images/tree_nested.xml'. Line 26, Position 22


<TREE ACTION="URL"LINK="http://www.macromedia.com" TARGET="_self">27in.- 36in.</T


You need a space between "URL" and "LINK. Try that.
__________________
Regards
Mark

FishBookStore.com
Version (3.3.1) (Not Live)
Reply With Quote
  #6  
Old 02-28-2003, 10:24 PM
 
dealsondeals dealsondeals is offline
 

eXpert
  
Join Date: Dec 2002
Location: Dallas, Texas, USA
Posts: 231
 

Default Fixed Whitespace Issues, but .xml file still not passed

Mark,

Thanks for the suggestion, there were about 10 other lines or so that I needed to fix in regards to whitespace. Unfortunately, this did not resolve the issue. I am not sure how or why, but Smarty has got be attempting to parse it and in the process killing it. I can't think of way to enscapsulate the code, like you would with javascript using {literal}{/literal}. By the way I tried using {literal}. Back to the drawing board....1:19a.m. .....I should be sleeping....

Thanks, (I am still open to any suggestions that will resolve this issue)

Glen
__________________
Never understimate stupidity.
--------
X-Cart Version: 3.5.2
Hosting:mind-in-design.net
Configuration: Virtual Dedicated Server || Intel Pentium 4 2.4 GHZ CPU || 1024MB PC2100 DDR RAM || Linux || PHP 4.3.2 || MySQL server 4.0.14
Reply With Quote
  #7  
Old 03-01-2003, 05:51 AM
 
FishBookStore FishBookStore is offline
 

Advanced Member
  
Join Date: Oct 2002
Posts: 58
 

Default

Try setting the URL of your XML in flash to an absolute URL
__________________
Regards
Mark

FishBookStore.com
Version (3.3.1) (Not Live)
Reply With Quote
  #8  
Old 03-01-2003, 06:03 AM
 
usermike usermike is offline
 

Advanced Member
  
Join Date: Jan 2003
Posts: 41
 

Default

Yes - I would change:

Code:
"../skin1/images/ss_nested_tree_mx.swf"

to

Code:
"/xcart/skin1/images/ss_nested_tree_mx.swf"

When I went to:
http://www.deals-on-deals.com/xcart/skin1/images/ss_nested_tree_mx.swf
I could see your menu.

Also, while at it, I would fix your table:

Code:
<TD WIDTH=180 ALIGN=right CLASS=NavCellAccent valign="top"> [img]../skin1/images/logo.gif[/img]

if you notice the td width is 180 and the image you are putting in is 225 wide. I would also put a
after the logo.[/url]
Reply With Quote
  #9  
Old 03-01-2003, 06:41 PM
 
dealsondeals dealsondeals is offline
 

eXpert
  
Join Date: Dec 2002
Location: Dallas, Texas, USA
Posts: 231
 

Default It Works!!!!!!!!! -

Mark & Mike,


It works!!!!!!!!

I went into the flash file and appended the url path to the name of the associated .xml file: /xcart/skin1/images/tree_nested.xml . I had to of course export the movie again.

I then went to home1.tpl and ammened the path for the flash file to:
/xcart/skin1/images/ss_nested_tree_mx.swf

It works wonderfully, check it out: http://www.deals-on-deals.com/xcart(the links for right now are bogus, I work on that next)

Thanks alot! I couldn't have done it without your help!

I think this is a starting point on thinking how XML and XSLT can be used with x-cart. Being able to add components that use XML to extend the functionality of our sites.

Regards,

Glen
__________________
Never understimate stupidity.
--------
X-Cart Version: 3.5.2
Hosting:mind-in-design.net
Configuration: Virtual Dedicated Server || Intel Pentium 4 2.4 GHZ CPU || 1024MB PC2100 DDR RAM || Linux || PHP 4.3.2 || MySQL server 4.0.14
Reply With Quote
  #10  
Old 03-02-2003, 05:41 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

I was doing something similar to this so it makes browsing categories rather easy, the trick of this which I'm not sure if you've gotten a php file to do such, but in theory, you could create a php file that loops over the categories tables and the php file returns an xml doc for the categories, this was the part I was having the most difficulties on as, looping over every cat1/subcat1/subcat2 and making sure it all nests properly for the xml so the structure is the same, is rather combersome. If you've found a way to do this let me know, as its one thing I'm still working on to this day.

This could make the flash movie dynamic with the admin so everytime a new category is added or current categories are edited/deleted, the flash movie is auto updated, since its loading xml from the php file thats quering the categories table in mysql.

Anyhow, looks good though
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:32 PM.

   

 
X-Cart forums © 2001-2020