This is the best way to add Flash to HTML: http://blog.deconcept.com/ swfobject/

So in your case it would be like this:
<script type="text/javascript">
var so = new SWFObject("images/upload/' . $image_name . '", "mymovie", "' . $width . '", "' . $height .'", "7", "#336699");
   so.write("flashcontent");
</script>


To add click urls, you need to modify the source for the swf. It is possible to do this programmatically. The OpenAds (formerly phpAdsNew/MaxMediaManager) project does it: http://www.openads.org/ Take a look at the www/admin/lib-swf.inc.php file. You want to make your swf accept an actionscript argument that contains the link where it should go when clicked. The standard name for this argument is clickTAG. So with you swf modified, here's your embed code:

<script type="text/javascript">
var so = new SWFObject("images/upload/' . $image_name . '? clickTAG=' . $whateverUrlYouWantToGoTo .'", "mymovie", "' . $width . '", "' . $height .'", "7", "#336699");
   so.write("flashcontent");
</script>


Good luck!
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to