NYCPHP Meetup

NYPHP.org

[nycphp-talk] How can I include a hyperlink to swf file ?

inforequest 1j0lkq002 at sneakemail.com
Wed Mar 14 19:31:25 EDT 2007


Rob Marscher rmarscher-at-beaffinitive.com |nyphp dev/internal group 
use| wrote:

> 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!

and THAT post is an exampleof what makes NYPHP talk list great!



More information about the talk mailing list