Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to hyperlink an osc-embedded flash movie


developer_x

Recommended Posts

If I have a flash header, how can I hyperlink to another webpage? I tried this but it doesn't work:

 

 

<?php

if (HEADER_IMG_LINK_ON=='1') {

?>

<?php echo '<a href="' . HEADER_IMG_LINK . '" target="' . HEADER_IMG_LINK_WINDOW .'">' ?>

 

<td align="center">

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="<?php echo (($request_type == 'SSL') ? 'https://' : 'http://'); ?>download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="768" height="189">

<param name="movie" value="images/myheader.swf">

<param name="quality" value="high">

<embed src="images/myheader.swf" quality="high" pluginspage="<?php echo (($request_type == 'SSL') ? 'https://' : 'http://'); ?>www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="768" height="193"></embed>

</object>

</td>

 

 

<?php '</a><BR>'; ?>

<?php

}

 

I am using SEC 2.2 so the coding must be little different. And btw, for what else we can use the object tag?

Irfan,

Link to comment
Share on other sites

The best option is to edit the .fla file itself. Your second best option probably is to use javascript on the html elements that contain flash file. For example, make <td></td> clickable.

Link to comment
Share on other sites

I have a slightly different problem relating to flash button movies. I am trying to use them as category navigation. I edited the .fla file to use the correct hyperlinks with the category ids. My problem is being able to pass the session id in the link. Any ideas how to work around this issue or should I bail on the flash buttons as category navigation?

Link to comment
Share on other sites

I have a slightly different problem relating to flash button movies.  I am trying to use them as category navigation.  I edited the .fla file to use the correct hyperlinks with the category ids.  My problem is being able to pass the session id in the link.  Any ideas how to work around this issue or should I bail on the flash buttons as category navigation?

I dont know that....if you come to know it, do post it here. Btw you can visit indivision.net. I haven't been at the site but they are good in flash embedded php stuff.

Irfan,

Link to comment
Share on other sites

I finally found a way to use the flash buttons as category navigation. The flash buttons are each their own movie...not a navigation bar.

 

Basically, I installed the contribution for the 'Category Box Images', http://www.oscommerce.com/community/contri...ns,2387/page,2; but only used the categories_main_images.php file. Then I had to modify the new includes/boxes/categories.php file to add the flash movie <OBJECT>, <PARAM>, and <EMBED> tags for the flash button. This takes some knowledge of php.

 

Then, based on some forums that I read, I set the 'FORCE COOKIES' to yes. The 'FORCE COOKIES' will only work with no SSL or a owned SSL...not for secured SSL. A search in the forums for cookies & security will bring up a lot of information relating to cookies, etc. Anyways, the 'FORCE COOKIES' enables the session id to be stored as a cookie and not passed through the URL; which is not easily embeded into a flash movie since the session id is different for each person accessing the site. I found some code at www.flashbuttons.com that enables flash movies to be modified by javascript on the fly but it only works with IE; significantly reducing the number of people who could navigate the shopping cart.

 

So, now I was able to embed the link for each category in the flash movies themselves for each of the buttons. The cookie keeps track of the session id and the navigation works great! Now the only drawback is if someone does not have the Flash Media Player then they cannot navigate the sholpping cart. I will have to warn the site visitors and hope it doesn't chase too many away.

 

BTW, I tried what Alpha Ray suggested by using javascript to make the html tags around the flash movie clickable and it didn't work. The flash movie seemed to override any javascript that was set.

 

Hope this is helpful to someone.

 

Lisa

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...